|
@@ -31,14 +31,14 @@
|
|
|
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="商品分类" prop="cat_info">
|
|
|
+ <el-form-item label="商品分类" prop="cat_id">
|
|
|
<company-sort
|
|
|
- :value="ruleForm.cat_info"
|
|
|
+ :value="ruleForm.cat_id"
|
|
|
:placeholder="'商品分类'"
|
|
|
:disabled="id !== '003'"
|
|
|
:size="'mini'"
|
|
|
:company-no="ruleForm.companyNo"
|
|
|
- :names="cat_info_name"
|
|
|
+ :names="cat_id_name"
|
|
|
:is-detail="type !== 'add'"
|
|
|
@searchChange="goods_class_change"
|
|
|
/>
|
|
@@ -94,13 +94,13 @@
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="购买方公司" label-width="100px" prop="customerNo">
|
|
|
+ <el-form-item label="购买方公司" label-width="100px" prop="khNo">
|
|
|
<search-customer
|
|
|
size="mini"
|
|
|
- :names="customerName"
|
|
|
+ :names="khName"
|
|
|
:disabled="id !== '003'"
|
|
|
:is-detail="type !== 'add'"
|
|
|
- :value="ruleForm.customerNo"
|
|
|
+ :value="ruleForm.khNo"
|
|
|
placeholder="购买方公司"
|
|
|
@searchChange="handleCustomerChange"
|
|
|
/>
|
|
@@ -203,9 +203,9 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="商品名称" prop="good_name">
|
|
|
+ <el-form-item label="商品名称" prop="goodName">
|
|
|
<el-input
|
|
|
- v-model="ruleForm.good_name"
|
|
|
+ v-model="ruleForm.goodName"
|
|
|
placeholder="商品名称"
|
|
|
maxlength="50"
|
|
|
:disabled="id !== '003'"
|
|
@@ -216,9 +216,9 @@
|
|
|
|
|
|
<el-row>
|
|
|
<el-col :span="6">
|
|
|
- <el-form-item label="数量" prop="good_num" label-width="60px">
|
|
|
+ <el-form-item label="数量" prop="goodNum" label-width="60px">
|
|
|
<el-input-number
|
|
|
- v-model="ruleForm.good_num"
|
|
|
+ v-model="ruleForm.goodNum"
|
|
|
:disabled="id !== '003'"
|
|
|
style="width: 100%"
|
|
|
controls-position="right"
|
|
@@ -229,40 +229,43 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
-
|
|
|
<el-col :span="6">
|
|
|
- <el-form-item label="销售单价" prop="sale_price">
|
|
|
+ <el-form-item label="销售总额" prop="sale_total">
|
|
|
+ <!-- <el-input v-model="ruleForm.sale_total" placeholder="销售总额">
|
|
|
+ <template #append>元</template>
|
|
|
+ </el-input> -->
|
|
|
<el-input-number
|
|
|
- v-model="ruleForm.sale_price"
|
|
|
+ v-model="ruleForm.sale_total"
|
|
|
:disabled="id !== '003'"
|
|
|
style="width: 100%"
|
|
|
controls-position="right"
|
|
|
- placeholder="单价"
|
|
|
+ placeholder="销售总额"
|
|
|
:precision="2"
|
|
|
:min="0"
|
|
|
:step="0.01"
|
|
|
- @change="number_change($event, 1)"
|
|
|
+ @change="number_change_total($event, 'sale_total')"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+
|
|
|
<el-col :span="6">
|
|
|
- <el-form-item label="采购单价" prop="cgd_price">
|
|
|
+ <el-form-item label="采购总额" prop="cgd_total">
|
|
|
<el-input-number
|
|
|
- v-model="ruleForm.cgd_price"
|
|
|
+ v-model="ruleForm.cgd_total"
|
|
|
+ :disabled="id !== '003'"
|
|
|
style="width: 100%"
|
|
|
- :disabled="id === '007'"
|
|
|
controls-position="right"
|
|
|
- placeholder="采购单价"
|
|
|
+ placeholder="采购总额"
|
|
|
:precision="2"
|
|
|
:min="0"
|
|
|
:step="0.01"
|
|
|
- @change="number_change($event, 1)"
|
|
|
+ @change="number_change_total($event, 'cgd_total')"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="采购毛利率" label-width="100px" prop="cgd_tax">
|
|
|
- <el-input-number
|
|
|
+ <!-- <el-input-number
|
|
|
v-model="ruleForm.cgd_tax"
|
|
|
style="width: 100%"
|
|
|
:disabled="id === '007'"
|
|
@@ -273,29 +276,66 @@
|
|
|
:max="100"
|
|
|
:step="0.01"
|
|
|
@change="number_change($event, 2)"
|
|
|
+ /> -->
|
|
|
+ <digital-input
|
|
|
+ :values="ruleForm.cgd_tax"
|
|
|
+ :placeholder="'采购毛利率'"
|
|
|
+ :min="0"
|
|
|
+ :max="100"
|
|
|
+ :disabled="id === '007'"
|
|
|
+ :position="'right'"
|
|
|
+ :precision="2"
|
|
|
+ :size="'mini'"
|
|
|
+ :controls="false"
|
|
|
+ :append="'%'"
|
|
|
+ @reschange="number_change($event, 2)"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="6">
|
|
|
- <el-form-item label="单位" prop="good_unit" label-width="60px">
|
|
|
+ <el-form-item label="单位" prop="goodUnit" label-width="60px">
|
|
|
<search-unit
|
|
|
+ :value="ruleForm.goodUnit"
|
|
|
disabled
|
|
|
- :value="ruleForm.good_unit"
|
|
|
:size="'mini'"
|
|
|
- :is-detail="true"
|
|
|
+ :is-detail="type !== 'add'"
|
|
|
:names="unit_name"
|
|
|
- :placeholder="'good_unit'"
|
|
|
+ :placeholder="'单位'"
|
|
|
@searchChange="unitsearchChange"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+
|
|
|
<el-col :span="6">
|
|
|
- <el-form-item label="销售总额" prop="good_total">
|
|
|
- <el-input v-model="ruleForm.good_total" placeholder="销售总额" disabled>
|
|
|
- <template #append>元</template>
|
|
|
- </el-input>
|
|
|
+ <el-form-item label="销售单价" prop="goodPrice">
|
|
|
+ <el-input-number
|
|
|
+ v-model="ruleForm.goodPrice"
|
|
|
+ :disabled="id !== '003'"
|
|
|
+ style="width: 100%"
|
|
|
+ controls-position="right"
|
|
|
+ placeholder="单价"
|
|
|
+ :precision="2"
|
|
|
+ :min="0"
|
|
|
+ :step="0.01"
|
|
|
+ @change="number_change($event, 1)"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="采购单价" prop="cgdPrice">
|
|
|
+ <el-input-number
|
|
|
+ v-model="ruleForm.cgdPrice"
|
|
|
+ style="width: 100%"
|
|
|
+ :disabled="id === '007'"
|
|
|
+ controls-position="right"
|
|
|
+ placeholder="采购单价"
|
|
|
+ :precision="2"
|
|
|
+ :min="0"
|
|
|
+ :step="0.01"
|
|
|
+ @change="number_change($event, 1)"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
@@ -329,33 +369,34 @@
|
|
|
</el-dialog>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import asyncRequest from '@/apis/service/netOrderEntry/prestoreRecordingOrders'
|
|
|
+import asyncRequest from '@/apis/service/netOrderEntry/netOrderEnter'
|
|
|
import companyHelper from '@/mixins/companyHelper'
|
|
|
import { accMul, accDiv, accSub, isPhone, isMobile } from '@/utils/validate'
|
|
|
import resToken from '@/mixins/resToken'
|
|
|
|
|
|
const defaultData = {
|
|
|
addr_code: [],
|
|
|
- cgd_price: '',
|
|
|
+ cgd_total: '',
|
|
|
+ cgdPrice: '',
|
|
|
// buyerid: "",
|
|
|
// buyer_name: "",
|
|
|
platform_id: '',
|
|
|
cgd_tax: '',
|
|
|
workCode: '',
|
|
|
poCode: '',
|
|
|
- customerNo: '',
|
|
|
+ khNo: '',
|
|
|
companyNo: '',
|
|
|
contactor: '',
|
|
|
mobile: '',
|
|
|
addr: '',
|
|
|
sendtime: '',
|
|
|
supplierNo: '',
|
|
|
- cat_info: '',
|
|
|
- good_name: '',
|
|
|
- good_num: '',
|
|
|
- sale_price: '',
|
|
|
- good_total: '',
|
|
|
- good_unit: '',
|
|
|
+ cat_id: '',
|
|
|
+ goodName: '',
|
|
|
+ goodNum: '',
|
|
|
+ goodPrice: '',
|
|
|
+ sale_total: '',
|
|
|
+ goodUnit: '',
|
|
|
tax: ''
|
|
|
}
|
|
|
|
|
@@ -380,9 +421,9 @@ export default {
|
|
|
loading: false,
|
|
|
detailLoading: false,
|
|
|
title: '添加销售订单信息',
|
|
|
- customerName: '',
|
|
|
+ khName: '',
|
|
|
accounts: [],
|
|
|
- cat_info_name: '',
|
|
|
+ cat_id_name: '',
|
|
|
showModelThis: this.showModel,
|
|
|
pickerOptions: {
|
|
|
disabledDate: (time) => time.getTime() > new Date()
|
|
@@ -393,10 +434,10 @@ export default {
|
|
|
ruleForm: { ...defaultData },
|
|
|
rulesThis: this.rules,
|
|
|
rules: {
|
|
|
- good_unit: [
|
|
|
+ goodUnit: [
|
|
|
{
|
|
|
required: true,
|
|
|
- message: '请选择good_unit',
|
|
|
+ message: '请选择单位',
|
|
|
trigger: 'blur'
|
|
|
}
|
|
|
],
|
|
@@ -423,7 +464,7 @@ export default {
|
|
|
trigger: 'blur'
|
|
|
}
|
|
|
],
|
|
|
- cat_info: [
|
|
|
+ cat_id: [
|
|
|
{
|
|
|
required: true,
|
|
|
message: '请选择商品分类',
|
|
@@ -445,7 +486,7 @@ export default {
|
|
|
trigger: 'blur'
|
|
|
}
|
|
|
],
|
|
|
- good_total: [
|
|
|
+ sale_total: [
|
|
|
{
|
|
|
required: true,
|
|
|
message: '请输入货款总金额',
|
|
@@ -466,7 +507,7 @@ export default {
|
|
|
trigger: 'blur'
|
|
|
}
|
|
|
],
|
|
|
- customerNo: [
|
|
|
+ khNo: [
|
|
|
{
|
|
|
type: 'array',
|
|
|
required: true,
|
|
@@ -518,41 +559,52 @@ export default {
|
|
|
}
|
|
|
],
|
|
|
|
|
|
- good_name: [
|
|
|
+ goodName: [
|
|
|
{
|
|
|
required: true,
|
|
|
message: '请输入商品名称',
|
|
|
trigger: 'blur'
|
|
|
}
|
|
|
],
|
|
|
- sale_price: [
|
|
|
+ goodPrice: [
|
|
|
{
|
|
|
required: true,
|
|
|
message: '请输入销售单价',
|
|
|
trigger: 'blur'
|
|
|
}
|
|
|
],
|
|
|
- cgd_price: [
|
|
|
+ cgdPrice: [
|
|
|
{
|
|
|
required: true,
|
|
|
message: '请选择采购单价',
|
|
|
trigger: 'blur'
|
|
|
}
|
|
|
],
|
|
|
- good_num: [
|
|
|
+ goodNum: [
|
|
|
{
|
|
|
required: true,
|
|
|
message: '请输入数量',
|
|
|
trigger: 'blur'
|
|
|
}
|
|
|
+ ],
|
|
|
+ cgd_total: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: '请输入采购总额',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
]
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
totalWatchSource() {
|
|
|
- const { good_num, sale_price } = this.ruleForm
|
|
|
- return { good_num, sale_price }
|
|
|
+ const { goodNum, goodPrice } = this.ruleForm
|
|
|
+ return { goodNum, goodPrice }
|
|
|
+ },
|
|
|
+ cgdTotalWatchSource() {
|
|
|
+ const { goodNum, cgdPrice } = this.ruleForm
|
|
|
+ return { goodNum, cgdPrice }
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -568,13 +620,24 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
totalWatchSource: {
|
|
|
- handler({ sale_price, good_num }) {
|
|
|
- if (sale_price === 0 || good_num === 0) {
|
|
|
- this.ruleForm.good_total = 0
|
|
|
+ handler({ goodPrice, goodNum }) {
|
|
|
+ if (goodPrice === 0 || goodNum === 0) {
|
|
|
+ this.ruleForm.sale_total = 0
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- this.ruleForm.good_total = accMul(sale_price, good_num)
|
|
|
+ this.ruleForm.sale_total = accMul(goodPrice, goodNum)
|
|
|
+ },
|
|
|
+ deep: true
|
|
|
+ },
|
|
|
+ cgdTotalWatchSource: {
|
|
|
+ handler({ cgdPrice, goodNum }) {
|
|
|
+ if (cgdPrice === 0 || goodNum === 0) {
|
|
|
+ this.ruleForm.cgd_total = 0
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ this.ruleForm.cgd_total = accMul(cgdPrice, goodNum)
|
|
|
},
|
|
|
deep: true
|
|
|
}
|
|
@@ -590,30 +653,32 @@ export default {
|
|
|
this.$refs.ruleForm.validateField('addr_code')
|
|
|
},
|
|
|
number_change(e, type) {
|
|
|
- console.log(1111)
|
|
|
- const { cgd_price, sale_price, cgd_tax } = this.ruleForm
|
|
|
+ this.ruleForm.cgd_tax = e
|
|
|
+ const { cgdPrice, goodPrice, cgd_tax } = this.ruleForm
|
|
|
let tax = 0
|
|
|
- let cgd_price1 = 0
|
|
|
+ let cgd_price = 0
|
|
|
|
|
|
if (type === 1) {
|
|
|
- // tax = (1 - cgd_price / sale_price)*100
|
|
|
- tax = accMul(accSub(1, accDiv(cgd_price, sale_price)), 100)
|
|
|
+ // tax = (1 - cgdPrice / goodPrice)*100
|
|
|
+ tax = accMul(accSub(1, accDiv(cgdPrice, goodPrice)), 100)
|
|
|
this.ruleForm.cgd_tax = tax
|
|
|
this.$refs.ruleForm.validateField('cgd_tax')
|
|
|
- console.log(type, tax)
|
|
|
}
|
|
|
if (type === 2) {
|
|
|
- // cgd_price = (100 - cgd_tax) * sale_price;
|
|
|
- cgd_price1 = accMul(accDiv(100, cgd_tax), sale_price)
|
|
|
- this.ruleForm.cgd_price = cgd_price1
|
|
|
- this.$refs.ruleForm.validateField('cgd_price')
|
|
|
- console.log(type, cgd_tax)
|
|
|
+ // cgd_price = ((100 - cgd_tax) / 100) * goodPrice;
|
|
|
+ cgd_price = accMul(accDiv(accSub(100, cgd_tax), 100), goodPrice) || 0
|
|
|
+ this.ruleForm.cgdPrice = cgd_price
|
|
|
+ this.$refs.ruleForm.validateField('cgdPrice')
|
|
|
}
|
|
|
+
|
|
|
+ // if (this.ruleForm.cgdPrice && this.ruleForm.goodPrice) {
|
|
|
+ // this.ruleForm['cgd_tax'] = accMul(accDiv(this.ruleForm.cgdPrice, this.ruleForm.goodPrice), 100) || 0
|
|
|
+ // }
|
|
|
},
|
|
|
handleClose() {
|
|
|
this.showModelThis = false
|
|
|
this.companyName = ''
|
|
|
- this.customerName = ''
|
|
|
+ this.khName = ''
|
|
|
this.supplierName = ''
|
|
|
this.ruleForm = { ...defaultData }
|
|
|
},
|
|
@@ -628,7 +693,7 @@ export default {
|
|
|
this.title = '修改销售订单信息'
|
|
|
this.rulesThis = this.rules
|
|
|
} else {
|
|
|
- this.title = '订单预存录单详情'
|
|
|
+ this.title = '销售订单信息详情'
|
|
|
this.rulesThis = {}
|
|
|
}
|
|
|
await this.resetForm()
|
|
@@ -640,26 +705,25 @@ export default {
|
|
|
this.$refs.ruleForm.validateField('companyNo')
|
|
|
},
|
|
|
handleCustomerChange(e) {
|
|
|
- this.ruleForm.customerNo = e.code ? [e.code] : ''
|
|
|
- this.$refs.ruleForm.validateField('customerNo')
|
|
|
+ this.ruleForm.khNo = e.code ? [e.code] : ''
|
|
|
+ this.$refs.ruleForm.validateField('khNo')
|
|
|
},
|
|
|
handleSupplierChange(e) {
|
|
|
this.ruleForm.supplierNo = e.code ? [e.code] : ''
|
|
|
this.$refs.ruleForm.validateField('supplierNo')
|
|
|
},
|
|
|
handleGoodClassChange(e) {
|
|
|
- this.ruleForm.cat_info = e
|
|
|
- this.$refs.ruleForm.validateField('cat_info')
|
|
|
+ this.ruleForm.cat_id = e
|
|
|
+ this.$refs.ruleForm.validateField('cat_id')
|
|
|
},
|
|
|
handleTaxChange(e) {
|
|
|
this.ruleForm.tax = e
|
|
|
this.$refs.ruleForm.validateField('tax')
|
|
|
},
|
|
|
unitsearchChange(e) {
|
|
|
- console.log(e)
|
|
|
const { id, code, label } = e
|
|
|
- this.ruleForm.good_unit = code ? [code] : []
|
|
|
- this.$refs.ruleForm.validateField('good_unit')
|
|
|
+ this.ruleForm.goodUnit = code ? [code] : []
|
|
|
+ this.$refs.ruleForm.validateField('goodUnit')
|
|
|
},
|
|
|
async resetForm() {
|
|
|
// 重置
|
|
@@ -677,45 +741,54 @@ export default {
|
|
|
|
|
|
if (this.id !== '003') this.getDetail()
|
|
|
},
|
|
|
+ number_change_total(current, prop) {
|
|
|
+ const isCgdTotal = prop === 'cgd_total'
|
|
|
+ const { goodNum } = this.ruleForm
|
|
|
+ this.ruleForm[isCgdTotal ? 'cgdPrice' : 'goodPrice'] = accDiv(current, goodNum)
|
|
|
+ this.ruleForm[prop] = current
|
|
|
+
|
|
|
+ let tax = 0
|
|
|
+ tax = accMul(accSub(1, accDiv(this.ruleForm.cgd_total, this.ruleForm.sale_total)), 100)
|
|
|
+ this.ruleForm.cgd_tax = tax
|
|
|
+ // if (this.ruleForm.cgd_total && this.ruleForm.sale_total) {
|
|
|
+ // this.ruleForm['cgd_tax'] = accMul(accDiv(this.ruleForm.cgd_total, this.ruleForm.sale_total), 100) || 0
|
|
|
+ // }
|
|
|
+ },
|
|
|
async getDetail() {
|
|
|
this.detailLoading = true
|
|
|
- const { interNo } = this.sitem
|
|
|
- const { data } = await asyncRequest.detail({ interNo })
|
|
|
+ const { orderCode } = this.sitem
|
|
|
+ const { data } = await asyncRequest.detail({ orderCode })
|
|
|
|
|
|
const {
|
|
|
- cat_info,
|
|
|
+ cat_id,
|
|
|
buyerid,
|
|
|
- customerNo,
|
|
|
+ khNo,
|
|
|
supplierNo,
|
|
|
- supplierName,
|
|
|
- customerName,
|
|
|
- good_unit,
|
|
|
- good_tax,
|
|
|
+ supplierNanme,
|
|
|
+ khName,
|
|
|
+ goodUnit,
|
|
|
+ tax,
|
|
|
addr_code,
|
|
|
- unit_name,
|
|
|
+ unitName,
|
|
|
...rest
|
|
|
} = data
|
|
|
|
|
|
- console.log(data)
|
|
|
-
|
|
|
this.ruleForm = {
|
|
|
...rest,
|
|
|
buyerid: buyerid ? [buyerid] : [],
|
|
|
addr_code: addr_code ? addr_code.split(',') : [],
|
|
|
- cat_info: cat_info ? [cat_info[cat_info.length - 1]] : [],
|
|
|
+ cat_id: cat_id ? [cat_id[cat_id.length - 1]] : [],
|
|
|
supplierNo: supplierNo ? [supplierNo] : [],
|
|
|
- customerNo: customerNo ? [customerNo] : [],
|
|
|
- tax: good_tax ? Number(good_tax).toFixed(0) + '%' : '',
|
|
|
- good_unit: good_unit ? [good_unit] : ''
|
|
|
+ khNo: khNo ? [khNo] : [],
|
|
|
+ tax: tax ? tax + '%' : '',
|
|
|
+ goodUnit: goodUnit ? [goodUnit] : ''
|
|
|
}
|
|
|
|
|
|
- this.cat_info_name = cat_info.map(({ name }) => name).join('_')
|
|
|
- this.unit_name = unit_name
|
|
|
-
|
|
|
- this.customerName = customerName
|
|
|
- this.supplierName = supplierName
|
|
|
+ this.cat_id_name = cat_id.map(({ name }) => name).join('_')
|
|
|
+ this.unit_name = unitName
|
|
|
|
|
|
- console.log(this.supplierName)
|
|
|
+ this.khName = khName
|
|
|
+ this.supplierName = supplierNanme
|
|
|
this.detailLoading = false
|
|
|
},
|
|
|
platform_codesearchChange(e) {
|
|
@@ -724,10 +797,20 @@ export default {
|
|
|
this.pay_name = pay_name || ''
|
|
|
this.$refs.ruleForm.validateField('platform_id')
|
|
|
},
|
|
|
+ // async getAccounts() {
|
|
|
+ // const res = await asyncRequest.accountall(this.dataForm);
|
|
|
+ // if (res && res.code === 0 && res.data) {
|
|
|
+ // this.accounts = res.data;
|
|
|
+ // } else if (res && res.code >= 100 && res.code <= 104) {
|
|
|
+ // await this.logout();
|
|
|
+ // } else {
|
|
|
+ // this.$message.warning(res.message);
|
|
|
+ // }
|
|
|
+ // },
|
|
|
async goods_class_change(e) {
|
|
|
const { id } = e
|
|
|
- this.ruleForm.cat_info = id ? [id] : []
|
|
|
- this.$refs.ruleForm.validateField('cat_info')
|
|
|
+ this.ruleForm.cat_id = id ? [id] : []
|
|
|
+ this.$refs.ruleForm.validateField('cat_id')
|
|
|
},
|
|
|
async submitForm() {
|
|
|
await this.$refs.ruleForm.validate(async(valid) => {
|
|
@@ -739,15 +822,15 @@ export default {
|
|
|
this.loading = true
|
|
|
const model = JSON.parse(JSON.stringify(this.ruleForm))
|
|
|
model.supplierNo = model.supplierNo[0]
|
|
|
- model.customerNo = model.customerNo[0]
|
|
|
+ model.khNo = model.khNo[0]
|
|
|
model.buyerid = Array.isArray(model.buyerid) ? model.buyerid[0] : model.buyerid
|
|
|
- model.cat_info = model.cat_info ? model.cat_info[model.cat_info.length - 1] : ''
|
|
|
+ model.cat_id = model.cat_id ? model.cat_id[model.cat_id.length - 1] : ''
|
|
|
model.addr_code = model.addr_code.join(',')
|
|
|
model.tax = model.tax.split('%')[0]
|
|
|
model.pay_name = this.pay_name
|
|
|
- model.good_unit = Array.isArray(model.good_unit)
|
|
|
- ? model.good_unit[0]
|
|
|
- : model.good_unit
|
|
|
+ model.goodUnit = Array.isArray(model.goodUnit)
|
|
|
+ ? model.goodUnit[0]
|
|
|
+ : model.goodUnit
|
|
|
|
|
|
let res = {}
|
|
|
if (this.id === '003') {
|