|
@@ -54,8 +54,10 @@
|
|
|
<el-form-item label="单据日期" prop="date">
|
|
|
<el-date-picker
|
|
|
v-model="mainForm.date"
|
|
|
- type="date"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
+ type="datetime"
|
|
|
+
|
|
|
+ :picker-options="pickerOptions"
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
style="width: 100%"
|
|
|
placeholder="选择日期"
|
|
|
>
|
|
@@ -222,14 +224,14 @@
|
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
- label="数量"
|
|
|
+ label="总数量"
|
|
|
prop="qty"
|
|
|
min-width="100"
|
|
|
show-overflow-tooltip
|
|
|
>
|
|
|
- <template slot-scope="scope">
|
|
|
+ <!-- <template slot-scope="scope">
|
|
|
<el-input v-model="scope.row.qty" size="small"></el-input>
|
|
|
- </template>
|
|
|
+ </template> -->
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
align="center"
|
|
@@ -343,7 +345,7 @@
|
|
|
<el-checkbox v-model="scope.row.isDirectTransfer"></el-checkbox>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
+ <!-- <el-table-column
|
|
|
align="center"
|
|
|
label="直调数量"
|
|
|
prop="directTransferQty"
|
|
@@ -355,7 +357,7 @@
|
|
|
size="small"
|
|
|
></el-input>
|
|
|
</template>
|
|
|
- </el-table-column>
|
|
|
+ </el-table-column> -->
|
|
|
<el-table-column
|
|
|
align="center"
|
|
|
label="备注"
|
|
@@ -550,7 +552,7 @@
|
|
|
:page-sizes="[10]"
|
|
|
:page-size="10"
|
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
|
- :total="dataList.length"
|
|
|
+ :total="total"
|
|
|
>
|
|
|
</el-pagination>
|
|
|
</div>
|
|
@@ -613,11 +615,10 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
- <el-row type="flex" :gutter="20" style="margin: 10px 0">
|
|
|
- <el-col>已选择限定机型</el-col>
|
|
|
- <el-col>{{ comText("mainName") }}</el-col>
|
|
|
- <el-col>{{ comText("specification") }}</el-col>
|
|
|
- <el-col></el-col>
|
|
|
+ <el-row type="flex" :gutter="30" style="margin: 10px 0">
|
|
|
+ <el-col :span="10">已选择限定机型</el-col>
|
|
|
+ <el-col :span="8" class="ellipsis">{{ comText("materialName") }}</el-col>
|
|
|
+ <el-col :span="12" class="ellipsis">{{ comText("specification") }}</el-col>
|
|
|
<el-col style="text-align: right">配提比例:{{ pop }}</el-col>
|
|
|
</el-row>
|
|
|
<template v-for="(item, index) in popArr">
|
|
@@ -635,7 +636,14 @@
|
|
|
><template slot-scope="scope">
|
|
|
<el-radio
|
|
|
v-model="radioObj['radio' + cusIndex]"
|
|
|
- :label="scope.row.id"
|
|
|
+ :label=" scope.row.id +
|
|
|
+ '&' +
|
|
|
+ scope.row.policyId +
|
|
|
+ '&' +
|
|
|
+ scope.row.materialId +
|
|
|
+ '&' +
|
|
|
+ scope.row.policyConditionId
|
|
|
+ ""
|
|
|
>{{ "" }}</el-radio
|
|
|
>
|
|
|
</template>
|
|
@@ -677,15 +685,10 @@
|
|
|
</template>
|
|
|
</el-table>
|
|
|
<!-- 分页 -->
|
|
|
- <div style="margin: 10px 0">
|
|
|
+ <div style="margin: 10px 0" v-if="index + 1 == cusIndex">
|
|
|
<el-pagination
|
|
|
- @size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- :current-page="currentPage"
|
|
|
- :page-sizes="[10]"
|
|
|
- :page-size="10"
|
|
|
- layout="total, sizes, prev, pager, next, jumper"
|
|
|
- :total="popDataArr[cusIndex - 1].length || 0"
|
|
|
+ layout="total"
|
|
|
+ :total="popDataArr[cusIndex - 1]?popDataArr[cusIndex - 1].length:0"
|
|
|
>
|
|
|
</el-pagination>
|
|
|
</div>
|
|
@@ -694,7 +697,7 @@
|
|
|
<el-button type="primary" @click="cusIndex -= 1">上一步</el-button>
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
- @click="handleCondition()"
|
|
|
+ @click="handleCondition"
|
|
|
v-if="popArr.length != cusIndex"
|
|
|
>下一步</el-button
|
|
|
>
|
|
@@ -750,6 +753,7 @@ export default {
|
|
|
pageSize: 10, // 每页数量
|
|
|
listTotal: 0, // 列表总数
|
|
|
cusIndex: 0,
|
|
|
+ total:0,
|
|
|
radio: "",
|
|
|
pop: "",
|
|
|
popArr: [],
|
|
@@ -828,6 +832,7 @@ export default {
|
|
|
popDataArr: [],
|
|
|
radioObj: {},
|
|
|
step: 0,
|
|
|
+ policyId:''
|
|
|
};
|
|
|
},
|
|
|
|
|
@@ -858,20 +863,32 @@ export default {
|
|
|
},
|
|
|
comText() {
|
|
|
return (val) => {
|
|
|
- const params = this.radio.split("&");
|
|
|
- if (this.cusIndex - 1 == 0) {
|
|
|
+ if (this.cusIndex-1 ==0) {
|
|
|
+ const params = this.radio.split("&");
|
|
|
return this.dataList.filter((k) => {
|
|
|
- console.log(k, params[0]);
|
|
|
return k.id == params[0];
|
|
|
- })[0][val];
|
|
|
- } else {
|
|
|
- return this.popDataArr[this.cusIndex - 1].filter((k) => {
|
|
|
- return k.id == params[0];
|
|
|
- })[0][val];
|
|
|
+ })[0][val]
|
|
|
+
|
|
|
+ }else{
|
|
|
+ const params = this.radioObj['radio' + (this.cusIndex-1)].split("&")
|
|
|
+ return this.popDataArr[this.cusIndex - 2].filter(k=>{
|
|
|
+ return k.id == params[0]
|
|
|
+ })[0][val]
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
};
|
|
|
- // console.log();
|
|
|
},
|
|
|
+ pickerOptions({ $props }) {
|
|
|
+ return {
|
|
|
+ disabledDate: (time) => {
|
|
|
+ return time.getTime() < Date.now()-1 * 24 * 60 * 60 * 1000
|
|
|
+ }
|
|
|
+ };
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
|
|
|
created() {
|
|
@@ -884,9 +901,7 @@ export default {
|
|
|
this.getDetail();
|
|
|
}
|
|
|
},
|
|
|
- beforeUpdate() {
|
|
|
-
|
|
|
- },
|
|
|
+ beforeUpdate() {},
|
|
|
methods: {
|
|
|
// 返回列表
|
|
|
goBack() {
|
|
@@ -913,8 +928,10 @@ export default {
|
|
|
pageSize: -1,
|
|
|
}).then((res) => {
|
|
|
console.log(res, "tyep");
|
|
|
- this.policyList = res.data.records;
|
|
|
this.screenForm.policyId = res.data.records[0].code;
|
|
|
+ this.policyList = res.data.records;
|
|
|
+ console.log(this.policyList,'policyList');
|
|
|
+
|
|
|
});
|
|
|
},
|
|
|
getTypeList() {
|
|
@@ -957,6 +974,7 @@ export default {
|
|
|
res.data.records[i].qty = 1;
|
|
|
}
|
|
|
this.dataList = res.data.records;
|
|
|
+ this.total = res.data.total
|
|
|
console.log(this.dataList, "kkkk");
|
|
|
});
|
|
|
},
|
|
@@ -974,7 +992,7 @@ export default {
|
|
|
},
|
|
|
handleShow() {
|
|
|
this.isShowDialog = true;
|
|
|
- this.getPolicyList()
|
|
|
+ this.getPolicyList();
|
|
|
},
|
|
|
// 获取钱包列表
|
|
|
getWalletList() {
|
|
@@ -1133,13 +1151,11 @@ export default {
|
|
|
this.pop = res.data.pop;
|
|
|
this.popArr = res.data.pop.split(":");
|
|
|
this.popArr.splice(0, 1);
|
|
|
- console.log(this.popArr);
|
|
|
- console.log;
|
|
|
for (let i = 0; i < this.popArr.length; i++) {
|
|
|
this.$set(this.radioObj, "radio" + (i + 1), "");
|
|
|
}
|
|
|
this.step = this.cusIndex + 1;
|
|
|
- this.screenForm.policyId = "";
|
|
|
+
|
|
|
this.getConditionList(params[3], this.step);
|
|
|
});
|
|
|
} else {
|
|
@@ -1162,51 +1178,53 @@ export default {
|
|
|
this.getConditionList(params[3], this.step);
|
|
|
},
|
|
|
getConditionList(policyConditionId, popType) {
|
|
|
- let arr = []
|
|
|
+
|
|
|
getConditionList({
|
|
|
pageNum: this.currentPage,
|
|
|
pageSize: this.pageSize,
|
|
|
policyConditionId,
|
|
|
popType,
|
|
|
}).then((res) => {
|
|
|
- console.log(this.cusIndex);
|
|
|
- const datas = res.data.records
|
|
|
+
|
|
|
+ const datas = res.data.records;
|
|
|
for (let i = 0; i < res.data.records.length; i++) {
|
|
|
res.data.records[i].qty = 1;
|
|
|
}
|
|
|
if (this.popDataArr.length) {
|
|
|
+
|
|
|
this.popDataArr.splice(this.cusIndex - 1, 1);
|
|
|
}
|
|
|
if (this.cusIndex == 0) {
|
|
|
+
|
|
|
this.popDataArr = [];
|
|
|
}
|
|
|
-
|
|
|
+ // this.popDataArr.push(datas)
|
|
|
if (this.cusIndex == 1) {
|
|
|
- for (let l = 0; l < this.dataList.length; l++) {
|
|
|
+ const params = this.radio.split("&");
|
|
|
+ for (let k = 0; k < datas.length; k++) {
|
|
|
|
|
|
- for (let k = 0; k < datas.length; k++) {
|
|
|
- console.log(this.dataList[l].id == datas[k].id,'hahah',datas,this.dataList);
|
|
|
- if (this.dataList[l].id == datas[k].id) {
|
|
|
- datas.splice(k,1)
|
|
|
- }
|
|
|
+ if (params[2]== datas[k].materialId) {
|
|
|
+ datas.splice(k, 1);
|
|
|
}
|
|
|
- }
|
|
|
- this.popDataArr.push(datas);
|
|
|
- }else{
|
|
|
|
|
|
- for (let j = 0; j < this.popDataArr[this.cusIndex-1].length; j++) {
|
|
|
- for (let k = 0; k < datas.length; k++) {
|
|
|
+ }
|
|
|
|
|
|
- if (this.dataList[l].id == datas[k].id) {
|
|
|
- datas.splice(k,1)
|
|
|
- }
|
|
|
- }
|
|
|
+ this.popDataArr.push(datas);
|
|
|
|
|
|
+ } else {
|
|
|
+
|
|
|
+ const params = this.radioObj['radio' + (this.cusIndex-1)].split("&")
|
|
|
+ for (let k = 0; k < datas.length; k++) {
|
|
|
+ if (params[2] == datas[k].id) {
|
|
|
+ datas.splice(k, 1);
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
this.popDataArr.push(datas);
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
- // this.popDataArr.push(res.data.records);
|
|
|
|
|
|
});
|
|
|
},
|
|
@@ -1219,8 +1237,10 @@ export default {
|
|
|
|
|
|
for (let j = 0; j < arrData.length; j++) {
|
|
|
for (const key in this.radioObj) {
|
|
|
- if (arrData[j].id == this.radioObj[key]) {
|
|
|
- console.log(arrData[j], "xxxx");
|
|
|
+ const params = this.radioObj[key].split("&");
|
|
|
+ console.log(params);
|
|
|
+ if (arrData[j].id == params[0]) {
|
|
|
+
|
|
|
this.goodsList = [...this.goodsList, arrData[j]];
|
|
|
}
|
|
|
}
|
|
@@ -1244,9 +1264,8 @@ export default {
|
|
|
this.cusIndex = 0;
|
|
|
this.radio = "";
|
|
|
this.dataList = [];
|
|
|
- this.screenForm.policyId = "";
|
|
|
- this.screenForm.saleTypeCode = "";
|
|
|
|
|
|
+ this.policyId =this.screenForm.policyId
|
|
|
this.isShowDialog = false;
|
|
|
} else {
|
|
|
this.$errorMsg("请选择");
|
|
@@ -1325,7 +1344,7 @@ export default {
|
|
|
remark: this.mainForm.remark,
|
|
|
type: 2, // 1:普通零售单,2:政策零售单
|
|
|
retailOrderItemList: this.goodsList,
|
|
|
- policyId: this.screenForm.policyId,
|
|
|
+ policyId:this.policyId,
|
|
|
};
|
|
|
if (this.listItem) {
|
|
|
params.id = this.listItem.id;
|
|
@@ -1389,4 +1408,9 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+.ellipsis{
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ white-space: nowrap;
|
|
|
+}
|
|
|
</style>
|