|
@@ -65,7 +65,7 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="24" :sm="12" :lg="12" v-if="goodsList.length && commercialType">
|
|
|
+ <el-col v-if="goodsList.length && commercialType" :span="24" :sm="12" :lg="12">
|
|
|
<el-form-item label="计划单" prop="isPlanOrder">
|
|
|
<el-radio-group v-model="mainForm.isPlanOrder">
|
|
|
<el-radio :label="true">是</el-radio>
|
|
@@ -322,8 +322,8 @@
|
|
|
width="80%"
|
|
|
:close-on-click-modal="false"
|
|
|
title="引用销售政策"
|
|
|
- @close="handleClose"
|
|
|
:append-to-body="true"
|
|
|
+ @close="handleClose"
|
|
|
>
|
|
|
<template>
|
|
|
<el-form ref="screenForm" :model="screenForm" label-width="120px" label-position="left" size="small">
|
|
@@ -341,9 +341,12 @@
|
|
|
<el-form-item label="规格型号">
|
|
|
<div style="display: flex">
|
|
|
<el-input v-model="screenForm.specification" placeholder="请输入规格型号" />
|
|
|
- <el-button style="margin-left: 10px" type="primary" size="mini" @click="handleGetPolicyList"
|
|
|
- >查询</el-button
|
|
|
- >
|
|
|
+ <el-button
|
|
|
+ style="margin-left: 10px"
|
|
|
+ type="primary"
|
|
|
+ size="mini"
|
|
|
+ @click="handleGetPolicyList"
|
|
|
+ >查询</el-button>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -359,9 +362,10 @@
|
|
|
>
|
|
|
<el-option v-for="item in policyList" :key="item.code" :label="item.title" :value="item.code">
|
|
|
<span>{{ item.title }}</span>
|
|
|
- <span v-if="item.policyRemark" style="margin-left: 15px; color: #f00; font-size: 12px"
|
|
|
- >( {{ item.policyRemark }} )</span
|
|
|
- >
|
|
|
+ <span
|
|
|
+ v-if="item.policyRemark"
|
|
|
+ style="margin-left: 15px; color: #f00; font-size: 12px"
|
|
|
+ >( {{ item.policyRemark }} )</span>
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -854,7 +858,7 @@ export default {
|
|
|
handler(newValue, oldValue) {
|
|
|
if (newValue && newValue.length) {
|
|
|
newValue.forEach((item, index) => {
|
|
|
- this.goodsList[index].policyConditionId = this.policyConditionId
|
|
|
+ this.goodsList[index].policyConditionId = this.policyConditionId || this.goodsList[index].policyConditionId
|
|
|
if (this.correspondId) {
|
|
|
this.goodsList[index].correspondName = this.correspondName
|
|
|
this.goodsList[index].correspondId = this.correspondId
|
|
@@ -1052,10 +1056,13 @@ export default {
|
|
|
this.screenForm.policyId = this.policyId
|
|
|
if (this.listItem) {
|
|
|
this.policyConditionId = data[0].id
|
|
|
+ console.log('edit', this.policyConditionId);
|
|
|
+
|
|
|
}
|
|
|
} else {
|
|
|
this.screenForm.policyId = data[0].policyId
|
|
|
this.policyConditionId = data[0].id
|
|
|
+ console.log('xinz', this.policyConditionId);
|
|
|
}
|
|
|
|
|
|
for (let i = 0; i < this.popArr.length; i++) {
|
|
@@ -1094,6 +1101,7 @@ export default {
|
|
|
|
|
|
this.screenForm.policyId = data.policyId
|
|
|
this.policyConditionId = data.id
|
|
|
+ console.log('获取条件相对应的比列', this.policyConditionId );
|
|
|
},
|
|
|
async handleGetPolicyList() {
|
|
|
const { data } = await policyList({
|
|
@@ -1254,7 +1262,7 @@ export default {
|
|
|
* @param {String} index - 索引值
|
|
|
* @return Boolean
|
|
|
*/
|
|
|
- selectable: function (row, index) {
|
|
|
+ selectable: function(row, index) {
|
|
|
// row.disabled == undefined 才能被选中
|
|
|
if (row.disabled == undefined) {
|
|
|
return true
|
|
@@ -1270,7 +1278,7 @@ export default {
|
|
|
* @param {String} index - 索引值
|
|
|
* @return Boolean
|
|
|
*/
|
|
|
- selectable2: function (row, index) {
|
|
|
+ selectable2: function(row, index) {
|
|
|
// row.disabled == undefined 才能被选中
|
|
|
if (row.disabled == undefined) {
|
|
|
return true
|
|
@@ -1872,7 +1880,7 @@ export default {
|
|
|
this.goodsList.forEach(k => {
|
|
|
delete k.userList
|
|
|
})
|
|
|
- let hasCustomerWalletId = this.goodsList.find((k, i) => {
|
|
|
+ const hasCustomerWalletId = this.goodsList.find((k, i) => {
|
|
|
if (!k.customerWalletId) {
|
|
|
this.$errorMsg(`第${i + 1}货品没现金钱包`)
|
|
|
return true
|
|
@@ -1905,6 +1913,7 @@ export default {
|
|
|
this.goBack()
|
|
|
})
|
|
|
} else {
|
|
|
+ console.log('添加成功',this.policyConditionId);
|
|
|
params.retailOrderItemList.forEach(k => {
|
|
|
k.id = null
|
|
|
k.policyConditionId = this.policyConditionId
|