物流和仓库问题修改

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. 513
      src/views/inboundOutboundManagement/otherIssuing/otherIssuingDailog.vue
  5. 492
      src/views/inboundOutboundManagement/returnReceiving.vue
  6. 492
      src/views/inboundOutboundManagement/warehouseTransfer/index.vue
  7. 87
      src/views/logisticsManagement/logisticsDistribution.vue

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

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

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

@ -25,7 +25,7 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="6" v-if="openType != '扫码'">
<el-form-item label="出库仓库" prop="shId">
<el-select
v-model="stOtherOutRecord.shId"
@ -85,159 +85,150 @@
</el-form-item>
</el-col>
</el-row>
<el-row> </el-row>
<div slot="left" style="margin-bottom: 12px">
<el-button type="primary" @click="insertEvent()">插入一行</el-button>
<el-button type="danger" @click="deleteRow()">删除一行</el-button>
<div v-if="openType == '扫码'">
<el-table ref="xTable" :data="outbankScanList" border @select="selectChangeScan">
<el-table-column type="selection" width="40" />
<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>
<el-table ref="xTable" :data="outbankList" border @select="selectChange">
<el-table-column type="selection" width="40" />
<el-table-column
label="出库单号"
prop="sirCode"
width="120"
align="center"
></el-table-column>
<el-table-column label="仓库物料" prop="goodsCode" width="150" align="center">
<template #header>
<span><i style="color: red">*</i>仓库物料</span>
</template>
<template #default="scope">
<el-select v-model="scope.row.goodsCode" @change="val => changeCode(val, scope.$index)">
<el-option
v-for="item in goodsList"
:key="item.id"
:label="item.goodsCode"
:value="item.goodsCode"
></el-option>
</el-select>
<div v-else>
<div slot="left" style="margin-bottom: 12px">
<el-button type="primary" @click="insertEvent()">插入一行</el-button>
<el-button type="danger" @click="deleteRow()">删除一行</el-button>
</div>
<el-table ref="xTable" :data="outbankList" border @select="selectChange">
<el-table-column type="selection" width="40" />
<el-table-column
label="出库单号"
prop="sirCode"
width="120"
align="center"
></el-table-column>
<el-table-column label="仓库物料" prop="goodsCode" width="150" align="center">
<template #header>
<span><i style="color: red">*</i>仓库物料</span>
</template>
<template #default="scope">
<el-select
v-model="scope.row.goodsCode"
@change="val => changeCode(val, scope.$index)"
>
<el-option
v-for="item in goodsList"
:key="item.id"
:label="item.goodsCode"
:value="item.goodsCode"
></el-option>
</el-select>
</template>
</el-table-column>
<!-- <jhSelect
@input="val => (scope.row.goodsCode = val)"
:value="scope.row.goodsCode"
placeholder="请搜索选择"
api-url="/blade-wms/stGoods/list"
echo-api="/blade-wms/stGoods/list"
echoParamsKey="goodsCode"
echo-method="get"
api-method="get"
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">
<template #header>
<span><i style="color: red">*</i>物料名称</span>
</template>
</el-table-column>
<el-table-column label="型号/牌号" prop="materialModel" align="center">
<template #header>
<span><i style="color: red">*</i>型号/牌号</span>
</template>
</el-table-column>
<el-table-column label="库位号" prop="slId" align="center">
<template #header>
<span><i style="color: red">*</i>库位号</span>
</template>
<template #default="scope">
<el-select
v-model="scope.row.slId"
@change="val => changeLocation(val, scope.$index)"
>
<el-option
v-for="item in scope.row.locationList"
:key="item.id"
:label="item.location"
:value="item.slId"
></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="批次号" prop="piNo" align="center">
<template #header>
<span><i style="color: red">*</i>批号</span>
</template>
<template #default="scope">
<el-select v-model="scope.row.piNo" @change="val => changePiNo(val, scope.$index)">
<el-option
v-for="item in scope.row.piNoList"
:key="item.piNo"
:label="item.piNo"
:value="item.piNo"
></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="炉批号" prop="stovePiNo" align="center">
<template #header>
<span><i style="color: red">*</i>炉批号</span>
</template>
</el-table-column>
<el-table-column label="库存数量" prop="usableQuantity" align="center">
<template #header>
<span><i style="color: red">*</i>库存数量</span>
</template>
</el-table-column>
<el-table-column label="物料名称" prop="goodsName" align="center">
<template #header>
<span><i style="color: red">*</i>物料名称</span>
</template>
</el-table-column>
<el-table-column label="型号/牌号" prop="materialModel" align="center">
<template #header>
<span><i style="color: red">*</i>型号/牌号</span>
</template>
</el-table-column>
<el-table-column label="库位号" prop="slId" align="center">
<template #header>
<span><i style="color: red">*</i>库位号</span>
</template>
<template #default="scope">
<el-select v-model="scope.row.slId" @change="val => changeLocation(val, scope.$index)">
<el-option
v-for="item in scope.row.locationList"
:key="item.id"
:label="item.location"
:value="item.slId"
></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="批次号" prop="piNo" align="center">
<template #header>
<span><i style="color: red">*</i>批号</span>
</template>
<template #default="scope">
<el-select v-model="scope.row.piNo" @change="val => changePiNo(val, scope.$index)">
<el-option
v-for="item in scope.row.piNoList"
:key="item.piNo"
:label="item.piNo"
:value="item.piNo"
></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="炉批号" prop="stovePiNo" align="center">
<template #header>
<span><i style="color: red">*</i>炉批号</span>
</template>
</el-table-column>
<el-table-column label="库存数量" prop="quantity" align="center">
<template #header>
<span><i style="color: red">*</i>库存数量</span>
</template>
</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">
<template #header>
<span><i style="color: red">*</i>计量单位</span>
</template>
</el-table-column>
<el-table-column label="到期日期" prop="scrapCycle" align="center">
<template #default="scope">{{ scope.row.scrapCycle }}</template>
<!-- <template #header>
<span><i style="color: red">*</i>到期日期</span>
</template>
<template #default="scope">
<el-date-picker
disabled
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-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">
<template #header>
<span><i style="color: red">*</i>计量单位</span>
</template>
</el-table-column>
<el-table-column label="到期日期" prop="scrapCycle" align="center">
<template #default="scope">{{ scope.row.scrapCycle }}</template>
</el-table-column>
<el-table-column label="入库日期" prop="inDate" align="center">
<template #default="scope">{{ scope.row.inDate }}</template>
</el-table-column>
</el-table>
</div>
</el-form>
<template #footer>
@ -259,7 +250,8 @@ import {
getLocationData,
addIssue,
getShList,
getGoodsListByShId
getGoodsListByShId,
getStockByStorehouseAndGoods,
} from '@/api/storeManagement/otherIssuing';
export default {
props: {
@ -271,6 +263,10 @@ export default {
type: String,
default: '',
},
openType: {
type: String,
default: '',
},
},
data() {
const assQuantityValid = ({ cellValue, rule, rules, row, rowIndex, column, columnIndex }) => {
@ -286,6 +282,7 @@ export default {
});
};
return {
outbankScanList: [],
openShow: false,
billCode: null,
userOption: [],
@ -295,12 +292,6 @@ export default {
treeData: [],
goodsList: [],
stOtherOutRecord: {
// billDate:dateFormat(new Date(),'yyyy-MM-dd'),
// stAccBill: {
// billDate: new Date(),
// pfUserInfo: { dept: {} },
// coStorehouse: { shId: null }
// },
mid: null,
outType: 4,
woCode: null,
@ -352,16 +343,8 @@ export default {
goodsParams: {},
piNoParams: {},
rules: {
// stAccBill: {
// coStorehouse: {
shId: [{ required: true, message: '请选择仓库', trigger: 'blur' }],
// },
// pfUserInfo: {
picker: [{ required: true, message: '请选择领料人', trigger: 'blur' }],
// }
// },
// moId: [],
outType: [{ required: true, message: '请选择出库原因', trigger: 'blur' }],
},
gridRules: {
@ -371,6 +354,7 @@ export default {
},
isShowInput: false,
userData: [],
selectList: [],
};
},
mounted() {
@ -379,13 +363,23 @@ export default {
if (this.checkCode == '') {
this.getWare();
this.getKeeper();
// this.getGoods();
} else {
this.getKeeper();
this.getShData();
}
this.init();
},
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() {
getShList({
goodsCode: this.checkCode,
@ -421,16 +415,16 @@ export default {
changeCode(val, index) {
let tmp = this.goodsList.find(item => item.goodsCode == val);
console.log('tmp------------', tmp);
// if (item != undefined) {
this.outbankList[index].goodsName = tmp.goodsName;
this.outbankList[index].goodsName = tmp.goodsName;
this.outbankList[index].materialModel = tmp.materialModel;
this.outbankList[index].unitName = tmp.unitName;
this.outbankList[index].goodsId = tmp.id;
this.outbankList[index].slId = '';
this.outbankList[index].piNo = '';
this.outbankList[index].quantity = '';
// }
getLocationData({
shId: this.stOtherOutRecord.shId,
@ -457,7 +451,7 @@ export default {
this.outbankList[index].stovePiNo = tmp.stovePiNo;
this.outbankList[index].quantity = tmp.quantity;
this.outbankList[index].scrapCycle = tmp.scrapCycle;
this.outbankList[index].inDate = tmp.inDate;
this.outbankList[index].inDate = tmp.inDate;
this.outbankList[index].id = tmp.id;
}
},
@ -480,13 +474,7 @@ export default {
this.openShow = false;
this.$emit('closeDialog', val);
},
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;
// }
// });
},
userDataFn() {},
opened() {
this.stOtherOutRecord = {
stAccBill: {
@ -509,20 +497,7 @@ export default {
this.changeUseType(this.stOtherOutRecord.outType);
this.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;
// }
// });
},
moldList() {},
queryDataForAdd() {
this.$ajax.get('stOtherOutRecord/preparedForAdd').then(res => {
this.stOtherOutRecord = res.data;
@ -581,6 +556,10 @@ export default {
selectChange(list, row) {
row._select = !row._select;
},
selectChangeScan(list, row) {
row._select = !row._select;
this.selectList = list;
},
//
deleteRow() {
this.$confirm('确定将选择数据删除?', {
@ -660,7 +639,7 @@ export default {
this.goodsList = res.data.data.records;
if (this.checkCode != '') {
let tmp = this.goodsList.find(item => item.goodsCode == this.checkCode);
this.outbankList[0].goodsId = tmp.id;
if (tmp) {
getLocationData({
@ -733,17 +712,36 @@ export default {
submit() {
this.$refs.form.validate(valid => {
if (valid) {
this.outbankList.map(item => {
if (item.outQuantity > item.quantity) {
this.$message.error('出库数量不可大于库存数量');
let submitData = [];
if (this.openType == '扫码') {
if (this.selectList.length == 0) {
this.$message.error('请选择要出库的行数据');
return;
}
});
//
const submitData = this.outbankList.map(row => {
const { piNoList, locationList, _select, ...validData } = row; //
return validData;
});
this.selectList.map(item => {
if (item.outQuantity > item.quantity) {
this.$message.error('出库数量不可大于库存数量');
return;
}
});
//
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 = {
outList: submitData,
stOtherOutRecord: this.stOtherOutRecord,
@ -752,108 +750,25 @@ export default {
addIssue(params).then(res => {
if (res.data.code == 200) {
this.$message.success('保存成功');
this.outbankList.map((item, index) => {
getLocationData({
shId: this.stOtherOutRecord.shId,
goodsId: item.goodsId,
slId: item.slId,
}).then(res => {
item.piNoList = res.data.data.records;
let tmp = item.piNoList.find(item1 => item1.piNo == item.piNo);
item.quantity = tmp.quantity;
if (this.openType != '扫码') {
this.outbankList.map((item, index) => {
getLocationData({
shId: this.stOtherOutRecord.shId,
goodsId: item.goodsId,
slId: item.slId,
}).then(res => {
item.piNoList = res.data.data.records;
let tmp = item.piNoList.find(item1 => item1.piNo == item.piNo);
item.quantity = tmp.quantity;
});
});
});
// this.outbankList = []
// this.stOtherOutRecord = {}
// this.closeDialog(true)
// this.onLoad()
} else {
this.init();
}
}
});
}
});
// 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) {
this.stOtherOutRecord.taskCode = item.moCode;

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

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

@ -24,6 +24,7 @@
<template #menu-right> </template>
<template #menu="{ row }">
<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>
</avue-crud>
<!-- 新增 -->
@ -60,7 +61,7 @@
import addLogisticsDialog from './components/addLogisticsDialog.vue';
import returnDialog from './components/returnDialog.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 { mapGetters } from 'vuex';
@ -74,13 +75,6 @@ export default {
},
computed:{
...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() {
return {
@ -118,7 +112,7 @@ export default {
delBtn: false,
editBtnText: '修改',
labelWidth: 120,
menuWidth: 80,
menuWidth: 100,
dialogWidth: 900,
dialogClickModal: false,
searchEnter: true,
@ -160,14 +154,7 @@ export default {
hide: true,
searchOrder: 20,
},
// {
// label: '-',
// prop: 'startWcName',
// search: false,
// sortable: true,
// span: 12,
// width: 120,
// },
{
label: '起点-区域',
prop: 'startStationRegion',
@ -235,7 +222,6 @@ export default {
span: 12,
width: 120,
searchOrder: 14,
// searchOrder: 19,
},
{
@ -247,42 +233,7 @@ export default {
width: 120,
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: '状态',
prop: 'statusDesc',
@ -290,19 +241,7 @@ export default {
sortable: true,
span: 12,
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: '发起人',
@ -361,6 +300,20 @@ export default {
this.rowItem = row;
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() {
this.showAddDialogd = false;
this.showReturnDialog = false;

Loading…
Cancel
Save