|
|
@ -292,6 +292,28 @@
|
|
|
|
</JnpfAreaSelect>
|
|
|
|
</JnpfAreaSelect>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column label="销售合同编号" prop="saleContractNo" width="180">
|
|
|
|
|
|
|
|
<template slot="header" v-if="false">
|
|
|
|
|
|
|
|
<span class="required-sign">*</span>销售合同编号
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
|
|
<JnpfInput v-model="scope.row.saleContractNo"
|
|
|
|
|
|
|
|
@change="changeData('voucherproduct-remark',scope.$index)" placeholder="请输入"
|
|
|
|
|
|
|
|
clearable :style='{"width":"100%"}'>
|
|
|
|
|
|
|
|
</JnpfInput>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column label="销售额" prop="saleAmount" width="180">
|
|
|
|
|
|
|
|
<template slot="header" v-if="false">
|
|
|
|
|
|
|
|
<span class="required-sign">*</span>销售额
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
|
|
<JnpfInput v-model="scope.row.saleAmount"
|
|
|
|
|
|
|
|
@change="changeData('voucherproduct-remark',scope.$index)" placeholder="请输入"
|
|
|
|
|
|
|
|
clearable :style='{"width":"100%"}'>
|
|
|
|
|
|
|
|
</JnpfInput>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="操作" width="50">
|
|
|
|
<el-table-column label="操作" width="50">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<el-button size="mini" type="text" class="JNPF-table-delBtn"
|
|
|
|
<el-button size="mini" type="text" class="JNPF-table-delBtn"
|
|
|
@ -533,7 +555,6 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.dataForm = voucherInfo
|
|
|
|
this.dataForm = voucherInfo
|
|
|
|
this.dataForm.voucherProductBatchList = voucherInfo.voucherProductList
|
|
|
|
this.dataForm.voucherProductBatchList = voucherInfo.voucherProductList
|
|
|
|
this.dataForm.isSaleDeliveryVoucherSource = voucherInfo.id
|
|
|
|
|
|
|
|
this.dataForm.supplierId = voucherInfo.customerId
|
|
|
|
this.dataForm.supplierId = voucherInfo.customerId
|
|
|
|
this.dataForm.customerId = ''
|
|
|
|
this.dataForm.customerId = ''
|
|
|
|
this.dataForm.preparationTime = new Date()
|
|
|
|
this.dataForm.preparationTime = new Date()
|
|
|
@ -621,6 +642,10 @@ export default {
|
|
|
|
let isOk = true;
|
|
|
|
let isOk = true;
|
|
|
|
for (let i = 0; i < this.dataForm.voucherProductBatchList.length; i++) {
|
|
|
|
for (let i = 0; i < this.dataForm.voucherProductBatchList.length; i++) {
|
|
|
|
const e = this.dataForm.voucherProductBatchList[i];
|
|
|
|
const e = this.dataForm.voucherProductBatchList[i];
|
|
|
|
|
|
|
|
var tareWeight = e.tareWeight;//皮重
|
|
|
|
|
|
|
|
var grossWeight = e.grossWeight;//毛重
|
|
|
|
|
|
|
|
var buckleWeight = e.buckleWeight;//扣重
|
|
|
|
|
|
|
|
var netWeight = e.netWeight;//净重
|
|
|
|
if (!e.productId) {
|
|
|
|
if (!e.productId) {
|
|
|
|
this.$message({
|
|
|
|
this.$message({
|
|
|
|
message: '商品名称不能为空',
|
|
|
|
message: '商品名称不能为空',
|
|
|
@ -675,12 +700,36 @@ export default {
|
|
|
|
isOk = false
|
|
|
|
isOk = false
|
|
|
|
break
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (grossWeight < this.jnpf.floatAdd(this.jnpf.floatAdd(tareWeight, buckleWeight), netWeight)) {
|
|
|
|
|
|
|
|
this.$message({
|
|
|
|
|
|
|
|
message: '毛重不得小于皮重+扣重+净重',
|
|
|
|
|
|
|
|
type: 'error',
|
|
|
|
|
|
|
|
duration: 1000
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
isOk = false
|
|
|
|
|
|
|
|
break
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (buckleWeight >= netWeight) {
|
|
|
|
|
|
|
|
this.$message({
|
|
|
|
|
|
|
|
message: '扣重不得大于净重',
|
|
|
|
|
|
|
|
type: 'error',
|
|
|
|
|
|
|
|
duration: 1000
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
isOk = false
|
|
|
|
|
|
|
|
break
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (buckleWeight >= grossWeight) {
|
|
|
|
|
|
|
|
this.$message({
|
|
|
|
|
|
|
|
message: '扣重不得大于毛重',
|
|
|
|
|
|
|
|
type: 'error',
|
|
|
|
|
|
|
|
duration: 1000
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
isOk = false
|
|
|
|
|
|
|
|
break
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return isOk;
|
|
|
|
return isOk;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// goBack() {
|
|
|
|
|
|
|
|
// this.$emit('refresh')
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
clearData() {
|
|
|
|
clearData() {
|
|
|
|
this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll))
|
|
|
|
this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll))
|
|
|
|
},
|
|
|
|
},
|
|
|
|