物流和仓库问题修改

dev-scheduling
zhangdi 1 month ago
parent 9c7ca296d3
commit 752f7e709c
  1. 9
      src/api/logisticsManagement/logisticsDistribution.js
  2. 8
      src/api/storeManagement/otherIssuing.js
  3. 25
      src/views/inboundOutboundManagement/otherIssuing/index.vue
  4. 507
      src/views/inboundOutboundManagement/otherIssuing/otherIssuingDailog.vue
  5. 492
      src/views/inboundOutboundManagement/returnReceiving.vue
  6. 490
      src/views/inboundOutboundManagement/warehouseTransfer/index.vue
  7. 87
      src/views/logisticsManagement/logisticsDistribution.vue

@ -83,3 +83,12 @@ export const taskDetails = (data) => {
data: data, data: data,
}); });
}; };
// 关闭任务 order/task-closed
export const taskClosed = (data) => {
return request({
url: '/blade-desk/order/task-closed',
method: 'post',
data: data,
});
};

@ -125,3 +125,11 @@ export const getGoodsListByShId = params =>
method: 'get', method: 'get',
params params
}) })
// 根据扫码物资获取所有库存数据
export const getStockByStorehouseAndGoods = params =>
request({
url: '/api/blade-wms/combox/config/getStockByStorehouseAndGoods',
method: 'get',
params
})

@ -44,6 +44,7 @@
<otherIssuingDailog <otherIssuingDailog
v-if="openShow" v-if="openShow"
:showDialog="openShow" :showDialog="openShow"
:openType="openType"
:checkCode="checkCode" :checkCode="checkCode"
@closeDialog="closeDialog" @closeDialog="closeDialog"
></otherIssuingDailog> ></otherIssuingDailog>
@ -165,7 +166,6 @@ export default {
{ {
label: '出库仓库', label: '出库仓库',
prop: 'shName', prop: 'shName',
// bind: "stAccBill.coStorehouse.shName",
search: true, search: true,
sortable: true, sortable: true,
filter: true, filter: true,
@ -176,7 +176,6 @@ export default {
label: '出库类别', label: '出库类别',
prop: 'outType', prop: 'outType',
type: 'select', type: 'select',
// bind: "stAccBill.billFlagStr",
search: false, search: false,
sortable: true, sortable: true,
filter: true, filter: true,
@ -256,7 +255,6 @@ export default {
{ {
label: '制单人', label: '制单人',
prop: 'createUserName', prop: 'createUserName',
// bind: "stAccBill.createMan.userName",
search: false, search: false,
sortable: true, sortable: true,
filter: true, filter: true,
@ -266,7 +264,6 @@ export default {
{ {
label: '工装编号', label: '工装编号',
prop: 'toolCode', prop: 'toolCode',
// bind: "pjMold.toolingCode",
search: false, search: false,
sortable: true, sortable: true,
filter: true, filter: true,
@ -317,22 +314,10 @@ export default {
label: '审批驳回', label: '审批驳回',
value: 10, value: 10,
}, },
// {
// label: "",
// value: 3,
// },
], ],
}, },
// {
// label: '',
// prop: 'approvalOpinion',
// search: false,
// sortable: true,
// filter: true,
// span: 12,
// display: false,
// width: 180,
// },
{ {
label: '审批人', label: '审批人',
prop: 'approverName', prop: 'approverName',
@ -417,6 +402,7 @@ export default {
auditRules: { auditRules: {
approvalResult: [{ required: true, message: '请选择是否通过审核', trigger: 'blur' }], approvalResult: [{ required: true, message: '请选择是否通过审核', trigger: 'blur' }],
}, },
openType:''
}; };
}, },
created() { created() {
@ -428,10 +414,12 @@ export default {
methods: { methods: {
addView() { addView() {
this.openShow = true; this.openShow = true;
this.openType = '新增'
}, },
changeCode(val) { changeCode(val) {
if (this.checkCode == '') return; if (this.checkCode == '') return;
this.openShow = true; this.openShow = true;
this.openType = '扫码'
}, },
beforeOpen(done, type) { beforeOpen(done, type) {
if (['view'].includes(type)) { if (['view'].includes(type)) {
@ -469,6 +457,7 @@ export default {
closeDialog(val) { closeDialog(val) {
this.openShow = false; this.openShow = false;
this.showDetail = false; this.showDetail = false;
this.checkCode = ''
if (val) { if (val) {
this.onLoad(); this.onLoad();
} }

@ -25,7 +25,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6" v-if="openType != '扫码'">
<el-form-item label="出库仓库" prop="shId"> <el-form-item label="出库仓库" prop="shId">
<el-select <el-select
v-model="stOtherOutRecord.shId" v-model="stOtherOutRecord.shId"
@ -85,159 +85,150 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> </el-row> <div v-if="openType == '扫码'">
<div slot="left" style="margin-bottom: 12px"> <el-table ref="xTable" :data="outbankScanList" border @select="selectChangeScan">
<el-button type="primary" @click="insertEvent()">插入一行</el-button> <el-table-column type="selection" width="40" />
<el-button type="danger" @click="deleteRow()">删除一行</el-button> <el-table-column label="仓库物料" prop="goodsCode" width="150" align="center">
</el-table-column>
<el-table-column label="物料名称" prop="goodsName" align="center"> </el-table-column>
<el-table-column label="型号/牌号" prop="materialModel" align="center"> </el-table-column>
<el-table-column label="仓库" prop="shName" align="center"> </el-table-column>
<el-table-column label="库位" prop="location" align="center"> </el-table-column>
<el-table-column label="批次号" prop="piNo" align="center"> </el-table-column>
<el-table-column label="炉批号" prop="stovePiNo" align="center"> </el-table-column>
<el-table-column label="库存数量" prop="usableQuantity" align="center"> </el-table-column>
<el-table-column label="出库件数" prop="outQuantity" align="center">
<template #header>
<span><i style="color: red">*</i>出库件数</span>
</template>
<template #default="scope">
<el-input-number
style="width: 90%"
v-model="scope.row.outQuantity"
:max="scope.row.quantity"
placeholder="请输入"
controls-position="right"
></el-input-number>
</template>
</el-table-column>
<el-table-column label="计量单位" prop="unitName" align="center"> </el-table-column>
<el-table-column label="到期日期" prop="scrapCycle" align="center"> </el-table-column>
<el-table-column label="入库日期" prop="inDate" align="center"> </el-table-column>
</el-table>
</div> </div>
<el-table ref="xTable" :data="outbankList" border @select="selectChange"> <div v-else>
<el-table-column type="selection" width="40" /> <div slot="left" style="margin-bottom: 12px">
<el-table-column <el-button type="primary" @click="insertEvent()">插入一行</el-button>
label="出库单号" <el-button type="danger" @click="deleteRow()">删除一行</el-button>
prop="sirCode" </div>
width="120" <el-table ref="xTable" :data="outbankList" border @select="selectChange">
align="center" <el-table-column type="selection" width="40" />
></el-table-column> <el-table-column
<el-table-column label="仓库物料" prop="goodsCode" width="150" align="center"> label="出库单号"
<template #header> prop="sirCode"
<span><i style="color: red">*</i>仓库物料</span> width="120"
</template> align="center"
<template #default="scope"> ></el-table-column>
<el-select v-model="scope.row.goodsCode" @change="val => changeCode(val, scope.$index)"> <el-table-column label="仓库物料" prop="goodsCode" width="150" align="center">
<el-option <template #header>
v-for="item in goodsList" <span><i style="color: red">*</i>仓库物料</span>
:key="item.id" </template>
:label="item.goodsCode" <template #default="scope">
:value="item.goodsCode" <el-select
></el-option> v-model="scope.row.goodsCode"
</el-select> @change="val => changeCode(val, scope.$index)"
>
<!-- <jhSelect <el-option
@input="val => (scope.row.goodsCode = val)" v-for="item in goodsList"
:value="scope.row.goodsCode" :key="item.id"
placeholder="请搜索选择" :label="item.goodsCode"
api-url="/blade-wms/stGoods/list" :value="item.goodsCode"
echo-api="/blade-wms/stGoods/list" ></el-option>
echoParamsKey="goodsCode" </el-select>
echo-method="get" </template>
api-method="get" </el-table-column>
list-key="records"
total-key="total"
label-key="goodsCode"
value-key="goodsCode"
search-key="goodsCode"
:debounce-time="100"
@change="(val, item) => changeCode(val, item, scope.$index)"
:title="'修改'"
/> -->
</template>
</el-table-column>
<el-table-column label="物料名称" prop="goodsName" align="center"> <el-table-column label="物料名称" prop="goodsName" align="center">
<template #header> <template #header>
<span><i style="color: red">*</i>物料名称</span> <span><i style="color: red">*</i>物料名称</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="型号/牌号" prop="materialModel" align="center"> <el-table-column label="型号/牌号" prop="materialModel" align="center">
<template #header> <template #header>
<span><i style="color: red">*</i>型号/牌号</span> <span><i style="color: red">*</i>型号/牌号</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="库位号" prop="slId" align="center"> <el-table-column label="库位号" prop="slId" align="center">
<template #header> <template #header>
<span><i style="color: red">*</i>库位号</span> <span><i style="color: red">*</i>库位号</span>
</template> </template>
<template #default="scope"> <template #default="scope">
<el-select v-model="scope.row.slId" @change="val => changeLocation(val, scope.$index)"> <el-select
<el-option v-model="scope.row.slId"
v-for="item in scope.row.locationList" @change="val => changeLocation(val, scope.$index)"
:key="item.id" >
:label="item.location" <el-option
:value="item.slId" v-for="item in scope.row.locationList"
></el-option> :key="item.id"
</el-select> :label="item.location"
</template> :value="item.slId"
</el-table-column> ></el-option>
<el-table-column label="批次号" prop="piNo" align="center"> </el-select>
<template #header> </template>
<span><i style="color: red">*</i>批号</span> </el-table-column>
</template> <el-table-column label="批次号" prop="piNo" align="center">
<template #default="scope"> <template #header>
<el-select v-model="scope.row.piNo" @change="val => changePiNo(val, scope.$index)"> <span><i style="color: red">*</i>批号</span>
<el-option </template>
v-for="item in scope.row.piNoList" <template #default="scope">
:key="item.piNo" <el-select v-model="scope.row.piNo" @change="val => changePiNo(val, scope.$index)">
:label="item.piNo" <el-option
:value="item.piNo" v-for="item in scope.row.piNoList"
></el-option> :key="item.piNo"
</el-select> :label="item.piNo"
</template> :value="item.piNo"
</el-table-column> ></el-option>
<el-table-column label="炉批号" prop="stovePiNo" align="center"> </el-select>
<template #header> </template>
<span><i style="color: red">*</i>炉批号</span> </el-table-column>
</template> <el-table-column label="炉批号" prop="stovePiNo" align="center">
</el-table-column> <template #header>
<el-table-column label="库存数量" prop="quantity" align="center"> <span><i style="color: red">*</i>炉批号</span>
<template #header> </template>
<span><i style="color: red">*</i>库存数量</span> </el-table-column>
</template> <el-table-column label="库存数量" prop="usableQuantity" align="center">
</el-table-column> <template #header>
<span><i style="color: red">*</i>库存数量</span>
</template>
</el-table-column>
<el-table-column label="出库件数" prop="outQuantity" align="center"> <el-table-column label="出库件数" prop="outQuantity" align="center">
<template #header> <template #header>
<span><i style="color: red">*</i>出库件数</span> <span><i style="color: red">*</i>出库件数</span>
</template> </template>
<template #default="scope"> <template #default="scope">
<el-input-number <el-input-number
style="width: 90%" style="width: 90%"
v-model="scope.row.outQuantity" v-model="scope.row.outQuantity"
:max="scope.row.quantity" :max="scope.row.quantity"
placeholder="请输入" placeholder="请输入"
controls-position="right" controls-position="right"
></el-input-number> ></el-input-number>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="计量单位" prop="unitName" align="center"> <el-table-column label="计量单位" prop="unitName" align="center">
<template #header> <template #header>
<span><i style="color: red">*</i>计量单位</span> <span><i style="color: red">*</i>计量单位</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="到期日期" prop="scrapCycle" align="center"> <el-table-column label="到期日期" prop="scrapCycle" align="center">
<template #default="scope">{{ scope.row.scrapCycle }}</template> <template #default="scope">{{ scope.row.scrapCycle }}</template>
<!-- <template #header> </el-table-column>
<span><i style="color: red">*</i>到期日期</span> <el-table-column label="入库日期" prop="inDate" align="center">
</template> <template #default="scope">{{ scope.row.inDate }}</template>
<template #default="scope"> </el-table-column>
<el-date-picker </el-table>
disabled </div>
v-model="scope.row.scrapCycle"
format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
type="date"
placeholder="选择日期"
style="width: 100%"
/>
</template> -->
</el-table-column>
<el-table-column label="入库日期" prop="inDate" align="center">
<template #default="scope">{{ scope.row.inDate }}</template>
<!-- <template #header>
<span><i style="color: red">*</i>入库日期</span>
</template>
<template #default="scope">
<el-date-picker
disabled
v-model="scope.row.inOutDate"
format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
type="date"
placeholder="选择日期"
style="width: 100%"
/>
</template> -->
</el-table-column>
</el-table>
</el-form> </el-form>
<template #footer> <template #footer>
@ -259,7 +250,8 @@ import {
getLocationData, getLocationData,
addIssue, addIssue,
getShList, getShList,
getGoodsListByShId getGoodsListByShId,
getStockByStorehouseAndGoods,
} from '@/api/storeManagement/otherIssuing'; } from '@/api/storeManagement/otherIssuing';
export default { export default {
props: { props: {
@ -271,6 +263,10 @@ export default {
type: String, type: String,
default: '', default: '',
}, },
openType: {
type: String,
default: '',
},
}, },
data() { data() {
const assQuantityValid = ({ cellValue, rule, rules, row, rowIndex, column, columnIndex }) => { const assQuantityValid = ({ cellValue, rule, rules, row, rowIndex, column, columnIndex }) => {
@ -286,6 +282,7 @@ export default {
}); });
}; };
return { return {
outbankScanList: [],
openShow: false, openShow: false,
billCode: null, billCode: null,
userOption: [], userOption: [],
@ -295,12 +292,6 @@ export default {
treeData: [], treeData: [],
goodsList: [], goodsList: [],
stOtherOutRecord: { stOtherOutRecord: {
// billDate:dateFormat(new Date(),'yyyy-MM-dd'),
// stAccBill: {
// billDate: new Date(),
// pfUserInfo: { dept: {} },
// coStorehouse: { shId: null }
// },
mid: null, mid: null,
outType: 4, outType: 4,
woCode: null, woCode: null,
@ -352,16 +343,8 @@ export default {
goodsParams: {}, goodsParams: {},
piNoParams: {}, piNoParams: {},
rules: { rules: {
// stAccBill: {
// coStorehouse: {
shId: [{ required: true, message: '请选择仓库', trigger: 'blur' }], shId: [{ required: true, message: '请选择仓库', trigger: 'blur' }],
// },
// pfUserInfo: {
picker: [{ required: true, message: '请选择领料人', trigger: 'blur' }], picker: [{ required: true, message: '请选择领料人', trigger: 'blur' }],
// }
// },
// moId: [],
outType: [{ required: true, message: '请选择出库原因', trigger: 'blur' }], outType: [{ required: true, message: '请选择出库原因', trigger: 'blur' }],
}, },
gridRules: { gridRules: {
@ -371,6 +354,7 @@ export default {
}, },
isShowInput: false, isShowInput: false,
userData: [], userData: [],
selectList: [],
}; };
}, },
mounted() { mounted() {
@ -379,13 +363,23 @@ export default {
if (this.checkCode == '') { if (this.checkCode == '') {
this.getWare(); this.getWare();
this.getKeeper(); this.getKeeper();
// this.getGoods();
} else { } else {
this.getKeeper(); this.getKeeper();
this.getShData(); this.getShData();
} }
this.init();
}, },
methods: { methods: {
init() {
if (this.openType == '扫码') {
getStockByStorehouseAndGoods({ goodsCode: this.checkCode }).then(res => {
this.outbankScanList = res.data.data;
this.outbankScanList.forEach(item => {
item.outQuantity = item.outQuantity == -1 ? 0 : item.outQuantity;
});
});
}
},
getShData() { getShData() {
getShList({ getShList({
goodsCode: this.checkCode, goodsCode: this.checkCode,
@ -423,7 +417,7 @@ export default {
console.log('tmp------------', tmp); console.log('tmp------------', tmp);
// if (item != undefined) { // if (item != undefined) {
this.outbankList[index].goodsName = tmp.goodsName; this.outbankList[index].goodsName = tmp.goodsName;
this.outbankList[index].materialModel = tmp.materialModel; this.outbankList[index].materialModel = tmp.materialModel;
this.outbankList[index].unitName = tmp.unitName; this.outbankList[index].unitName = tmp.unitName;
this.outbankList[index].goodsId = tmp.id; this.outbankList[index].goodsId = tmp.id;
@ -457,7 +451,7 @@ export default {
this.outbankList[index].stovePiNo = tmp.stovePiNo; this.outbankList[index].stovePiNo = tmp.stovePiNo;
this.outbankList[index].quantity = tmp.quantity; this.outbankList[index].quantity = tmp.quantity;
this.outbankList[index].scrapCycle = tmp.scrapCycle; this.outbankList[index].scrapCycle = tmp.scrapCycle;
this.outbankList[index].inDate = tmp.inDate; this.outbankList[index].inDate = tmp.inDate;
this.outbankList[index].id = tmp.id; this.outbankList[index].id = tmp.id;
} }
}, },
@ -480,13 +474,7 @@ export default {
this.openShow = false; this.openShow = false;
this.$emit('closeDialog', val); this.$emit('closeDialog', val);
}, },
userDataFn() { userDataFn() {},
// this.$ajax.post("sysComBox/user", { "filterValue": null, "paging": { "pageSize": 9999999, "pageNumber": 1 }, "baseParams": {} }).then(res => {
// if (this.$ifAjax(res)) {
// this.userData = res.data.list;
// }
// });
},
opened() { opened() {
this.stOtherOutRecord = { this.stOtherOutRecord = {
stAccBill: { stAccBill: {
@ -509,20 +497,7 @@ export default {
this.changeUseType(this.stOtherOutRecord.outType); this.changeUseType(this.stOtherOutRecord.outType);
this.moldList(); this.moldList();
}, },
moldList() { moldList() {},
// this.$ajax.post("stOtherReceiptRecord/queryMoldList").then(res => {
// if (this.$ifAjax(res)) {
// this.loading = false;
// this.treeData = res.data.list;
// }
// });
// this.$ajax.post("stOtherOutRecord/generateCode").then(res => {
// if (this.$ifAjax(res)) {
// this.stOtherOutRecord.stAccBill.billCode =
// res.data.stAccBill.billCode;
// }
// });
},
queryDataForAdd() { queryDataForAdd() {
this.$ajax.get('stOtherOutRecord/preparedForAdd').then(res => { this.$ajax.get('stOtherOutRecord/preparedForAdd').then(res => {
this.stOtherOutRecord = res.data; this.stOtherOutRecord = res.data;
@ -581,6 +556,10 @@ export default {
selectChange(list, row) { selectChange(list, row) {
row._select = !row._select; row._select = !row._select;
}, },
selectChangeScan(list, row) {
row._select = !row._select;
this.selectList = list;
},
// //
deleteRow() { deleteRow() {
this.$confirm('确定将选择数据删除?', { this.$confirm('确定将选择数据删除?', {
@ -733,17 +712,36 @@ export default {
submit() { submit() {
this.$refs.form.validate(valid => { this.$refs.form.validate(valid => {
if (valid) { if (valid) {
this.outbankList.map(item => { let submitData = [];
if (item.outQuantity > item.quantity) { if (this.openType == '扫码') {
this.$message.error('出库数量不可大于库存数量'); if (this.selectList.length == 0) {
this.$message.error('请选择要出库的行数据');
return; return;
} }
}); this.selectList.map(item => {
// if (item.outQuantity > item.quantity) {
const submitData = this.outbankList.map(row => { this.$message.error('出库数量不可大于库存数量');
const { piNoList, locationList, _select, ...validData } = row; // return;
return validData; }
}); });
//
submitData = this.selectList.map(row => {
return row;
});
} else {
this.outbankList.map(item => {
if (item.outQuantity > item.quantity) {
this.$message.error('出库数量不可大于库存数量');
return;
}
//
submitData = this.outbankList.map(row => {
const { piNoList, locationList, _select, ...validData } = row; //
return validData;
});
});
}
let params = { let params = {
outList: submitData, outList: submitData,
stOtherOutRecord: this.stOtherOutRecord, stOtherOutRecord: this.stOtherOutRecord,
@ -752,108 +750,25 @@ export default {
addIssue(params).then(res => { addIssue(params).then(res => {
if (res.data.code == 200) { if (res.data.code == 200) {
this.$message.success('保存成功'); this.$message.success('保存成功');
if (this.openType != '扫码') {
this.outbankList.map((item, index) => { this.outbankList.map((item, index) => {
getLocationData({ getLocationData({
shId: this.stOtherOutRecord.shId, shId: this.stOtherOutRecord.shId,
goodsId: item.goodsId, goodsId: item.goodsId,
slId: item.slId, slId: item.slId,
}).then(res => { }).then(res => {
item.piNoList = res.data.data.records; item.piNoList = res.data.data.records;
let tmp = item.piNoList.find(item1 => item1.piNo == item.piNo); let tmp = item.piNoList.find(item1 => item1.piNo == item.piNo);
item.quantity = tmp.quantity; item.quantity = tmp.quantity;
});
}); });
}); } else {
// this.outbankList = [] this.init();
// this.stOtherOutRecord = {} }
// this.closeDialog(true)
// this.onLoad()
} }
}); });
} }
}); });
// this.$message.success("");
// this.$refs.form.validate(formValid => {
// if (formValid) {
// if (this.isShowInput) {
// if (
// this.stOtherOutRecord.woCode == null &&
// this.stOtherOutRecord.woCode == undefined
// ) {
// return this.$message.warning("");
// }
// }
// let submitList = [];
// const deleteIds = [];
// if (
// this.oldShId != null &&
// this.stOtherOutRecord.stAccBill.coStorehouse.shId !== this.oldShId
// ) {
// const { fullData } = this.$refs.xTable.getTableData();
// if (fullData.length > 0) {
// submitList = submitList.concat(fullData);
// }
// } else {
// const {
// insertRecords,
// updateRecords
// } = this.$refs.xTable.getRecordset();
// if (insertRecords.length > 0) {
// insertRecords.forEach(item => {
// if (item.coGoods.goodsId != null) {
// submitList.push(item);
// }
// });
// }
// if (updateRecords.length > 0) {
// submitList = submitList.concat(updateRecords);
// }
// }
// const removeRecords = this.$refs.xTable.getRemoveRecords();
// if (removeRecords.length) {
// removeRecords.forEach(obj => {
// if (obj.stAccBillDetail.abdId) {
// deleteIds.push(obj.stAccBillDetail.abdId);
// }
// });
// }
// if (
// (this.stOtherOutRecord.abId === undefined ||
// this.stOtherOutRecord.abId === null) &&
// submitList.length === 0
// ) {
// this.$message.warning(
// this.$t("videaVueLib.publics.message.noDataToSave")
// );
// } else {
// this.$refs.xTable.validate(submitList, errMap => {
// if (errMap) {
// return;
// }
// this.btnLoading = true;
// this.$ajax
// .post("stOtherOutRecord/addStOtherOutRecord", {
// stOtherOutRecord: this.stOtherOutRecord,
// list: submitList,
// deleteIds: deleteIds
// })
// .then(res => {
// if (this.$ifAjax(res)) {
// this.$message.success(
// this.$t("videaVueLib.publics.message.success")
// );
// this.close(true);
// }
// this.btnLoading = false;
// });
// });
// }
// }
// });
}, },
piCodeChange(id, item) { piCodeChange(id, item) {
this.stOtherOutRecord.taskCode = item.moCode; this.stOtherOutRecord.taskCode = item.moCode;

@ -8,108 +8,88 @@
v-model:page="page" v-model:page="page"
v-model:search="searchQuery" v-model:search="searchQuery"
ref="crud" ref="crud"
@row-del="rowDel"
@search-change="searchChange" @search-change="searchChange"
@search-reset="searchReset" @search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange" @current-change="currentChange"
@size-change="sizeChange" @size-change="sizeChange"
@refresh-change="refreshChange" @refresh-change="refreshChange"
@on-load="onLoad" @on-load="onLoad"
> >
<template #menu-left> <template #menu-left>
<!-- <el-button type="primary" @click="batchPush">批量入库</el-button> --> <span style="font-size: 12px; color: #606266">物料编号</span>
<!-- 物料入库 --> <el-input
<!-- <el-form v-model="searchFrom"> --> style="width: 240px"
<!-- <el-form-item label="物料编号:"> --> v-model="searchFrom.prtno"
<span style="font-size:12px;color:#606266;">物料编号</span> @keyup.enter.native="changeCode"
<el-input style="width:240px;" v-model="searchFrom.prtno" @keyup.enter.native="changeCode"></el-input> ></el-input>
<!-- </el-form-item> -->
<!-- </el-form> -->
</template> </template>
<template #menu="scope"> <template #menu="scope">
<el-button type="text" @click="warehousing(scope.row)"> 入库</el-button> <el-button type="text" @click="warehousing(scope.row)"> 入库</el-button>
</template> </template>
<!-- <template #shCode="{ row }"> <!-- 入库数量 -->
{{ row.pushHouse.coStorehouse.shCode }} <template #pushQuantity="{ row }">
<el-input-number v-model="row.pushQuantity" controls-position="right" />
</template> </template>
<template #location="{ row }"> <template #shCode="scope">
{{ row.pushHouse.location }} <el-select
</template> --> filterable
</avue-crud> v-model="scope.row.pushHouse.shId"
<el-dialog title="入库" append-to-body v-model="warehouseShow"> @change="changeWare(scope.row, scope.row.$index)"
<el-form >
ref="warehouseForm" <el-option
:model="warehouseForm" v-for="item in wareList"
:rules="warehouseRules" :key="item.id"
label-width="80" :label="item.shName"
> :value="item.id"
<el-form-item label="入库仓库" prop="shId"> ></el-option>
<el-select v-model="warehouseForm.shId" @change="changeWare"> </el-select>
<el-option v-for="item in wareList" :key="item.id" :label="item.shName" :value="item.id"></el-option> </template>
<!-- <el-option label="仓库二" value="2"></el-option> --> <template #location="scope">
</el-select> <el-select filterable v-model="scope.row.pushHouse.id">
</el-form-item> <el-option
<el-form-item label="库位号" prop="slId"> v-for="item in scope.row.locationList"
<el-select v-model="warehouseForm.slId"> :key="item.id"
<el-option v-for="item in locationList" :key="item.id" :label="item.location" :value="item.id"></el-option> :label="item.location"
<!-- <el-option label="仓库二" value="2"></el-option> --> :value="item.id"
</el-select> ></el-option>
</el-form-item> </el-select>
<!-- <el-form-item label="批次号" prop="piNo">
<el-input v-model="warehouseForm.piNo"></el-input>
</el-form-item> -->
<el-form-item label="数量" prop="pushQuantity">
<el-input
v-model="warehouseForm.pushQuantity"
oninput="value=value.replace(/[^0-9.]/g,'')"
/>
</el-form-item>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="warehouseShow = false"> </el-button>
<el-button type="primary" @click="submitWarehouse"> </el-button>
</span>
</template> </template>
</el-dialog> </avue-crud>
</basic-container> </basic-container>
</template> </template>
<script> <script>
import {getList,pushWare,getWareList,getLocationList,getLocationData,addIssue} from "@/api/storeManagement/returnReceiving" import {
getList,
getWareList,
getLocationData,
addIssue,
} from '@/api/storeManagement/returnReceiving';
import { getLocationList } from '@/api/storeManagement/warehouseMaintenance';
export default { export default {
data() { data() {
return { return {
loading: false, loading: false,
data: [], data: [],
form: {}, form: {},
searchFrom:{ searchFrom: {
prtno:'' prtno: '',
}, },
query:{}, query: {},
searchQuery:{}, searchQuery: {},
wareList:[], wareList: [],
selectionList: [], selectionList: [],
warehouseShow: false,
warehouseForm: {},
warehouseRules: {
shId: [{ required: true, message: "请选择入库仓库", trigger: "blur" }],
slId: [{ required: true, message: "请选择库位号", trigger: "blur" }],
pushQuantity:[{ required: true, message: "请填写入库数量", trigger: "blur" }]
},
page: { page: {
pageSize: 10, pageSize: 10,
currentPage: 1, currentPage: 1,
total: 0, total: 0,
}, },
locationList:[], locationList: [],
checkGoodsCode:'',
option: { option: {
columnSort: true, columnSort: true,
tip: false, tip: false,
height: "auto", height: 'auto',
align: "center", align: 'center',
calcHeight: 32, calcHeight: 32,
simplePage: false, simplePage: false,
searchShow: true, searchShow: true,
@ -118,19 +98,19 @@ export default {
searchIndex: 3, searchIndex: 3,
tree: false, tree: false,
border: true, border: true,
index: false, index: true,
selection: true, selection: false,
viewBtn: false, viewBtn: false,
delBtn: false, delBtn: false,
editBtn: false, editBtn: false,
editBtnText: "修改", editBtnText: '修改',
editBtnIcon: " ", editBtnIcon: ' ',
delBtnIcon: " ", delBtnIcon: ' ',
addBtn: false, addBtn: false,
labelWidth: 140, labelWidth: 140,
searchLabelWidth: 120, searchLabelWidth: 120,
menu: true, menu: true,
menuWidth: 100, menuWidth: 60,
dialogWidth: 600, dialogWidth: 600,
dialogClickModal: false, dialogClickModal: false,
searchEnter: true, searchEnter: true,
@ -138,182 +118,107 @@ export default {
gridBtn: false, gridBtn: false,
searchShowBtn: false, searchShowBtn: false,
showOverflowTooltip: true, showOverflowTooltip: true,
searchLabelPosition: "left", searchLabelPosition: 'left',
searchLabelWidth: "auto", searchLabelWidth: 'auto',
searchGutter: 24, searchGutter: 24,
searchSpan: 6, searchSpan: 6,
menuAlign: "center", menuAlign: 'center',
gridBtn: false, gridBtn: false,
searchMenuPosition: "right", searchMenuPosition: 'right',
addBtnIcon: " ", addBtnIcon: ' ',
viewBtnIcon: " ", viewBtnIcon: ' ',
delBtnIcon: " ", delBtnIcon: ' ',
editBtnIcon: " ", editBtnIcon: ' ',
column: [ column: [
{ {
label: "物料编号", label: '物料编号',
prop: "prtno", prop: 'prtno',
span: 24, span: 24,
overflow: true, overflow: true,
search: false, search: false,
width:160, width: 160,
rules: [
{
required: true,
message: "请输入物料编号",
trigger: "blur",
},
],
}, },
{ {
label: "材料名称", label: '材料名称',
prop: "prtdesc", prop: 'prtdesc',
span: 24, span: 24,
overflow: true, overflow: true,
search: true, search: true,
rules: [
{
required: true,
message: "请输入材料名称",
trigger: "blur",
},
],
}, },
{ {
label: "规格", label: '规格',
prop: "prtinfo", prop: 'prtinfo',
span: 24, span: 24,
overflow: true, overflow: true,
search: false, search: false,
rules: [
{
required: true,
message: "请输入规格",
trigger: "blur",
},
],
}, },
{ {
label: "生产标识", label: '生产标识',
prop: "prtlotno", prop: 'prtlotno',
span: 24, span: 24,
overflow: true, overflow: true,
search: false, search: false,
rules: [
{
required: true,
message: "请输入生产标识",
trigger: "blur",
},
],
}, },
{ {
label: "出库单号", label: '出库单号',
prop: "invadjCode", prop: 'invadjCode',
span: 24, span: 24,
overflow: true, overflow: true,
search: false, search: false,
rules: [
{
required: true,
message: "请输入出库单号",
trigger: "blur",
},
],
}, },
{ {
label: "出库数量", label: '出库数量',
prop: "invysqty", prop: 'invysqty',
span: 24, span: 24,
overflow: true, overflow: true,
search: false, search: false,
rules: [
{
required: true,
message: "请输入出库数量",
trigger: "blur",
},
],
}, },
{ {
label: "入库数量", label: '入库数量',
prop: "pushQuantity", prop: 'pushQuantity',
span: 24, span: 24,
overflow: true, overflow: true,
search: false, search: false,
rules: [ width: 140,
{
required: true,
message: "请输入入库数量",
trigger: "blur",
},
],
}, },
{ {
label: "入库库房", label: '入库库房',
prop: "shCode", prop: 'shCode',
span: 24, span: 24,
overflow: true, overflow: true,
search: false, search: false,
rules: [ width: 140,
{
required: true,
message: "请输入入库库房",
trigger: "blur",
},
],
}, },
{ {
label: "入库库位", label: '入库库位',
prop: "location", prop: 'location',
span: 24, span: 24,
overflow: true, overflow: true,
search: false, search: false,
rules: [ width: 140,
{
required: true,
message: "请输入入库库位",
trigger: "blur",
},
],
}, },
{ {
label: "单价", label: '单价',
prop: "invadjMoney", prop: 'invadjMoney',
span: 24, span: 24,
overflow: true, overflow: true,
search: false, search: false,
// rules: [
// {
// required: true,
// message: "",
// trigger: "blur",
// },
// ],
}, },
{ {
label: "单位", label: '单位',
prop: "prtum", prop: 'prtum',
span: 24, span: 24,
overflow: true, overflow: true,
search: false, search: false,
rules: [
{
required: true,
message: "请输入单位",
trigger: "blur",
},
],
}, },
{ {
label:"到期日期", label: '到期日期',
prop:"validdat", prop: 'validdat',
}, },
{ {
label: '检验编号', label: '检验编号',
prop: 'qutno', prop: 'qutno',
// bind: 'stAccBill.checkNo',
width: 150, width: 150,
search: false, search: false,
sortable: true, sortable: true,
@ -323,165 +228,118 @@ export default {
}, },
}; };
}, },
created() { mounted() {
this.getWare() this.getWare();
if (JSON.stringify(this.$store.state.client.materialInParams) !== "{}") { if (JSON.stringify(this.$store.state.client.materialInParams) !== '{}') {
this.query = this.$store.state.client.materialInParams; this.query = this.$store.state.client.materialInParams;
this.searchQuery = this.$store.state.client.materialInParams; this.searchQuery = this.$store.state.client.materialInParams;
} }
}, },
methods: { methods: {
searchChange(params, done){ searchChange(params, done) {
this.query = params this.query = params;
this.page.currentPage = 1; this.page.currentPage = 1;
this.onLoad() this.onLoad();
this.$store.dispatch("changeSetting", { this.$store.dispatch('changeSetting', {
title: "materialInParams", title: 'materialInParams',
form: this.query, form: this.query,
}); });
done() done();
}, },
searchReset(){ searchReset() {
this.query = {} this.query = {};
this.$store.dispatch("changeSetting", { this.$store.dispatch('changeSetting', {
title: "materialInParams", title: 'materialInParams',
form: this.query, form: this.query,
}); });
this.onLoad() this.onLoad();
}, },
currentChange(cuurrentPage){ currentChange(cuurrentPage) {
this.page.currentPage = cuurrentPage this.page.currentPage = cuurrentPage;
}, },
sizeChange(pageSize){ sizeChange(pageSize) {
this.page.pageSize = pageSize this.page.pageSize = pageSize;
}, },
refreshChange(){ refreshChange() {
this.onLoad() this.onLoad();
}, },
getWare(){ //
getWareList().then(res =>{ getWare() {
getWareList().then(res => {
this.wareList = res.data.data.records; this.wareList = res.data.data.records;
}) });
},
//
getLocationList(){
getLocationList().then(res => {
this.locationList = res.data.data;
});
}, },
// //
changeWare(val){ changeWare(row, index) {
getLocationData({ getLocationData({
shId:val, shId: row.pushHouse.shId,
goodsCode:this.checkGoodsCode goodsCode: row.prtno,
}).then(res =>{ }).then(res => {
this.locationList = res.data.data this.data[index].locationList = res.data.data;
}) });
},
//
selectionChange(list) {
this.selectionList = list;
}, },
changeCode(val){ changeCode(val) {
// console.log('val-------------------------',val) this.page.currentPage = 1;
this.page.currentPage = 1 this.onLoad();
this.onLoad()
}, },
// //
warehousing(row) { warehousing(row) {
this.warehouseShow = true; console.log('row-------------------------', row);
this.checkGoodsCode = row.prtno if (row.pushQuantity == null) {
this.warehouseForm.id = row.id this.$message.error('入库数量不能为空!');
this.warehouseForm.piNo = row.piNo return false;
this.$refs.warehouseForm.resetFields();
},
//
batchPush() {
if (this.selectionList.length && this.selectionList.length != 0) {
this.$confirm('确定对数据进行入库操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
pushWare(this.selectionList).then(res =>{
if(res.data.code == 200){
this.$message.success('入库成功')
this.onLoad()
}
})
})
} else {
this.$message.error("请选择需要入库物料");
} }
}, if (row.pushHouse.shId == '') {
// this.$message.error('请先选择入库仓库!');
submitWarehouse() { return false;
this.$refs.warehouseForm.validate((valid) => { }
if (valid) { if (row.pushHouse.id == '') {
let params = [ this.$message.error('请先选择入库库位!');
{ return false;
srId: this.warehouseForm.id, }
pushQuantity: this.warehouseForm.pushQuantity, this.$confirm('确定对数据进行入库操作?', '提示', {
// piNo:this.warehouseForm.piNo, confirmButtonText: '确定',
pushHouse: { cancelButtonText: '取消',
id: this.warehouseForm.slId, type: 'warning',
shId: this.warehouseForm.shId, }).then(() => {
} let params = [
} {
] srId: row.id,
addIssue(params).then(res =>{ pushQuantity: row.pushQuantity,
if(res.data.code == 200){ pushHouse: {
this.$message.success('入库成功') id: row.id,
this.warehouseShow = false shId: row.shId,
this.onLoad() },
} },
}) ];
console.log('params------------',params) addIssue(params).then(res => {
} if (res.data.code == 200) {
this.$message.success('入库成功');
this.onLoad();
}
});
}); });
}, },
onLoad() { onLoad() {
console.log('prtlotno--------------',this.searchFrom)
getList({ getList({
current:this.page.currentPage, current: this.page.currentPage,
size:this.page.pageSize, size: this.page.pageSize,
prtno:this.searchFrom.prtno, prtno: this.searchFrom.prtno,
...this.query ...this.query,
}).then(res =>{ }).then(res => {
this.data = res.data.data.records this.data = res.data.data.records;
this.page.total = res.data.data.total this.data.forEach((item,index) => {
}) this.changeWare(item,index)
// this.data = [ });
// { this.page.total = res.data.data.total;
// id: 1, });
// prtno: "001",
// prtdesc: "",
// prtinfo: "",
// prtlotno: "",
// invadjCode: "",
// invysqty: "",
// pushQuantity: 20,
// pushHouse: {
// coStorehouse: {
// shCode: "",
// },
// location: "00-10",
// },
// prtum: "",
// },
// {
// id: 2,
// prtno: "001",
// prtdesc: "",
// prtinfo: "",
// prtlotno: "",
// invadjCode: "",
// invysqty: "",
// pushQuantity: 20,
// pushHouse: {
// coStorehouse: {
// shCode: "",
// },
// location: "00-10",
// },
// prtum: "",
// },
// ];
// this.page.total = this.data.length;
}, },
}, },
}; };

@ -11,406 +11,192 @@
@row-del="rowDel" @row-del="rowDel"
@search-change="searchChange" @search-change="searchChange"
@search-reset="searchReset" @search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange" @current-change="currentChange"
@size-change="sizeChange" @size-change="sizeChange"
@refresh-change="refreshChange" @refresh-change="refreshChange"
@on-load="onLoad" @on-load="onLoad"
> >
<template #menu-left> <template #menu-left> </template>
<!-- <el-button type="primary" @click="allocationFun()">批量入库</el-button> --> <template #menu-right> </template>
<!-- <el-button type="danger" @click="handle()">删除</el-button> -->
</template>
<template #menu-right>
<!-- <el-button type="primary" @click="allocationFun()">批量调拨</el-button>
<el-button type="primary" @click="handle()">导入</el-button> -->
</template>
<template #menu="scope"> <template #menu="scope">
<!-- <el-button type="text" @click="handle(scope.row.tbId)">调拨</el-button> --> <el-button type="text" @click="warehousing(scope.row)"> 入库 </el-button>
<el-button
type="text"
size="mini"
@click="warehousing(scope.row)"
>
入库
</el-button>
<!-- <el-button type="text" size="mini" @click="warehousingLog(scope.row)">
记录
</el-button> -->
</template> </template>
</avue-crud>
<el-dialog title="入库" append-to-body v-model="warehouseShow"> <!-- 入库数量 -->
<el-form <template #putQuantity="{ row }">
ref="warehouseForm" <el-input-number v-model="row.putQuantity" controls-position="right" />
:model="warehouseForm" </template>
:rules="warehouseRules"
label-width="80" <!-- 入库库房 -->
> <template #shId="{ row }">
<el-form-item label="入库仓库" prop="shId"> <el-select filterable v-model="row.shId" @change="changeWare(row)">
<el-select v-model="warehouseForm.shId" @change="changeWare"> <el-option
<el-option v-for="item in wareList" :key="item.id" :label="item.shName" :value="item.id"></el-option> v-for="item in wareList"
<!-- <el-option label="仓库二" value="2"></el-option> --> :key="item.id"
</el-select> :label="item.shName"
</el-form-item> :value="item.id"
<el-form-item label="库位号" prop="slId">
<el-select v-model="warehouseForm.slId">
<el-option v-for="item in locationList" :key="item.id" :label="item.location" :value="item.id"></el-option>
<!-- <el-option label="仓库一" value="1"></el-option> -->
<!-- <el-option label="仓库二" value="2"></el-option> -->
</el-select>
</el-form-item>
<el-form-item label="数量" prop="putQuantity">
<el-input
v-model="warehouseForm.putQuantity"
oninput="value=value.replace(/[^0-9.]/g,'')"
/> />
</el-form-item> </el-select>
</el-form> </template>
<template #footer>
<span class="dialog-footer">
<el-button @click="warehouseShow = false"> </el-button>
<el-button type="primary" @click="submitWarehouse"> </el-button> <!-- 入库库位 必回显最终版 -->
</span> <template #location="{ row }">
<el-select
filterable
v-model="row.slId"
:key="`loc-${row.slId}-${row.shId}`"
value-key="id"
>
<el-option
v-for="item in row.locationList"
:key="item.id"
:label="item.location"
:value="item.id"
/>
</el-select>
</template> </template>
</el-dialog>
</avue-crud>
</basic-container> </basic-container>
</template> </template>
<script> <script>
import {getList,getWareList,getLocationList,getLocationData,addIssue} from "@/api/storeManagement/warehouseTransfer" import {
getList,
getWareList,
getLocationData,
addIssue,
} from '@/api/storeManagement/warehouseTransfer';
export default { export default {
data() { data() {
return { return {
wareList:[], wareList: [],
selectionList: [], locationList: [],
locationList:[], loading: false,
loading:false, query: {},
query:{}, searchForm: {},
searchForm:{}, form: {},
warehouseShow:false, page: {
warehouseForm:{}, pageSize: 10,
warehouseRules:{ currentPage: 1,
shId:[{required:true,message:'请选择入库仓库',trigger:'blur'}], total: 0,
slId:[{required:true,message:'请选择入库库位',trigger:'blur'}],
putQuantity:[{required:true,message:'请填写入库数量',trigger:'blur'}],
}, },
option: { option: {
height: "auto", height: 'auto',
calcHeight: 32, calcHeight: 32,
tip: false, tip: false,
// size: "medium",
simplePage: true, simplePage: true,
searchShow: true, searchShow: true,
searchMenuSpan: 6, searchMenuSpan: 6,
searchIcon: true,
searchIndex: 3,
tree: false,
border: true, border: true,
index: true, index: true,
selection: true, selection: false,
viewBtn: false, viewBtn: false,
delBtn: false, delBtn: false,
editBtn:false, editBtn: false,
addBtn: false, addBtn: false,
editBtnText: "修改",
viewBtnIcon: " ",
delBtnIcon: " ",
editBtnIcon: " ",
viewBtnText: "详情",
labelWidth: 120, labelWidth: 120,
menuWidth: 80, menuWidth: 80,
dialogWidth: 1040, align: 'center',
dialogClickModal: false, menuAlign: 'center',
searchEnter: true,
excelBtn: false,
filterBtn: true,
searchShowBtn: false,
columnSort: true,
excelBtn: true,
columnSort: true,
index: false,
showOverflowTooltip: true, showOverflowTooltip: true,
searchLabelPosition: "left",
searchLabelWidth: "auto",
searchGutter: 24,
searchSpan: 6,
menuAlign: "center",
gridBtn: false,
searchMenuPosition: "right",
addBtnIcon: " ",
viewBtnIcon: " ",
delBtnIcon: " ",
editBtnIcon: " ",
align: "center",
column: [ column: [
{ { label: '出库单号', prop: 'outCode', search: true, width: 120 },
label: "出库单号", { label: '材料编号', prop: 'goodsCode', search: true, width: 180 },
prop: "outCode", { label: '出库数量', prop: 'outQuantity', width: 120 },
sortable: true, { label: '出库人', prop: 'checkUser', width: 120 },
filter: true, { label: '入库数量', prop: 'putQuantity', width: 140 },
span: 12, { label: '入库库房', prop: 'shId', width: 140 },
search: true, { label: '入库库位', prop: 'location', width: 140 },
width: 120, { label: '材料名称', prop: 'goodsName', search: true, width: 120 },
}, { label: '物料规格', prop: 'specifications', width: 120 },
{ { label: '型号/牌号', prop: 'materialModel', width: 120 },
label: "材料编号", { label: '单位', prop: 'unitName', width: 120 },
prop: "goodsCode", { label: '批次号', prop: 'batchCode', search: true, width: 120 },
// bind: "coGoods.goodsCode", { label: '炉批号', prop: 'prtWoCode', width: 120 },
sortable: true, { label: '单价', prop: 'unitPrice', width: 120 },
filter: true, { label: '检验编号', prop: 'checkCode', search: true, width: 120 },
span: 12, { label: '到期日期', prop: 'scrapCycle', width: 120 },
search: true,
width: 180,
},
{
label: "材料名称",
prop: "goodsName",
// bind: "coGoods.goodsName",
sortable: true,
filter: true,
span: 12,
search: true,
width: 120,
},
{
label: "物料规格",
prop: "specifications",
// bind: "coGoods.specifications",
sortable: true,
filter: true,
span: 12,
search: false,
width: 120,
},
{
label: "型号/牌号",
prop: "materialModel",
// bind: "coGoods.mtltmrk",
sortable: true,
filter: true,
span: 12,
search: false,
width: 120,
},
{
label: "单位",
prop: "unitName",
// bind: "coGoods.unitName",
sortable: true,
filter: true,
span: 12,
search: false,
width: 120,
},
{
label: "批次号",
prop: "batchCode",
sortable: true,
filter: true,
span: 12,
search: true,
width: 120,
},
{
label: "炉批号",
prop: "prtWoCode",
sortable: true,
filter: true,
span: 12,
search: false,
width: 120,
},
{
label: "单价",
prop: "unitPrice",
sortable: true,
filter: true,
span: 12,
search: false,
width: 120,
},
{
label: "出库人",
prop: "checkUser",
sortable: true,
filter: true,
span: 12,
search: false,
width: 120,
},
{
label: "出库数量",
prop: "outQuantity",
sortable: true,
filter: true,
span: 12,
search: false,
width: 120,
},
{
label: "检验编号",
prop: "checkCode",
// bind: "checkCode",
sortable: true,
filter: true,
span: 12,
search: true,
width: 120,
},
{
label: "入库数量",
prop: "putQuantity",
// bind: "putQuantity",
sortable: true,
filter: true,
span: 12,
search: false,
width: 120,
},
{
label: "到期日期",
prop: "scrapCycle",
width: 120,
}
], ],
}, },
form: {},
page: {
pageSize: 10,
currentPage: 1,
total: 0,
},
checkGoods:"",
}; };
}, },
created() { created() {
this.getWare() this.getWare();
if (JSON.stringify(this.$store.state.client.exchangeInParams) !== "{}") {
this.query = this.$store.state.client.exchangeInParams;
this.searchForm = this.$store.state.client.exchangeInParams;
}
}, },
methods: { methods: {
searchChange(params, done){ async onLoad() {
this.query = params this.loading = true;
this.page.currentPage = 1; try {
this.onLoad() const res = await getList({
this.$store.dispatch("changeSetting", { current: this.page.currentPage,
title: "exchangeInParams", size: this.page.pageSize,
form: this.query, ...this.query,
}); });
done() this.data = res.data.data.records || [];
//
for (let item of this.data) {
//
item.shId = item.shId ?? '';
item.slId = item.slId ?? '';
item.locationList = [];
item.putQuantity = item.remainQuantity || 0;
if (item.shId) {
await this.loadLocationList(item);
}
}
this.page.total = res.data.data.total || 0;
} finally {
this.loading = false;
}
}, },
searchReset(){ //
this.query = {} async loadLocationList(row) {
this.$store.dispatch("changeSetting", { const res = await getLocationData({
title: "exchangeInParams", shId: row.shId,
form: this.query, goodsCode: row.goodsCode,
}); });
this.onLoad() row.locationList = res.data.data || [];
},
getWare(){
getWareList().then(res =>{
this.wareList = res.data.data.records;
})
},
changeWare(val){
getLocationData({
shId:val,
goodsCode:this.checkGoods
}).then(res =>{
this.locationList = res.data.data;
})
}, },
currentChange(cuurrentPage){ changeWare(row) {
this.page.currentPage = cuurrentPage row.slId = '';
this.loadLocationList(row);
}, },
sizeChange(pageSize){ getWare() {
this.page.pageSize = pageSize getWareList().then(res => {
this.wareList = res.data.data.records || [];
});
}, },
warehousing(row) { warehousing(row) {
this.warehouseForm.ewtId = row.id if (!row.putQuantity) return this.$message.error('入库数量不能为空');
this.checkGoods = row.goodsCode if (!row.shId) return this.$message.error('请选择入库仓库');
this.warehouseShow = true if (!row.slId) return this.$message.error('请选择入库库位');
},
submitWarehouse(){ this.$confirm('确定入库?', '提示', { type: 'warning' }).then(() => {
this.$refs.warehouseForm.validate(valid => { addIssue({
if (valid) { ewtId: row.id,
addIssue(this.warehouseForm).then(res => { putQuantity: row.putQuantity,
if(res.data.code == 200){ shId: row.shId,
this.$message.success('入库成功') slId: row.slId,
this.warehouseShow = false }).then(res => {
this.onLoad() if (res.data.code === 200) {
} this.$message.success('入库成功');
}) this.onLoad();
}
})
},
warehousingLog() {},
allocationFun(arId) {
// if (arId == null && this.selectionArr.length === 0) {
// return this.$message.warning('');
// }
this.$confirm("是否确认调拨", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
const obj = { list: [] };
if (arId == null) {
this.selectionArr.forEach((item) => {
obj.list.push(item.arId);
});
} else {
obj.list.push(arId);
} }
// this.$ajax.post('stAllotRecord/updateLocation', obj).then(res => {
// if (res.code === 0) {
// this.$message.success(this.$t('store.allocationOk'));
// this.$refs.myTable.load();
// }
// });
})
.catch(() => {
this.$message.info(this.$t("global.canceled") + this.$t("store.allocation"));
}); });
});
}, },
handleDelete() { searchChange(params, done) { this.query = params; this.page.currentPage = 1; this.onLoad(); done(); },
if (this.selectionList.length === 0) { refreshChange() { this.query = {}; this.onLoad(); },
this.$message.warning("请选择至少一条数据"); searchReset() { this.query = {}; this.onLoad(); },
return; currentChange(val) { this.page.currentPage = val; },
} sizeChange(val) { this.page.pageSize = val; },
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {});
},
//
selectionChange(list) {
this.selectionList = list;
},
onLoad() {
this.loading = true;
getList({
current:this.page.currentPage,
size:this.page.pageSize,
...this.query
}).then(res =>{
this.data = res.data.data.records
this.page.total = res.data.data.total
this.loading = false
})
// this.data = [{}];
// this.page.total = this.data.length;
// this.loading = false;
// setTimeout(() => {
// this.selectionClear();
// }, 500);
},
}, },
}; };
</script> </script>
<style lang="scss" scoped></style>
<style lang="scss" scoped>
</style>

@ -24,6 +24,7 @@
<template #menu-right> </template> <template #menu-right> </template>
<template #menu="{ row }"> <template #menu="{ row }">
<el-button type="text" @click="detailsFn(row)" v-if="permission.distribution_details">详情</el-button> <el-button type="text" @click="detailsFn(row)" v-if="permission.distribution_details">详情</el-button>
<el-button type="text" @click="closeFn(row)" v-if="permission.distribution_details">关闭</el-button>
</template> </template>
</avue-crud> </avue-crud>
<!-- 新增 --> <!-- 新增 -->
@ -60,7 +61,7 @@
import addLogisticsDialog from './components/addLogisticsDialog.vue'; import addLogisticsDialog from './components/addLogisticsDialog.vue';
import returnDialog from './components/returnDialog.vue'; import returnDialog from './components/returnDialog.vue';
import receiveDialog from './components/receiveDialog.vue'; import receiveDialog from './components/receiveDialog.vue';
import { getList } from '@/api/logisticsManagement/logisticsDistribution'; import { getList,taskClosed } from '@/api/logisticsManagement/logisticsDistribution';
import detailsLogisticsDialog from './components/detailsLogisticsDialog.vue'; import detailsLogisticsDialog from './components/detailsLogisticsDialog.vue';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
@ -74,13 +75,6 @@ export default {
}, },
computed:{ computed:{
...mapGetters(['permission']), ...mapGetters(['permission']),
// permissionList() {
// return {
// addBtn: this.validData(this.permission.menu_add, false),
// viewBtn: this.validData(this.permission.menu_view, false),
// delBtn: this.validData(this.permission.menu_delete, false),
// editBtn: this.validData(this.permission.menu_edit, false),
// };
}, },
data() { data() {
return { return {
@ -118,7 +112,7 @@ export default {
delBtn: false, delBtn: false,
editBtnText: '修改', editBtnText: '修改',
labelWidth: 120, labelWidth: 120,
menuWidth: 80, menuWidth: 100,
dialogWidth: 900, dialogWidth: 900,
dialogClickModal: false, dialogClickModal: false,
searchEnter: true, searchEnter: true,
@ -160,14 +154,7 @@ export default {
hide: true, hide: true,
searchOrder: 20, searchOrder: 20,
}, },
// {
// label: '-',
// prop: 'startWcName',
// search: false,
// sortable: true,
// span: 12,
// width: 120,
// },
{ {
label: '起点-区域', label: '起点-区域',
prop: 'startStationRegion', prop: 'startStationRegion',
@ -235,7 +222,6 @@ export default {
span: 12, span: 12,
width: 120, width: 120,
searchOrder: 14, searchOrder: 14,
// searchOrder: 19,
}, },
{ {
@ -247,42 +233,7 @@ export default {
width: 120, width: 120,
searchOrder: 18, searchOrder: 18,
}, },
// {
// label: '',
// prop: 'stationId',
// search: true,
// sortable: true,
// span: 12,
// },
// {
// label: '',
// prop: 'wcName',
// search: false,
// sortable: true,
// span: 12,
// },
// {
// label: '',
// prop: 'wcId',
// search: false,
// sortable: true,
// span: 12,
// hide: true,
// type: 'select',
// filterable: true,
// dicUrl: '/blade-desk/order/bs-list',
// props: {
// label: 'wcName',
// value: 'id',
// },
// },
// {
// label: '',
// prop: 'stationRegion',
// search: false,
// sortable: true,
// span: 12,
// },
{ {
label: '状态', label: '状态',
prop: 'statusDesc', prop: 'statusDesc',
@ -290,19 +241,7 @@ export default {
sortable: true, sortable: true,
span: 12, span: 12,
width: 120, width: 120,
// type: 'select',
// dicData: [
// { label: '', value: 0 },
// { label: '线', value: 1 },
// { label: '退()', value: 2 },
// { label: '线', value: 3 },
// { label: '', value: 4 },
// { label: '', value: 5 },
// { label: '', value: 6 },
// { label: '', value: 7 },
// { label: '', value: 8 },
// { label: '', value: 9 },
// ],
}, },
{ {
label: '发起人', label: '发起人',
@ -361,6 +300,20 @@ export default {
this.rowItem = row; this.rowItem = row;
this.detailsLogisticsShow = true; this.detailsLogisticsShow = true;
}, },
closeFn(row){
this.$confirm('确定将此任务进行关闭处理?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
taskClosed({taskId:row.id}).then(res => {
this.$message.success('操作成功');
this.onLoad(this.page);
});
})
},
closeDialog() { closeDialog() {
this.showAddDialogd = false; this.showAddDialogd = false;
this.showReturnDialog = false; this.showReturnDialog = false;

Loading…
Cancel
Save