|
@@ -75,7 +75,7 @@
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24" :sm="12" :lg="12">
|
|
<el-col :span="24" :sm="12" :lg="12">
|
|
<el-form-item label="是否直调" prop="isAllDirect">
|
|
<el-form-item label="是否直调" prop="isAllDirect">
|
|
- <el-checkbox v-model="mainForm.isAllDirect">{{ mainForm.isAllDirect ? '是' : '否' }}</el-checkbox>
|
|
|
|
|
|
+ <el-checkbox v-model="mainForm.isAllDirect" @change="handleCheckbox">{{ mainForm.isAllDirect ? '是' : '否' }}</el-checkbox>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<!-- <el-col :span="24" :sm="12" :lg="12" >-->
|
|
<!-- <el-col :span="24" :sm="12" :lg="12" >-->
|
|
@@ -865,8 +865,10 @@ export default {
|
|
handler(newValue, oldValue) {
|
|
handler(newValue, oldValue) {
|
|
if (newValue && newValue.length) {
|
|
if (newValue && newValue.length) {
|
|
newValue.forEach((item, index) => {
|
|
newValue.forEach((item, index) => {
|
|
- if (this.mainForm.isAllDirect) {
|
|
|
|
- this.$set(this.goodsList[index], 'isDirectTransfer', true)
|
|
|
|
|
|
+ if (newValue.every(k => k.isDirectTransfer === true)) {
|
|
|
|
+ this.mainForm.isAllDirect = true
|
|
|
|
+ } else {
|
|
|
|
+ this.mainForm.isAllDirect = false
|
|
}
|
|
}
|
|
if (this.policyConditionId) {
|
|
if (this.policyConditionId) {
|
|
this.$set(this.goodsList[index], 'policyConditionId', this.policyConditionId || this.goodsList[index].policyConditionId)
|
|
this.$set(this.goodsList[index], 'policyConditionId', this.policyConditionId || this.goodsList[index].policyConditionId)
|
|
@@ -910,6 +912,11 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
|
+ handleCheckbox(e) {
|
|
|
|
+ this.goodsList.forEach(k => {
|
|
|
|
+ this.$set(k, 'isDirectTransfer', e)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
blurQty(e, row) {
|
|
blurQty(e, row) {
|
|
if (!e) {
|
|
if (!e) {
|
|
this.$set(row, 'qty', 1)
|
|
this.$set(row, 'qty', 1)
|
|
@@ -1073,13 +1080,12 @@ export default {
|
|
this.screenForm.policyId = this.policyId
|
|
this.screenForm.policyId = this.policyId
|
|
if (this.listItem) {
|
|
if (this.listItem) {
|
|
this.policyConditionId = data[0].id
|
|
this.policyConditionId = data[0].id
|
|
- console.log('edit', this.policyConditionId);
|
|
|
|
-
|
|
|
|
|
|
+ console.log('edit', this.policyConditionId)
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
this.screenForm.policyId = data[0].policyId
|
|
this.screenForm.policyId = data[0].policyId
|
|
this.policyConditionId = data[0].id
|
|
this.policyConditionId = data[0].id
|
|
- console.log('xinz', this.policyConditionId);
|
|
|
|
|
|
+ console.log('xinz', this.policyConditionId)
|
|
}
|
|
}
|
|
|
|
|
|
for (let i = 0; i < this.popArr.length; i++) {
|
|
for (let i = 0; i < this.popArr.length; i++) {
|
|
@@ -1118,7 +1124,7 @@ export default {
|
|
|
|
|
|
this.screenForm.policyId = data.policyId
|
|
this.screenForm.policyId = data.policyId
|
|
this.policyConditionId = data.id
|
|
this.policyConditionId = data.id
|
|
- console.log('获取条件相对应的比列', this.policyConditionId );
|
|
|
|
|
|
+ console.log('获取条件相对应的比列', this.policyConditionId)
|
|
},
|
|
},
|
|
async handleGetPolicyList() {
|
|
async handleGetPolicyList() {
|
|
const { data } = await policyList({
|
|
const { data } = await policyList({
|
|
@@ -1931,7 +1937,7 @@ export default {
|
|
this.goBack()
|
|
this.goBack()
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
- console.log('添加成功',this.policyConditionId);
|
|
|
|
|
|
+ console.log('添加成功', this.policyConditionId)
|
|
params.retailOrderItemList.forEach(k => {
|
|
params.retailOrderItemList.forEach(k => {
|
|
k.id = null
|
|
k.id = null
|
|
k.policyConditionId = this.policyConditionId
|
|
k.policyConditionId = this.policyConditionId
|