|
|
|
@ -31,7 +31,9 @@
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" v-if="judgeShow('warehousingId')">
|
|
|
|
|
<jnpf-form-tip-item label="关联单号" v-if="judgeShow('warehousingId')" prop="warehousingId">
|
|
|
|
|
<jnpf-form-tip-item label="关联单号"
|
|
|
|
|
v-if="judgeShow('warehousingId') && dataForm.warehousingStorageType==1 "
|
|
|
|
|
prop="warehousingId">
|
|
|
|
|
<JnpfPopupSelect v-model="dataForm.warehousingId"
|
|
|
|
|
@change="changeData('warehousingId', -1)" :rowIndex="null" :formData="dataForm"
|
|
|
|
|
:templateJson="interfaceRes.warehousingId" placeholder="请选择"
|
|
|
|
@ -41,6 +43,76 @@
|
|
|
|
|
:columnOptions="warehousingIdcolumnOptions" clearable :style='{ "width": "100%" }'>
|
|
|
|
|
</JnpfPopupSelect>
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
|
|
|
|
|
<jnpf-form-tip-item label="关联单据"
|
|
|
|
|
v-if="judgeShow('warehousingId') && dataForm.warehousingStorageType==3"
|
|
|
|
|
prop="warehousingId">
|
|
|
|
|
<JnpfPopupSelect v-model="dataForm.warehousingId"
|
|
|
|
|
@change="changeData('warehousingId', -1)" :rowIndex="null" :formData="dataForm"
|
|
|
|
|
:templateJson="interfaceRes.warehousingId" placeholder="请选择"
|
|
|
|
|
:disabled="judgeWrite('warehousingId')" hasPage propsValue="id" popupWidth="800px"
|
|
|
|
|
popupTitle="选择数据" popupType="dialog" relationField='receipt_code'
|
|
|
|
|
field='warehousingId' interfaceId="550678389309073093" :pageSize="20"
|
|
|
|
|
:columnOptions="warehousingIdcolumnOptions" clearable :style='{ "width": "100%" }'>
|
|
|
|
|
</JnpfPopupSelect>
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
|
|
|
|
|
<!-- 盘点单 -->
|
|
|
|
|
<jnpf-form-tip-item label="关联盘点单"
|
|
|
|
|
v-if="judgeShow('warehousingId') && dataForm.warehousingStorageType==4"
|
|
|
|
|
prop="warehousingId">
|
|
|
|
|
<JnpfPopupSelect v-model="dataForm.warehousingId"
|
|
|
|
|
@change="changeData('warehousingId', -1)" :rowIndex="null" :formData="dataForm"
|
|
|
|
|
:templateJson="interfaceRes.warehousingId" placeholder="请选择"
|
|
|
|
|
:disabled="judgeWrite('warehousingId')" propsValue="id" popupWidth="800px"
|
|
|
|
|
popupTitle="选择数据" popupType="dialog" relationField='document_no'
|
|
|
|
|
field='warehousingId' interfaceId="550680155190748869" :pageSize="20"
|
|
|
|
|
:columnOptions="warehousingIdcolumnOptions" clearable :style='{ "width": "100%" }'>
|
|
|
|
|
</JnpfPopupSelect>
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
|
|
|
|
|
<!-- 返库单 -->
|
|
|
|
|
<jnpf-form-tip-item label="关联返库单"
|
|
|
|
|
v-if="judgeShow('warehousingId') && dataForm.warehousingStorageType==7"
|
|
|
|
|
prop="warehousingId">
|
|
|
|
|
<JnpfPopupSelect v-model="dataForm.warehousingId"
|
|
|
|
|
@change="changeData('warehousingId', -1)" :rowIndex="null" :formData="dataForm"
|
|
|
|
|
:templateJson="interfaceRes.warehousingId" placeholder="请选择"
|
|
|
|
|
:disabled="judgeWrite('warehousingId')" propsValue="id" popupWidth="800px"
|
|
|
|
|
popupTitle="选择数据" popupType="dialog" relationField='return_code'
|
|
|
|
|
field='warehousingId' interfaceId="550694157258090181" :pageSize="20"
|
|
|
|
|
:columnOptions="warehousingIdcolumnOptions" clearable :style='{ "width": "100%" }'>
|
|
|
|
|
</JnpfPopupSelect>
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
|
|
|
|
|
<!-- 加工单 -->
|
|
|
|
|
<jnpf-form-tip-item label="关联加工单"
|
|
|
|
|
v-if="judgeShow('warehousingId') && dataForm.warehousingStorageType==9"
|
|
|
|
|
prop="warehousingId">
|
|
|
|
|
<JnpfPopupSelect v-model="dataForm.warehousingId"
|
|
|
|
|
@change="changeData('warehousingId', -1)" :rowIndex="null" :formData="dataForm"
|
|
|
|
|
:templateJson="interfaceRes.warehousingId" placeholder="请选择"
|
|
|
|
|
:disabled="judgeWrite('warehousingId')" propsValue="id" popupWidth="800px"
|
|
|
|
|
popupTitle="选择数据" popupType="dialog" relationField='code' field='warehousingId'
|
|
|
|
|
interfaceId="550695385308358341" :pageSize="20"
|
|
|
|
|
:columnOptions="warehousingIdcolumnOptions" clearable :style='{ "width": "100%" }'>
|
|
|
|
|
</JnpfPopupSelect>
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
|
|
|
|
|
<!-- 采购收货单 -->
|
|
|
|
|
<jnpf-form-tip-item label="关联采购收货单"
|
|
|
|
|
v-if="judgeShow('warehousingId') && dataForm.warehousingStorageType==15"
|
|
|
|
|
prop="warehousingId">
|
|
|
|
|
<JnpfPopupSelect v-model="dataForm.warehousingId"
|
|
|
|
|
@change="changeData('warehousingId', -1)" :rowIndex="null" :formData="dataForm"
|
|
|
|
|
:templateJson="interfaceRes.warehousingId" placeholder="请选择"
|
|
|
|
|
:disabled="judgeWrite('warehousingId')" propsValue="id" popupWidth="800px"
|
|
|
|
|
popupTitle="选择数据" popupType="dialog" relationField='receipt_code'
|
|
|
|
|
field='warehousingId' interfaceId="550696600431781573" :pageSize="20"
|
|
|
|
|
:columnOptions="warehousingIdcolumnOptions" clearable :style='{ "width": "100%" }'>
|
|
|
|
|
</JnpfPopupSelect>
|
|
|
|
|
</jnpf-form-tip-item>
|
|
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" v-if="judgeShow('warehouseId')">
|
|
|
|
|
<jnpf-form-tip-item label="入库仓库" v-if="judgeShow('warehouseId')" prop="warehouseId">
|
|
|
|
@ -411,7 +483,7 @@
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
<el-table-column label="入库数量"
|
|
|
|
|
<!-- <el-table-column label="入库数量"
|
|
|
|
|
v-if="judgeShow('warehousingstorageproduct-storageNumber')" prop="storageNumber"
|
|
|
|
|
width="200" align="center">
|
|
|
|
|
|
|
|
|
@ -428,6 +500,21 @@
|
|
|
|
|
clearable :style='{ "width": "100%" }'>
|
|
|
|
|
</JnpfInput>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column> -->
|
|
|
|
|
|
|
|
|
|
<el-table-column label="入库数量"
|
|
|
|
|
v-if="judgeShow('warehousingstorageproduct-storageNumber')" prop="storageNumber"
|
|
|
|
|
width="200" align="center">
|
|
|
|
|
<template slot="header">
|
|
|
|
|
<span class="required-sign"
|
|
|
|
|
v-if="judgeRequired('warehousingstorageproductList-storageNumber')">*</span>入库数量
|
|
|
|
|
</template>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<JnpfInput v-model="scope.row.storageNumber"
|
|
|
|
|
@change="changeData('warehousingstorageproduct-storageNumber', scope.$index)"
|
|
|
|
|
placeholder="请输入" disabled clearable :style='{ "width": "100%" }'>
|
|
|
|
|
</JnpfInput>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
<el-table-column label="已入库数量"
|
|
|
|
@ -485,14 +572,14 @@
|
|
|
|
|
</JnpfDatePicker>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="操作" width="50" align="center" fixed="right"
|
|
|
|
|
<!-- <el-table-column label="操作" width="50" align="center" fixed="right"
|
|
|
|
|
v-if="!judgeWrite('warehousingstorageproductList')">
|
|
|
|
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button size="mini" type="text" class="JNPF-table-delBtn"
|
|
|
|
|
@click="delwarehousingstorageproductList(scope.$index)">删除</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table-column> -->
|
|
|
|
|
</el-table>
|
|
|
|
|
<!-- <div class="table-actions" @click="addwarehousingstorageproductList()"
|
|
|
|
|
v-if="!judgeWrite('warehousingstorageproductList')">
|
|
|
|
@ -581,7 +668,7 @@ export default {
|
|
|
|
|
currVmodel: "",
|
|
|
|
|
dataForm: {
|
|
|
|
|
documentNo: undefined,
|
|
|
|
|
warehousingStorageType: "3",
|
|
|
|
|
warehousingStorageType: "1",
|
|
|
|
|
warehousingId: undefined,
|
|
|
|
|
warehouseId: undefined,
|
|
|
|
|
warehousingTime: undefined,
|
|
|
|
@ -626,8 +713,10 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
warehousingStorageTypeOptions: [{ "fullName": "采购入库", "id": "1" }, { "fullName": "调拨入库", "id": "2" }, { "fullName": "退货入库", "id": "3" }, { "fullName": "盘盈入库", "id": "4" }, { "fullName": "其他入库", "id": "5" }, { "fullName": "差异调整入库", "id": "6" }, { "fullName": "领用返库入库", "id": "7" }, { "fullName": "货权转移入库", "id": "8" }, { "fullName": "加工入库", "id": "9" }, { "fullName": "其他出库", "id": "10" }, { "fullName": "库存初始化", "id": "11" }, { "fullName": "调拨出库撤回", "id": "12" }, { "fullName": "其他出库撤回", "id": "13" }], warehousingStorageTypeProps: { "label": "fullName", "value": "id" },
|
|
|
|
|
warehousingStorageTypeOptions: [{ "fullName": "采购入库", "id": "1" }, { "fullName": "调拨入库", "id": "2" }, { "fullName": "退货入库", "id": "3" }, { "fullName": "盘盈入库", "id": "4" }, { "fullName": "其他入库", "id": "5" }, { "fullName": "差异调整入库", "id": "6" }, { "fullName": "领用返库入库", "id": "7" }, { "fullName": "货权转移入库", "id": "8" }, { "fullName": "加工入库", "id": "9" }, { "fullName": "其他出库", "id": "10" }, { "fullName": "库存初始化", "id": "11" }, { "fullName": "调拨出库撤回", "id": "12" }, { "fullName": "其他出库撤回", "id": "13" }],
|
|
|
|
|
warehousingStorageTypeProps: { "label": "fullName", "value": "id" },
|
|
|
|
|
warehousingIdcolumnOptions: [{ "label": "通知编号", "value": "warehousing_code" }, { "label": "供应商名称", "value": "subjectName" }, { "label": "仓库名称", "value": "businessName" },],
|
|
|
|
|
warehousingIdcolumnOptions4: [{ "label": "通知编号", "value": "documentNo" }, { "label": "供应商名称", "value": "document_no" }, { "label": "仓库名称", "value": "businessName" },],
|
|
|
|
|
warehouseIdcolumnOptions: [{ "label": "仓库编号", "value": "code" }, { "label": "仓库名称", "value": "name" }, { "label": "仓库简称", "value": "simple_name" },],
|
|
|
|
|
warehousingstoragepoundlistvoucherIdcolumnOptions: [{ "label": "凭证编号", "value": "voucher_code" }, { "label": "凭证类型", "value": "documentTypes" }],
|
|
|
|
|
warehousingstorageproductproductIdcolumnOptions: [{ "label": "商品名称", "value": "name" }, { "label": "商品编码", "value": "code" }, { "label": "商品规格", "value": "spec" },],
|
|
|
|
@ -638,7 +727,8 @@ export default {
|
|
|
|
|
interfaceRes: {
|
|
|
|
|
documentNo: [],
|
|
|
|
|
warehousingStorageType: [],
|
|
|
|
|
warehousingId: [],
|
|
|
|
|
warehousingId: [{ "dataType": "varchar", "defaultValue": "", "field": "warehousingId", "fieldName": "", "id": "Kz7qu32", "jnpfKey": "billRule", "relationField": "warehousingId", "required": "0" }],
|
|
|
|
|
// warehousingId: [{ "dataType": "varchar", "defaultValue": "", "field": "warehousingId", "fieldName": "", "id": "odxww22", "jnpfKey": "popupSelect", "relationField": "warehousingId", "required": "0" }],
|
|
|
|
|
warehouseId: [],
|
|
|
|
|
warehousingTime: [],
|
|
|
|
|
remark: [],
|
|
|
|
@ -729,20 +819,15 @@ export default {
|
|
|
|
|
|
|
|
|
|
choice(val) {
|
|
|
|
|
|
|
|
|
|
if (this.dataForm.warehousingStoragePoundlistList.length >= this.dataForm.warehousingStorageProductList.length) {
|
|
|
|
|
this.$alert('凭证条数不能大于商品条数', {
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.notificationVoucherVisible = true
|
|
|
|
|
let excludeIdList = [];
|
|
|
|
|
for (let i = 0; i < this.dataForm.warehousingStoragePoundlistList.length; i++) {
|
|
|
|
|
excludeIdList.push(this.dataForm.warehousingStoragePoundlistList[i].voucherId);
|
|
|
|
|
}
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.$refs.NotificationVoucherGoodsBox.init(excludeIdList, val)
|
|
|
|
|
})
|
|
|
|
|
this.notificationVoucherVisible = true
|
|
|
|
|
let excludeIdList = [];
|
|
|
|
|
for (let i = 0; i < this.dataForm.warehousingStoragePoundlistList.length; i++) {
|
|
|
|
|
excludeIdList.push(this.dataForm.warehousingStoragePoundlistList[i].voucherId);
|
|
|
|
|
}
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.$refs.NotificationVoucherGoodsBox.init(excludeIdList, val)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
initList(list) {
|
|
|
|
|
for (let i = 0; i < list.length; i++) {
|
|
|
|
@ -862,12 +947,16 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
if (!this.warehousingstoragepoundlistExist()) return
|
|
|
|
|
if (!this.warehousingstorageproductExist()) return
|
|
|
|
|
if (!this.warehousingstorageproductExist1()) return
|
|
|
|
|
return isOk
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
warehousingstoragepoundlistExist() {
|
|
|
|
|
let isOk = true;
|
|
|
|
|
for (let i = 0; i < this.dataForm.warehousingStoragePoundlistList.length; i++) {
|
|
|
|
|
const e = this.dataForm.warehousingStoragePoundlistList[i];
|
|
|
|
|
const e = this.dataForm.warehousingStoragePoundlistList[i];//
|
|
|
|
|
if (!e.voucherId) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '关联凭证id不能为空',
|
|
|
|
@ -880,6 +969,34 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
return isOk;
|
|
|
|
|
},
|
|
|
|
|
warehousingstorageproductExist1() {
|
|
|
|
|
let isOk = true;
|
|
|
|
|
var data = JSON.parse(JSON.stringify(this.dataForm.warehousingStoragePoundlistList))
|
|
|
|
|
var echararr = [];
|
|
|
|
|
for (var i = 0; i < data.length; i++) {
|
|
|
|
|
var arrindex = echararr.findIndex((item) => { return item.productId == data[i].productId && item.unit == data[i].unit })
|
|
|
|
|
if (arrindex == -1) {
|
|
|
|
|
echararr.push(data[i]);
|
|
|
|
|
} else {
|
|
|
|
|
echararr[arrindex].netWeight = this.jnpf.floatAdd(echararr[arrindex].netWeight, data[i].netWeight)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
echararr.forEach(item => {
|
|
|
|
|
debugger
|
|
|
|
|
const flag = this.dataForm.warehousingStorageProductList.find(e => e.productId == item.productId && e.storageUnit == item.unit && e.storageNumber == item.netWeight)
|
|
|
|
|
if (!flag) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '凭证与商品不一致',
|
|
|
|
|
type: 'error',
|
|
|
|
|
duration: 1000
|
|
|
|
|
});
|
|
|
|
|
isOk = false
|
|
|
|
|
return isOk
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
return isOk
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
warehousingstorageproductExist() {
|
|
|
|
|
let isOk = true;
|
|
|
|
|
for (let i = 0; i < this.dataForm.warehousingStorageProductList.length; i++) {
|
|
|
|
|