|
@@ -20,6 +20,7 @@
|
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
|
<el-form-item label="返利单号" prop="">
|
|
|
<el-input
|
|
|
+ disabled
|
|
|
v-model="searchForm.rebateOrderId"
|
|
|
placeholder="请输入"
|
|
|
></el-input>
|
|
@@ -28,6 +29,7 @@
|
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
|
<el-form-item label="返利日期" prop="">
|
|
|
<el-input
|
|
|
+ disabled
|
|
|
v-model="searchForm.theTime"
|
|
|
placeholder="请输入"
|
|
|
></el-input>
|
|
@@ -36,6 +38,7 @@
|
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
|
<el-form-item label="备注" prop="">
|
|
|
<el-input
|
|
|
+ disabled
|
|
|
v-model="searchForm.remark"
|
|
|
placeholder="请输入"
|
|
|
></el-input>
|
|
@@ -44,6 +47,7 @@
|
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
|
<el-form-item label="制单人" prop="">
|
|
|
<el-input
|
|
|
+ disabled
|
|
|
v-model="searchForm.createBy"
|
|
|
placeholder="请输入"
|
|
|
></el-input>
|
|
@@ -52,6 +56,7 @@
|
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
|
<el-form-item label="制单日期" prop="">
|
|
|
<el-input
|
|
|
+ disabled
|
|
|
v-model="searchForm.createTime"
|
|
|
placeholder="请输入"
|
|
|
></el-input>
|
|
@@ -59,12 +64,34 @@
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
|
<el-form-item label="审批人" prop="">
|
|
|
- <el-input placeholder="请输入"></el-input>
|
|
|
+ <el-input
|
|
|
+ v-if="this.searchForm.secondExamineBy != null"
|
|
|
+ disabled
|
|
|
+ v-model="searchForm.secondExamineBy"
|
|
|
+ placeholder=""
|
|
|
+ ></el-input>
|
|
|
+ <el-input
|
|
|
+ v-else
|
|
|
+ disabled
|
|
|
+ v-model="searchForm.examineBy"
|
|
|
+ placeholder=""
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
|
<el-form-item label="审批日期" prop="">
|
|
|
- <el-input placeholder="请输入"></el-input>
|
|
|
+ <el-input
|
|
|
+ v-if="this.searchForm.secondExamineTime != null"
|
|
|
+ disabled
|
|
|
+ v-model="searchForm.secondExamineTime"
|
|
|
+ placeholder=""
|
|
|
+ ></el-input>
|
|
|
+ <el-input
|
|
|
+ v-else
|
|
|
+ disabled
|
|
|
+ v-model="searchForm.examineTime"
|
|
|
+ placeholder=""
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -115,7 +142,7 @@
|
|
|
show-overflow-tooltip
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model="scope.row.rebateAmount"></el-input>
|
|
|
+ <el-input v-model.number="scope.row.rebateAmount"></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -126,7 +153,7 @@
|
|
|
show-overflow-tooltip
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model="scope.row.allowanceAmount"></el-input>
|
|
|
+ <el-input v-model.number="scope.row.allowanceAmount"></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -140,8 +167,10 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<br />
|
|
|
- <el-button type="primary" size="small" @click="btnFn">确定</el-button>
|
|
|
- <el-button type="primary" size="small" @click="resetFn">重置</el-button>
|
|
|
+ <div v-if="!isShow">
|
|
|
+ <el-button type="primary" size="small" @click="btnFn">确定</el-button>
|
|
|
+ <el-button type="primary" size="small" @click="resetFn">重置</el-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -156,6 +185,10 @@ export default {
|
|
|
type: String,
|
|
|
required: true,
|
|
|
},
|
|
|
+ isShow: {
|
|
|
+ type: Boolean,
|
|
|
+ required: true,
|
|
|
+ },
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -167,6 +200,7 @@ export default {
|
|
|
remark: "",
|
|
|
},
|
|
|
dataList: [],
|
|
|
+ saveDataList: [],
|
|
|
listLoading: false, // 列表加载loading
|
|
|
};
|
|
|
},
|
|
@@ -174,19 +208,69 @@ export default {
|
|
|
this.getDataList();
|
|
|
},
|
|
|
methods: {
|
|
|
+ //深拷贝数据
|
|
|
+ deepCopy(data) {
|
|
|
+ //string,number,bool,null,undefined,symbol
|
|
|
+ //object,array,date
|
|
|
+ if (data && typeof data === "object") {
|
|
|
+ //针对函数的拷贝
|
|
|
+ if (typeof data === "function") {
|
|
|
+ let tempFunc = data.bind(null);
|
|
|
+ tempFunc.prototype = this.deepCopy(data.prototype);
|
|
|
+ return tempFunc;
|
|
|
+ }
|
|
|
+
|
|
|
+ switch (Object.prototype.toString.call(data)) {
|
|
|
+ case "[object String]":
|
|
|
+ return data.toString();
|
|
|
+ case "[object Number]":
|
|
|
+ return Number(data.toString());
|
|
|
+ case "[object Boolean]":
|
|
|
+ return new Boolean(data.toString());
|
|
|
+ case "[object Date]":
|
|
|
+ return new Date(data.getTime());
|
|
|
+ case "[object Array]":
|
|
|
+ var arr = [];
|
|
|
+ for (let i = 0; i < data.length; i++) {
|
|
|
+ arr[i] = this.deepCopy(data[i]);
|
|
|
+ }
|
|
|
+ return arr;
|
|
|
+
|
|
|
+ //js自带对象或用户自定义类实例
|
|
|
+ case "[object Object]":
|
|
|
+ var obj = {};
|
|
|
+ for (let key in data) {
|
|
|
+ //会遍历原型链上的属性方法,可以用hasOwnProperty来控制 (obj.hasOwnProperty(prop)
|
|
|
+ obj[key] = this.deepCopy(data[key]);
|
|
|
+ }
|
|
|
+ return obj;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ //string,number,bool,null,undefined,symbol
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //重置
|
|
|
+ resetFn() {
|
|
|
+ console.log(this.dataList, this.saveDataList);
|
|
|
+ this.dataList = this.saveDataList;
|
|
|
+ this.saveDataList = this.deepCopy(this.dataList);
|
|
|
+ },
|
|
|
//确定
|
|
|
async btnFn() {
|
|
|
console.log(this.dataList);
|
|
|
const res = this.dataList.map((v) => {
|
|
|
return {
|
|
|
allowanceAmount: v.allowanceAmount,
|
|
|
- rebateAmount: v.amount,
|
|
|
+ rebateAmount: v.rebateAmount,
|
|
|
itemId: v.id,
|
|
|
};
|
|
|
});
|
|
|
console.log(res, 888);
|
|
|
await getRebateOrderAck(res);
|
|
|
- this.$message.success("确认成功");
|
|
|
+ // this.$emit("updateList");
|
|
|
+ // this.$message.success("确认成功");
|
|
|
+ // this.$parent.showPage = 1;
|
|
|
},
|
|
|
//获取详情数据
|
|
|
async getDataList() {
|
|
@@ -197,7 +281,13 @@ export default {
|
|
|
this.searchForm.createBy = res.data.createBy;
|
|
|
this.searchForm.createTime = res.data.createTime;
|
|
|
this.searchForm.remark = res.data.remark;
|
|
|
+ this.searchForm.secondExamineBy = res.data.secondExamineBy;
|
|
|
+ this.searchForm.secondExamineTime = res.data.secondExamineTime;
|
|
|
+ this.searchForm.examineBy = res.data.examineBy;
|
|
|
+ this.searchForm.examineTime = res.data.examineTime;
|
|
|
+ this.saveDataList = this.deepCopy(res.data.items);
|
|
|
this.dataList = res.data.items;
|
|
|
+ this;
|
|
|
},
|
|
|
goBack() {
|
|
|
this.$parent.showPage = 1;
|