|
@@ -7,9 +7,9 @@
|
|
|
</el-button>
|
|
|
</div>
|
|
|
<div class="add-customer-btn">
|
|
|
- <!-- <el-button class="el-button--small-yh" style="margin-right: 10px" type="primary" size="small" v-if="!editButton"-->
|
|
|
- <!-- @click="confirmEditing">编辑-->
|
|
|
- <!-- </el-button>-->
|
|
|
+ <el-button class="el-button--small-yh" style="margin-right: 10px" type="primary" size="small" v-if="!editButton"
|
|
|
+ @click="confirmEditing">编辑
|
|
|
+ </el-button>
|
|
|
<el-button class="el-button--small-yh" type="primary" size="small" @click="editCustomer">保存数据
|
|
|
</el-button>
|
|
|
<el-button class="el-button--small-yh" type="primary" size="small" v-if="form.status !== '已发货'"
|
|
@@ -37,7 +37,7 @@
|
|
|
:icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'"
|
|
|
@click="$refs.formContacts.rowEdit(row, index)">编辑
|
|
|
</el-button>
|
|
|
- <el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
|
|
|
+ <el-button icon="el-icon-delete" :size="size" :disabled="disabled || isDisabled" :type="type"
|
|
|
@click="rowDelBox(row, index, 'orderItemsList')">删除
|
|
|
</el-button>
|
|
|
</template>
|
|
@@ -107,6 +107,7 @@ export default {
|
|
|
column: [{
|
|
|
label: '客户',
|
|
|
prop: "customerId",
|
|
|
+ disabled: true,
|
|
|
type: 'select',
|
|
|
props: {
|
|
|
label: 'cname',
|
|
@@ -174,6 +175,7 @@ export default {
|
|
|
label: '收货地址',
|
|
|
prop: "recAddress",
|
|
|
type: 'select',
|
|
|
+ disabled:true,
|
|
|
props: {
|
|
|
label: 'address',
|
|
|
value: 'id'
|
|
@@ -241,6 +243,18 @@ export default {
|
|
|
{
|
|
|
name: 'sendNum',
|
|
|
type: 'sum',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'subTotalMoney',
|
|
|
+ type: 'sum',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'costprie',
|
|
|
+ type: 'sum',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'grossProfit',
|
|
|
+ type: 'sum',
|
|
|
}
|
|
|
],
|
|
|
addBtnText: "录入明细",
|
|
@@ -334,13 +348,8 @@ export default {
|
|
|
disabled: false,
|
|
|
overHidden: true,
|
|
|
width: 100
|
|
|
- }, {
|
|
|
- label: '数量',
|
|
|
- prop: 'goodsNum',
|
|
|
- overHidden: true,
|
|
|
- disabled: false,
|
|
|
- width: 100
|
|
|
- }, {
|
|
|
+ },
|
|
|
+ {
|
|
|
label: '单位',
|
|
|
prop: 'units',
|
|
|
type: "select",
|
|
@@ -356,7 +365,7 @@ export default {
|
|
|
label: '批次号',
|
|
|
prop: 'dot',
|
|
|
type: "select",
|
|
|
- disabled: false,
|
|
|
+ disabled: true,
|
|
|
allowCreate: true,
|
|
|
filterable: true,
|
|
|
dicData: [],
|
|
@@ -368,48 +377,66 @@ export default {
|
|
|
overHidden: true,
|
|
|
},
|
|
|
{
|
|
|
+ label: '数量',
|
|
|
+ prop: 'goodsNum',
|
|
|
+ overHidden: true,
|
|
|
+ disabled: false,
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
label: '价格',
|
|
|
prop: 'price',
|
|
|
overHidden: true,
|
|
|
width: 100,
|
|
|
disabled: false,
|
|
|
},
|
|
|
- // {
|
|
|
- // label: '发货数量',
|
|
|
- // prop: 'sendNum',
|
|
|
- // disabled: false,
|
|
|
- // overHidden: true,
|
|
|
- // width: 100
|
|
|
- // },
|
|
|
- // {
|
|
|
- // label: '毛利',
|
|
|
- // prop: 'grossProfit',
|
|
|
- // overHidden: true,
|
|
|
- // width: 100
|
|
|
- // },
|
|
|
- // {
|
|
|
- // label: '利润',
|
|
|
- // prop: 'profit',
|
|
|
- // overHidden: true,
|
|
|
- // width: 100
|
|
|
- // }
|
|
|
- // , {
|
|
|
- // label: '小计',
|
|
|
- // prop: 'subTotalMoney',
|
|
|
- // overHidden: true,
|
|
|
- // width: 100
|
|
|
- // }, {
|
|
|
- // label: '返利',
|
|
|
- // prop: 'thisAmount',
|
|
|
- // overHidden: true,
|
|
|
- // width: 100
|
|
|
- // },
|
|
|
- // {
|
|
|
- // label: '成本',
|
|
|
- // prop: 'costprie',
|
|
|
- // overHidden: true,
|
|
|
- // width: 100
|
|
|
- // }
|
|
|
+
|
|
|
+ {
|
|
|
+ label: '发货数量',
|
|
|
+ prop: 'sendNum',
|
|
|
+ disabled: false,
|
|
|
+ overHidden: true,
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // label: '利润',
|
|
|
+ // prop: 'profit',
|
|
|
+ // overHidden: true,
|
|
|
+ // width: 100
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ label: '小计',
|
|
|
+ prop: 'subTotalMoney',
|
|
|
+ overHidden: true,
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // label: '返利',
|
|
|
+ // prop: 'thisAmount',
|
|
|
+ // overHidden: true,
|
|
|
+ // width: 100
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ label: '成本',
|
|
|
+ prop: 'costprie',
|
|
|
+ overHidden: true,
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '毛利',
|
|
|
+ prop: 'grossProfit',
|
|
|
+ overHidden: true,
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '备注',
|
|
|
+ prop: "remarks",
|
|
|
+ overHidden: true,
|
|
|
+ width: 100,
|
|
|
+ disabled: false,
|
|
|
+
|
|
|
+ }
|
|
|
]
|
|
|
},
|
|
|
optionPaymentDetails: {},
|
|
@@ -580,12 +607,29 @@ export default {
|
|
|
console.log('res', res);
|
|
|
this.form = res.data.data
|
|
|
// console.log(this.form.businessSource);
|
|
|
+ this.form.orderItemsList.forEach((items)=>{
|
|
|
+ if(!items.subTotalMoney){
|
|
|
+ items.subTotalMoney = items.goodsNum * items.price
|
|
|
+ items.grossProfit = items.subTotalMoney - items.costprie
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
loading.close();
|
|
|
if (this.form.businessSource == "外部销售") {
|
|
|
+ console.log('外部销售');
|
|
|
+ //不能录入不能删除
|
|
|
this.$set(this.optionContactsBack, "addBtn", false)
|
|
|
+ this.isDisabled = true
|
|
|
+ this.$set(this.form,'shipType','物流')
|
|
|
+ this.$set(this.form,'receivableType','网络支付')
|
|
|
this.optionContactsBack.column.forEach(item => {
|
|
|
this.$set(item, 'disabled', true)
|
|
|
+ if(item.label == '批次号' || item.label == '备注'){
|
|
|
+ item.disabled = false
|
|
|
+ }
|
|
|
})
|
|
|
+ this['optionContacts'] = this['optionContactsBack'];
|
|
|
+ this.delColumnData(this.getColumnName(269.1), this['optionContactsBack']);
|
|
|
this.optionContactsBack.column.forEach(item => {
|
|
|
if (item.prop == 'dot') {
|
|
|
this.$set(item, disabled, false)
|
|
@@ -593,7 +637,10 @@ export default {
|
|
|
this.$set(item, disabled, true)
|
|
|
}
|
|
|
})
|
|
|
+
|
|
|
} else {
|
|
|
+ this.$set(this.form,'shipType','物流')
|
|
|
+ this.$set(this.form,'receivableType','现金')
|
|
|
this.optionContactsBack.column.forEach(item => {
|
|
|
this.$set(item, 'disabled', false)
|
|
|
})
|
|
@@ -602,7 +649,11 @@ export default {
|
|
|
item.disabled = true;
|
|
|
}
|
|
|
})
|
|
|
+ this['optionContacts'] = this['optionContactsBack'];
|
|
|
+ this.delColumnData(this.getColumnName(269.1), this['optionContactsBack']);
|
|
|
}
|
|
|
+ // this.$set(this.form.orderItemsList,'goodsNum',66)
|
|
|
+
|
|
|
}).catch(() => {
|
|
|
loading.close();
|
|
|
})
|