|
|
|
|
@ -16,15 +16,15 @@
|
|
|
|
|
<el-form-item v-else prop="cargoId" class="margin-none">
|
|
|
|
|
<el-select v-model="scope.row.cargoId" filterable placeholder="请输入货物名称或商品序号" style="width: 100%" clearable
|
|
|
|
|
@change="setCargoDetail($event, scope.row)">
|
|
|
|
|
<el-option v-for="item in cargoList" :key="item.gdsSeqno" :label="item.cargoName + ' (' + item.gdsSeqno + ')'" :value="item.id" >
|
|
|
|
|
<span>{{ item.cargoName }} ({{ item.gdsSeqno }})</span>
|
|
|
|
|
<el-option v-for="item in cargoList" :key="item.gdsSeqno" :label="item.goodsName + ' (' + item.goodsCode + ')'" :value="item.id" >
|
|
|
|
|
<span>{{ item.goodsName }} ({{ item.goodsCode }})</span>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item>
|
|
|
|
|
<template slot="label">HS编号</template>
|
|
|
|
|
<div class="nomal-text">{{ scope.row.hsCode }}</div>
|
|
|
|
|
<div class="nomal-text">{{ scope.row.goodsCode }}</div>
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item>
|
|
|
|
|
<template slot="label">仓库名称<rq></rq></template>
|
|
|
|
|
@ -52,7 +52,7 @@
|
|
|
|
|
<el-form-item v-else prop="locationId" class="margin-none">
|
|
|
|
|
<el-select v-model="scope.row.locationId" filterable placeholder="请选择货位" style="width: 100%" clearable
|
|
|
|
|
@change="onLocationChange($event, scope.row)">
|
|
|
|
|
<el-option v-for="item in locationList" :key="item.id" :label="item.locationName" :value="item.id" />
|
|
|
|
|
<el-option v-for="item in locationList" :key="item.id" :label="item.storageLocationName" :value="item.id" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
@ -82,7 +82,7 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item>
|
|
|
|
|
<template slot="label">第一计量单位<rq/></template>
|
|
|
|
|
<template slot="label">第一计量单位</template>
|
|
|
|
|
<div v-if="tableReadonly" class="nomal-text">
|
|
|
|
|
<dict-tag :options="dict.type.bm_measuring_unit" :value="scope.row.firstUnit"></dict-tag>
|
|
|
|
|
</div>
|
|
|
|
|
@ -95,35 +95,35 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item>
|
|
|
|
|
<template slot="label">货物自然序号<rq></rq></template>
|
|
|
|
|
<template slot="label">货物自然序号</template>
|
|
|
|
|
<div v-if="tableReadonly" class="nomal-text">{{ scope.row.cargoNumber }}</div>
|
|
|
|
|
<el-form-item v-else prop="cargoNumber" class="margin-none">
|
|
|
|
|
<el-input v-model="scope.row.cargoNumber" placeholder="请输入货物自然序号" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item>
|
|
|
|
|
<template slot="label">商品料号<rq></rq></template>
|
|
|
|
|
<template slot="label">商品料号</template>
|
|
|
|
|
<div v-if="tableReadonly" class="nomal-text">{{ scope.row.itemNumber }}</div>
|
|
|
|
|
<el-form-item v-else prop="itemNumber" class="margin-none">
|
|
|
|
|
<el-input v-model="scope.row.itemNumber" placeholder="请输入商品料号" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item>
|
|
|
|
|
<template slot="label">电子账册项号<rq></rq></template>
|
|
|
|
|
<template slot="label">电子账册项号</template>
|
|
|
|
|
<div v-if="tableReadonly" class="nomal-text">{{ scope.row.bookNumber }}</div>
|
|
|
|
|
<el-form-item v-else prop="bookNumber" class="margin-none">
|
|
|
|
|
<el-input v-model="scope.row.bookNumber" placeholder="请输入电子账册项号" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item>
|
|
|
|
|
<template slot="label">报关单号<rq></rq></template>
|
|
|
|
|
<template slot="label">报关单号</template>
|
|
|
|
|
<div v-if="tableReadonly" class="nomal-text">{{ scope.row.customsNo }}</div>
|
|
|
|
|
<el-form-item v-else prop="customsNo" class="margin-none">
|
|
|
|
|
<el-input v-model="scope.row.customsNo" placeholder="请输入报关单号" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item>
|
|
|
|
|
<template slot="label">核注清单号<rq></rq></template>
|
|
|
|
|
<template slot="label">核注清单号</template>
|
|
|
|
|
<div v-if="tableReadonly" class="nomal-text">{{ scope.row.listNumber }}</div>
|
|
|
|
|
<el-form-item v-else prop="listNumber" class="margin-none">
|
|
|
|
|
<el-input v-model="scope.row.listNumber" placeholder="请输入核注清单号" />
|
|
|
|
|
@ -185,8 +185,8 @@
|
|
|
|
|
<template slot="label">有效期至<rq></rq></template>
|
|
|
|
|
<div v-if="tableReadonly" class="nomal-text">{{ scope.row.expiryDate }}</div>
|
|
|
|
|
<el-form-item v-else prop="expiryDate" class="margin-none">
|
|
|
|
|
<el-date-picker clearable v-model="scope.row.expiryDate" style="width: 100%" type="date"
|
|
|
|
|
value-format="yyyy-MM-dd" placeholder="请选择有效期至">
|
|
|
|
|
<el-date-picker clearable v-model="scope.row.expiryDate" style="width: 100%" type="datetime"
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" placeholder="请选择有效期至">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
@ -271,11 +271,11 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { cmcustproductListApi as listCargo } from '@/api/cmcustproduct.js'
|
|
|
|
|
import { cmcustListApi as listCust } from "@/api/cmcust";
|
|
|
|
|
import { cmcustproductListByAll as listCargo } from '@/api/cmcustproduct.js'
|
|
|
|
|
import { cmcustListByAll as listCust } from "@/api/cmcust";
|
|
|
|
|
import { listWarehouse } from "@/api/cmwarehouse";
|
|
|
|
|
import { cmshelfListApi as listShelf } from "@/api/cmshelf";
|
|
|
|
|
import { cmlocationListApi as listLocation } from "@/api/cmstoragelocation";
|
|
|
|
|
import { cmshelfListByAll as listShelf } from "@/api/cmshelf";
|
|
|
|
|
import { cmstoragelocationListByAll as listLocation } from "@/api/cmstoragelocation";
|
|
|
|
|
import { ckbillDetailApi as getCkbillInfo, putBill } from '@/api/ckbill';
|
|
|
|
|
import { ckbillcargoDeleteApi as delCkcargo, recallPutBill } from '@/api/ckbillcargo';
|
|
|
|
|
// import { listVessel } from "@/api/jxc/vessel";
|
|
|
|
|
@ -303,18 +303,18 @@ export default {
|
|
|
|
|
cargoValue: [
|
|
|
|
|
{ required: true, message: "货物价值不能为空", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
cargoNumber: [
|
|
|
|
|
{ required: true, message: "货物自然序号不能为空", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
expiryDate: [
|
|
|
|
|
{ required: true, message: "货物过期时间不能为空", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
itemNumber: [
|
|
|
|
|
{ required: true, message: "商品料号不能为空", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
bookNumber: [
|
|
|
|
|
{ required: true, message: "电子账册项号不能为空", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
// cargoNumber: [
|
|
|
|
|
// { required: true, message: "货物自然序号不能为空", trigger: "blur" }
|
|
|
|
|
// ],
|
|
|
|
|
// expiryDate: [
|
|
|
|
|
// { required: true, message: "货物过期时间不能为空", trigger: "blur" }
|
|
|
|
|
// ],
|
|
|
|
|
// itemNumber: [
|
|
|
|
|
// { required: true, message: "商品料号不能为空", trigger: "blur" }
|
|
|
|
|
// ],
|
|
|
|
|
// bookNumber: [
|
|
|
|
|
// { required: true, message: "电子账册项号不能为空", trigger: "blur" }
|
|
|
|
|
// ],
|
|
|
|
|
// customsNo: [
|
|
|
|
|
// { required: true, message: "报关单号不能为空", trigger: "blur" }
|
|
|
|
|
// ],
|
|
|
|
|
@ -339,15 +339,15 @@ export default {
|
|
|
|
|
cargoId: [
|
|
|
|
|
{ required: true, message: "货物不能为空", trigger: "change" }
|
|
|
|
|
],
|
|
|
|
|
cargoWt: [
|
|
|
|
|
{ required: true, message: '货物重量不能为空', trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
cargoNum: [
|
|
|
|
|
{ required: true, message: '货物件数不能为空', trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
cargoVol: [
|
|
|
|
|
{ required: true, message: '货物体积不能为空', trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
// cargoWt: [
|
|
|
|
|
// { required: true, message: '货物重量不能为空', trigger: 'blur' }
|
|
|
|
|
// ],
|
|
|
|
|
// cargoNum: [
|
|
|
|
|
// { required: true, message: '货物件数不能为空', trigger: 'blur' }
|
|
|
|
|
// ],
|
|
|
|
|
// cargoVol: [
|
|
|
|
|
// { required: true, message: '货物体积不能为空', trigger: 'blur' }
|
|
|
|
|
// ],
|
|
|
|
|
// cargoWt: [
|
|
|
|
|
// { validator: valueValid, trigger: "change" }
|
|
|
|
|
// ],
|
|
|
|
|
@ -558,6 +558,7 @@ export default {
|
|
|
|
|
val.custId = this.form.custId;
|
|
|
|
|
val.custName = this.form.custName;
|
|
|
|
|
val.custCode = this.form.custCode;
|
|
|
|
|
val.inStockId = val.stockId; // 设置inStockId为stockId,确保后端能够正确获取到CmWarehouse中的id
|
|
|
|
|
});
|
|
|
|
|
const params = { ...this.form };
|
|
|
|
|
// 1入库 2出库
|
|
|
|
|
@ -672,7 +673,7 @@ export default {
|
|
|
|
|
// 获取货物
|
|
|
|
|
getCargoList() {
|
|
|
|
|
listCargo({}).then(response => {
|
|
|
|
|
this.cargoList = response.data;
|
|
|
|
|
this.cargoList = response;
|
|
|
|
|
}).catch(e => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
@ -681,7 +682,7 @@ export default {
|
|
|
|
|
this.cargoList.forEach(ele => {
|
|
|
|
|
if (ele.id == cargoId) {
|
|
|
|
|
form.cargoName = ele.cargoName;
|
|
|
|
|
form.hsCode = ele.hsCode;
|
|
|
|
|
form.goodsCode = ele.goodsCode;
|
|
|
|
|
form.cargoSpec = ele.cargoSpec;
|
|
|
|
|
form.originCountry = ele.originCountry;
|
|
|
|
|
}
|
|
|
|
|
@ -698,15 +699,16 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
// 获取客户
|
|
|
|
|
getCustList() {
|
|
|
|
|
listCust({custBelong:1}).then(response => {
|
|
|
|
|
this.custList = response.data;
|
|
|
|
|
// {custBelong:1}
|
|
|
|
|
listCust().then(response => {
|
|
|
|
|
this.custList = response;
|
|
|
|
|
}).catch(e => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// 获取仓库列表
|
|
|
|
|
getWarehouseList() {
|
|
|
|
|
listWarehouse({}).then(response => {
|
|
|
|
|
this.warehouseList = response.data || [];
|
|
|
|
|
this.warehouseList = response || [];
|
|
|
|
|
}).catch(e => {
|
|
|
|
|
console.error('获取仓库列表失败:', e);
|
|
|
|
|
this.warehouseList = [];
|
|
|
|
|
@ -715,7 +717,7 @@ export default {
|
|
|
|
|
// 获取货架列表
|
|
|
|
|
getShelfList(warehouseId) {
|
|
|
|
|
listShelf({ warehouseId }).then(response => {
|
|
|
|
|
this.shelfList = response.data || [];
|
|
|
|
|
this.shelfList = response || [];
|
|
|
|
|
}).catch(e => {
|
|
|
|
|
console.error('获取货架列表失败:', e);
|
|
|
|
|
this.shelfList = [];
|
|
|
|
|
@ -724,7 +726,7 @@ export default {
|
|
|
|
|
// 获取货位列表
|
|
|
|
|
getLocationList(shelfId) {
|
|
|
|
|
listLocation({ shelfId }).then(response => {
|
|
|
|
|
this.locationList = response.data || [];
|
|
|
|
|
this.locationList = response || [];
|
|
|
|
|
}).catch(e => {
|
|
|
|
|
console.error('获取货位列表失败:', e);
|
|
|
|
|
this.locationList = [];
|
|
|
|
|
@ -742,8 +744,10 @@ export default {
|
|
|
|
|
const warehouse = this.warehouseList.find(item => item.stockCode === stockCode);
|
|
|
|
|
if (warehouse) {
|
|
|
|
|
row.stockName = warehouse.stockName;
|
|
|
|
|
row.stockId = warehouse.id; // 设置仓库ID,确保后端能够找到对应的仓库对象
|
|
|
|
|
this.getShelfList(warehouse.id);
|
|
|
|
|
} else {
|
|
|
|
|
row.stockId = ''; // 清空仓库ID
|
|
|
|
|
this.shelfList = [];
|
|
|
|
|
this.locationList = [];
|
|
|
|
|
}
|
|
|
|
|
@ -771,7 +775,7 @@ export default {
|
|
|
|
|
// 查找货位对象获取货位名称
|
|
|
|
|
const location = this.locationList.find(item => item.id === locationId);
|
|
|
|
|
if (location) {
|
|
|
|
|
row.locationName = location.locationName;
|
|
|
|
|
row.locationName = location.storageLocationName;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
row.locationName = '';
|
|
|
|
|
|