|
@@ -41,6 +41,7 @@
|
|
|
:value="data.value"
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
+ <el-input type="age" v-else-if="item.prop === 'orderAmount'" v-model="form[item.prop]" :disabled="item.disabled?true:false" size="small" autocomplete="off" @input="currencyChange" placeholder="请输入"></el-input>
|
|
|
<selectComponent v-else-if="item.prop === 'corpId'" v-model="form[item.prop]" :configuration="configuration"/>
|
|
|
<selectComponent v-else-if="item.prop === 'purchaserId'" v-model="form[item.prop]" :configuration="pConfiguration"/>
|
|
|
<el-select v-else-if="item.prop === 'orderType'" style="width: 100%" v-model="form[item.prop]" size="small" placeholder="请选择" clearable filterable>
|
|
@@ -71,6 +72,7 @@
|
|
|
@row-click="handleRowClick"
|
|
|
@row-update="rowUpdate"
|
|
|
@row-del="rowDel"
|
|
|
+ @saveColumn="saveColumn"
|
|
|
>
|
|
|
<template slot="priceCategory" slot-scope="{row,index}">
|
|
|
<span v-if="row.$cellEdit" class="required_fields">*</span>
|
|
@@ -86,14 +88,15 @@
|
|
|
<span v-else>{{ row.priceCategoryNames }}</span>
|
|
|
</template>
|
|
|
<template slot="itemType" slot-scope="{row,index}">
|
|
|
- <span v-if="row.$cellEdit" class="required_fields">*</span>
|
|
|
<el-select
|
|
|
v-if="row.$cellEdit"
|
|
|
v-model="row.itemType"
|
|
|
size="small"
|
|
|
style="width:90% !important;"
|
|
|
- clearable
|
|
|
filterable
|
|
|
+ allow-create
|
|
|
+ default-first-option
|
|
|
+ clearable
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="(item,index) in row.specificationList"
|
|
@@ -294,6 +297,7 @@ import {corpsattn, corpsbank, getDeptLazyTreeS} from "@/api/basicData/configura
|
|
|
import { getList } from "@/api/basicData/commodityType"
|
|
|
import { contrastObj,contrastList } from "@/util/contrastData";
|
|
|
import {getSpecification} from "@/api/exportTrade/purchaseContract";
|
|
|
+import option from "./config/mainList.json";
|
|
|
export default {
|
|
|
name: "detailsPage",
|
|
|
props: {
|
|
@@ -305,7 +309,7 @@ export default {
|
|
|
return {
|
|
|
form: {},
|
|
|
disabled: false,
|
|
|
- customerContact: customerContact,
|
|
|
+ customerContact: {},
|
|
|
contactsForm: {},
|
|
|
contactsData: [],
|
|
|
dialogVisible:false,
|
|
@@ -669,7 +673,8 @@ export default {
|
|
|
},
|
|
|
}
|
|
|
},
|
|
|
- created() {
|
|
|
+ async created() {
|
|
|
+ this.customerContact = await this.getColumnData(this.getColumnName(37), customerContact);
|
|
|
//币别
|
|
|
this.getWorkDicts("currency").then(res =>{
|
|
|
this.currencyDic = res.data.data
|
|
@@ -700,13 +705,10 @@ export default {
|
|
|
this.oldFilesList = this.deepClone(res.data.data.orderFilesList)
|
|
|
}
|
|
|
})
|
|
|
+ }else{
|
|
|
+ this.$set(this.form,"currency","人民币")
|
|
|
+ this.$set(this.form,"exchangeRate",1)
|
|
|
}
|
|
|
- //赋值去掉
|
|
|
- // else{
|
|
|
- // getSysNo("JK-CG").then(res =>{
|
|
|
- // this.$set(this.form,"sysNo", res.data.data)
|
|
|
- // })
|
|
|
- // }
|
|
|
},
|
|
|
components: {
|
|
|
feeInfo,
|
|
@@ -722,15 +724,17 @@ export default {
|
|
|
row.amount = _.multiply(row.purchaseQuantity, row.price).toFixed(2);
|
|
|
}
|
|
|
},
|
|
|
- currencyChange(value){
|
|
|
+ currencyChange(){
|
|
|
if(this.form.orderAmount){
|
|
|
- if(value === "人民币"){
|
|
|
+ if(this.form.currency === "人民币"){
|
|
|
this.form.exchangeRate = 1
|
|
|
this.form.rmbAmount = this.form.orderAmount
|
|
|
}else{
|
|
|
this.form.exchangeRate = 6.3843
|
|
|
this.form.rmbAmount = _.multiply(this.form.orderAmount, 6.3843)
|
|
|
}
|
|
|
+ }else{
|
|
|
+ this.form.rmbAmount = ""
|
|
|
}
|
|
|
},
|
|
|
//合计
|
|
@@ -777,19 +781,16 @@ export default {
|
|
|
}
|
|
|
const orderFilesList = this.$refs.uploadFile.submitData();
|
|
|
for (let j = 0; j < this.contactsData.length; j++) {
|
|
|
- if (this.contactsData[j].billNo == null) {
|
|
|
+ if (this.contactsData[j].billNo === "") {
|
|
|
return this.$message.error(`请输入采购明细第${j + 1}行的提单号`);
|
|
|
}
|
|
|
if (this.contactsData[j].priceCategory === "") {
|
|
|
return this.$message.error(`请输入采购明细第${j + 1}行的货物品种`);
|
|
|
}
|
|
|
- if (this.contactsData[j].itemType === "") {
|
|
|
- return this.$message.error(`请输入采购明细第${j + 1}行的规格型号`);
|
|
|
- }
|
|
|
if (this.contactsData[j].purchaseQuantity === "") {
|
|
|
return this.$message.error(`请输入采购明细第${j + 1}行的件数`);
|
|
|
}
|
|
|
- if (this.importInventoryData[j].purchaseQuantity === 0) {
|
|
|
+ if (this.contactsData[j].purchaseQuantity == 0) {
|
|
|
return this.$message.error(`采购明细第${j + 1}行的件数不能为0`);
|
|
|
}
|
|
|
}
|
|
@@ -1074,6 +1075,18 @@ export default {
|
|
|
this.$emit("goBack");
|
|
|
}
|
|
|
},
|
|
|
+ //列保存触发
|
|
|
+ async saveColumn() {
|
|
|
+ const inSave = await this.saveColumnData(
|
|
|
+ this.getColumnName(37),
|
|
|
+ this.customerContact
|
|
|
+ );
|
|
|
+ if (inSave) {
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ //关闭窗口
|
|
|
+ this.$refs.crud.$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|