|
|
|
@ -31,7 +31,7 @@
|
|
|
|
|
<jnpf-form-tip-item label="制单时间" v-if="judgeShow('preparationTime')" prop="preparationTime">
|
|
|
|
|
<JnpfDatePicker v-model="dataForm.preparationTime" @change="changeData('preparationTime', -1)"
|
|
|
|
|
:startTime="dateTime(false, 1, 1, '', '')" :endTime="dateTime(false, 1, 1, '', '')" placeholder="请选择"
|
|
|
|
|
:disabled="judgeWrite('preparationTime')" clearable :style='{ "width": "100%" }' type="date"
|
|
|
|
|
:disabled="true" clearable :style='{ "width": "100%" }' type="date"
|
|
|
|
|
format="yyyy-MM-dd">
|
|
|
|
|
</JnpfDatePicker>
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
@ -58,7 +58,7 @@
|
|
|
|
|
<el-col :span="8" v-if="judgeShow('voucherPictures')">
|
|
|
|
|
<jnpf-form-tip-item label="凭证图片" v-if="judgeShow('voucherPictures')" prop="voucherPictures">
|
|
|
|
|
<JnpfUploadPoundImg v-model="dataForm.voucherPictures" @change="poundlistUploadSuccess"
|
|
|
|
|
:disabled="judgeWrite('voucherPictures')" :fileSize="10" sizeUnit="MB" :limit="9" pathType="defaultPath"
|
|
|
|
|
:disabled="judgeWrite('voucherPictures')" :fileSize="10" sizeUnit="MB" :limit="1" pathType="defaultPath"
|
|
|
|
|
:isAccount="0">
|
|
|
|
|
</JnpfUploadPoundImg>
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
@ -118,11 +118,11 @@
|
|
|
|
|
<el-table-column type="index" width="50" label="序号" align="center" />
|
|
|
|
|
<el-table-column label="商品名称" v-if="judgeShow('voucherproduct-productId')" prop="productId">
|
|
|
|
|
<template slot="header">
|
|
|
|
|
<span class="required-sign" v-if="judgeRequired('voucherproductList-productId')">*</span>商品名称
|
|
|
|
|
<span class="required-sign">*</span>商品名称
|
|
|
|
|
</template>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<JnpfPopupSelect v-model="scope.row.productId"
|
|
|
|
|
@change="changeData('voucherproduct-productId', scope.$index)" :rowIndex="scope.$index"
|
|
|
|
|
@change="productChangeData" :rowIndex="scope.$index"
|
|
|
|
|
:formData="dataForm" :templateJson="interfaceRes.voucherproductproductId" placeholder="请选择"
|
|
|
|
|
:disabled="judgeWrite('voucherproductList') || judgeWrite('voucherproductList-productId')"
|
|
|
|
|
propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog" relationField='name'
|
|
|
|
@ -216,7 +216,7 @@
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
<el-table-column label="打印时间" v-if="judgeShow('voucherproduct-printTime')" prop="printTime">
|
|
|
|
|
<!-- <el-table-column label="打印时间" v-if="judgeShow('voucherproduct-printTime')" prop="printTime">
|
|
|
|
|
<template slot="header">
|
|
|
|
|
<span class="required-sign" v-if="judgeRequired('voucherproductList-printTime')">*</span>打印时间
|
|
|
|
|
</template>
|
|
|
|
@ -229,7 +229,7 @@
|
|
|
|
|
clearable :style='{ "width": "100%" }' type="date" format="yyyy-MM-dd">
|
|
|
|
|
</JnpfDatePicker>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table-column> -->
|
|
|
|
|
<el-table-column label="操作" width="50" v-if="!judgeWrite('voucherproductList')">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button size="mini" type="text" class="JNPF-table-delBtn"
|
|
|
|
@ -237,9 +237,9 @@
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
<div class="table-actions" @click="addvoucherproductList()" v-if="!judgeWrite('voucherproductList')">
|
|
|
|
|
<!-- <div class="table-actions" @click="addvoucherproductList()" v-if="!judgeWrite('voucherproductList')">
|
|
|
|
|
<el-button type="text" icon="el-icon-plus">添加</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</div> -->
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
@ -383,7 +383,7 @@
|
|
|
|
|
<el-table-column type="index" width="50" label="序号" align="center" />
|
|
|
|
|
<el-table-column label="车牌号" v-if="judgeShow('vouchervehicle-vehicleId')" prop="vehicleId">
|
|
|
|
|
<template slot="header">
|
|
|
|
|
<span class="required-sign" v-if="judgeRequired('vouchervehicleList-vehicleId')">*</span>车牌号
|
|
|
|
|
<span class="required-sign">*</span>车牌号
|
|
|
|
|
</template>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<JnpfPopupSelect v-model="scope.row.vehicleId"
|
|
|
|
@ -398,7 +398,7 @@
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="驾驶员名称" v-if="judgeShow('vouchervehicle-driverName')" prop="driverName">
|
|
|
|
|
<template slot="header">
|
|
|
|
|
<span class="required-sign" v-if="judgeRequired('vouchervehicleList-driverName')">*</span>驾驶员名称
|
|
|
|
|
<span class="required-sign">*</span>驾驶员名称
|
|
|
|
|
</template>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<JnpfInput v-model="scope.row.driverName"
|
|
|
|
@ -554,8 +554,8 @@ export default {
|
|
|
|
|
currVmodel: "",
|
|
|
|
|
dataForm: {
|
|
|
|
|
voucherCode: undefined,
|
|
|
|
|
voucherType: undefined,
|
|
|
|
|
preparationTime: undefined,
|
|
|
|
|
voucherType: '1',
|
|
|
|
|
preparationTime: new Date(),
|
|
|
|
|
associateThirdSuppliers: undefined,
|
|
|
|
|
voucherPictures: [],
|
|
|
|
|
poundCode: undefined,
|
|
|
|
@ -796,18 +796,35 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
//凭证识别
|
|
|
|
|
poundlistUploadSuccess(val, res) {
|
|
|
|
|
console.log('已选择并传递的数据', res.data);
|
|
|
|
|
// formData.value.voucherPictures = res.path
|
|
|
|
|
|
|
|
|
|
this.dataForm.poundCode = res.data.deliveryNumber
|
|
|
|
|
this.dataForm.vehicleId = res.data.vehicleId
|
|
|
|
|
this.dataForm.supplierId = res.data.supplierId
|
|
|
|
|
this.dataForm.customerId = res.data.customerId
|
|
|
|
|
//formData.value.voucherPictures = res.crossWeight
|
|
|
|
|
this.dataForm.netWeight = res.data.netWeight
|
|
|
|
|
//formData.value.voucherPictures = res.printTime
|
|
|
|
|
this.dataForm.tareWeight = res.data.tareWeight
|
|
|
|
|
this.dataForm.voucherVehicleList.push(res.data)
|
|
|
|
|
if(res && res.data){
|
|
|
|
|
this.dataForm.poundCode = res.data.deliveryNumber
|
|
|
|
|
this.dataForm.vehicleId = res.data.vehicleId
|
|
|
|
|
this.dataForm.supplierId = res.data.supplierId
|
|
|
|
|
this.dataForm.customerId = res.data.customerId
|
|
|
|
|
if(res.data.vehicleId){
|
|
|
|
|
this.dataForm.voucherVehicleList.push(res.data)
|
|
|
|
|
}
|
|
|
|
|
let item = {
|
|
|
|
|
productId: '',
|
|
|
|
|
spec: undefined,
|
|
|
|
|
unit: undefined,
|
|
|
|
|
grossWeight: res.data.crossWeight == '' ? 0:res.data.crossWeight,
|
|
|
|
|
tareWeight: res.data.tareWeight == '' ? 0:res.data.tareWeight,
|
|
|
|
|
buckleWeight: undefined,
|
|
|
|
|
netWeight: res.data.netWeight == '' ? 0:res.data.netWeight,
|
|
|
|
|
remark: undefined,
|
|
|
|
|
printTime: undefined,
|
|
|
|
|
}
|
|
|
|
|
item.buckleWeight = this.jnpf.floatSub(this.jnpf.floatSub(item.grossWeight, item.tareWeight), item.netWeight);
|
|
|
|
|
this.dataForm.voucherProductList.push(item)
|
|
|
|
|
}else{
|
|
|
|
|
this.dataForm.poundCode = '';
|
|
|
|
|
this.dataForm.vehicleId = '';
|
|
|
|
|
this.dataForm.supplierId = '';
|
|
|
|
|
this.dataForm.customerId = '';
|
|
|
|
|
this.dataForm.voucherVehicleList = [];
|
|
|
|
|
this.dataForm.voucherProductList = [];
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
changeData(model, index) {
|
|
|
|
|
this.isEdit = false
|
|
|
|
@ -832,6 +849,9 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
productChangeData(a, b){
|
|
|
|
|
this.dataForm.voucherProductList[0].spec = b.spec
|
|
|
|
|
},
|
|
|
|
|
changeDataFormData(type, data, model, index, defaultValue) {
|
|
|
|
|
if (!this.isEdit) {
|
|
|
|
|
if (type == 2) {
|
|
|
|
@ -904,6 +924,15 @@ export default {
|
|
|
|
|
let isOk = true;
|
|
|
|
|
for (let i = 0; i < this.dataForm.voucherProductList.length; i++) {
|
|
|
|
|
const e = this.dataForm.voucherProductList[i];
|
|
|
|
|
if (!e.productId) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '商品不能为空',
|
|
|
|
|
type: 'error',
|
|
|
|
|
duration: 1000
|
|
|
|
|
});
|
|
|
|
|
isOk = false
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return isOk;
|
|
|
|
|
},
|
|
|
|
@ -911,6 +940,24 @@ export default {
|
|
|
|
|
let isOk = true;
|
|
|
|
|
for (let i = 0; i < this.dataForm.voucherVehicleList.length; i++) {
|
|
|
|
|
const e = this.dataForm.voucherVehicleList[i];
|
|
|
|
|
if (!e.vehicleId) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '车牌号不能为空',
|
|
|
|
|
type: 'error',
|
|
|
|
|
duration: 1000
|
|
|
|
|
});
|
|
|
|
|
isOk = false
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
if (!e.driverName) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '驾驶员不能为空',
|
|
|
|
|
type: 'error',
|
|
|
|
|
duration: 1000
|
|
|
|
|
});
|
|
|
|
|
isOk = false
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return isOk;
|
|
|
|
|
},
|
|
|
|
|