仓库问题修改

dev-scheduling
zhangdi 5 days ago
parent f52a79c63e
commit cb0d500a4a
  1. 671
      src/views/warehouseManagement/materialExpiration/expire.vue

@ -1,11 +1,22 @@
<template> <template>
<basic-container> <basic-container>
<avue-crud :option="option" :table-loading="loading" :data="data" v-model="form" v-model:page="page" ref="crud" <avue-crud
@row-del="rowDel" @search-change="searchChange" @search-reset="searchReset" :option="option"
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange" :table-loading="loading"
@refresh-change="refreshChange" @on-load="onLoad"> :data="data"
v-model="form"
v-model:page="page"
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> <template #menu-left>
<el-button type="primary" @click="setIndate()">到期处理</el-button> <el-button type="primary" @click="setIndate()">到期处理</el-button>
<!-- <el-button type="danger" @click="handle()">删除</el-button> --> <!-- <el-button type="danger" @click="handle()">删除</el-button> -->
</template> </template>
@ -19,24 +30,42 @@
<el-button type="text" @click="handle(scope.row)">报废出库</el-button> <el-button type="text" @click="handle(scope.row)">报废出库</el-button>
</template> </template>
<template #stopUse="scope"> <template #stopUse="scope">
<el-switch v-model="scope.row.stopUse" active-text="限用" inactive-text="合格" active-color="#13ce66" <el-switch
inactive-color="#ff4949" @change="(val) => usedOpenView(val,scope.row)" /> v-model="scope.row.stopUse"
active-text="限用"
inactive-text="合格"
active-color="#13ce66"
inactive-color="#ff4949"
@change="val => usedOpenView(val, scope.row)"
/>
</template> </template>
<template #goodsStatus="scope"> <template #goodsStatus="scope">
{{scope.row.goodsStatus === false ? '合格' : scope.row.goodsStatus === true ? '限用' : ''}} {{
scope.row.goodsStatus === false ? '合格' : scope.row.goodsStatus === true ? '限用' : ''
}}
</template> </template>
</avue-crud> </avue-crud>
<!-- 有效期维护 --> <!-- 有效期维护 -->
<indateDailog :id="bcId" :set-crew-open="indateOpen" v-if="indateOpen" type="platingAssort" <indateDailog
@setIndateCancel="setIndateCancel" :title="'到期处理'" ></indateDailog> :id="bcId"
<bfDialog v-if="bfOpen" :showDialog="bfOpen" :id="scrapId" @setIndateCancel="setIndateCancel"></bfDialog> :set-crew-open="indateOpen"
v-if="indateOpen"
type="platingAssort"
@setIndateCancel="setIndateCancel"
:title="'到期处理'"
></indateDailog>
<bfDialog
v-if="bfOpen"
:showDialog="bfOpen"
:id="scrapId"
@setIndateCancel="setIndateCancel"
></bfDialog>
</basic-container> </basic-container>
</template> </template>
<script> <script>
import {getList,changeStock} from "@/api/storeManagement/expire" import { getList, changeStock } from '@/api/storeManagement/expire';
import indateDailog from "./indateDailog.vue" import indateDailog from './indateDailog.vue';
import bfDialog from "./bfDialog.vue" import bfDialog from './bfDialog.vue';
export default { export default {
components: { indateDailog, bfDialog }, components: { indateDailog, bfDialog },
data() { data() {
@ -221,8 +250,8 @@ export default {
filter: true, filter: true,
span: 12, span: 12,
type: 'date', type: 'date',
format:"YYYY-MM-DD", format: 'YYYY-MM-DD',
valueFormat:"YYYY-MM-DD", valueFormat: 'YYYY-MM-DD',
searchRange: true, searchRange: true,
startPlaceholder: '开始日期', startPlaceholder: '开始日期',
endPlaceholder: '结束日期', endPlaceholder: '结束日期',
@ -248,13 +277,9 @@ export default {
width: 160, width: 160,
fixed: 'right', fixed: 'right',
}, },
],
]
},
form: {
}, },
form: {},
page: { page: {
pageSize: 10, pageSize: 10,
currentPage: 1, currentPage: 1,
@ -263,36 +288,32 @@ export default {
indateOpen: false, indateOpen: false,
bcId: null, bcId: null,
setCrewOpen: false, setCrewOpen: false,
} };
}, },
methods: { methods: {
// //
setIndate() { setIndate() {
if (this.selectionList.length == 0) { if (this.selectionList.length == 0) {
this.$message.error('请至少选择数据') this.$message.error('请至少选择数据');
return return;
} }
this.bcId = this.selectionList.map(item => item.id).join(',') this.bcId = this.selectionList.map(item => item.id).join(',');
this.indateOpen = true this.indateOpen = true;
}, },
setIndateCancel(isRefresh) { setIndateCancel(isRefresh) {
this.indateOpen = false; this.indateOpen = false;
this.bfOpen = false this.bfOpen = false;
if (isRefresh) { if (isRefresh) {
this.onLoad() this.onLoad();
} }
}, },
warehousing() { warehousing() {},
warehousingLog() {},
},
warehousingLog() {
},
// / // /
usedOpenView(val, row) { usedOpenView(val, row) {
console.log('row.stopUse===========',row.stopUse) console.log('row.stopUse===========', row.stopUse);
console.log('val===========',val) console.log('val===========', val);
row.stopUse = !row.stopUse row.stopUse = !row.stopUse;
if (row.stopUse && row.stopUse == 1) { if (row.stopUse && row.stopUse == 1) {
this.$confirm('确定将库存限用设置为合格?', { this.$confirm('确定将库存限用设置为合格?', {
confirmButtonText: '确定', confirmButtonText: '确定',
@ -301,37 +322,58 @@ export default {
}).then(() => { }).then(() => {
changeStock({ changeStock({
rlsId: row.id, rlsId: row.id,
stopUse:0 stopUse: 0,
}).then(res => { }).then(res => {
if (res.data.code === 200) { if (res.data.code === 200) {
this.$message.success('操作成功') this.$message.success('操作成功');
this.onLoad() this.onLoad();
return false return false;
} }
}) });
}) });
} else { } else {
this.$confirm('确定将库存限用设置为限用?', { // this.$confirm('?', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning',
// }).then(() => {
// changeStock({
// rlsId:row.id,
// stopUse:1,
// memo:'333',
// }).then(res =>{
// if(res.data.code === 200){
// this.$message.success('')
// this.onLoad()
// return true
// }
// })
// })
this.$prompt('备注:', '确定将库存限用设置为限用?', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', })
}).then(() => { .then(({ value }) => {
if (value != '') {
changeStock({ changeStock({
rlsId: row.id, rlsId: row.id,
stopUse:1 stopUse: 1,
memo: value,
}).then(res => { }).then(res => {
if (res.data.code === 200) { if (res.data.code === 200) {
this.$message.success('操作成功') this.$message.success('操作成功');
this.onLoad() this.onLoad();
return true return true;
}
});
} }
}) })
}) .catch(() => {});
} }
}, },
searchData(type) { searchData(type) {
this.query.expireStatus = type this.query.expireStatus = type;
this.onLoad() this.onLoad();
}, },
allocationFun(arId) { allocationFun(arId) {
// if (arId == null && this.selectionArr.length === 0) { // if (arId == null && this.selectionArr.length === 0) {
@ -340,7 +382,7 @@ export default {
this.$confirm('是否确认调拨', '提示', { this.$confirm('是否确认调拨', '提示', {
confirmButtonText: '确认', confirmButtonText: '确认',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning',
}) })
.then(() => { .then(() => {
const obj = { list: [] }; const obj = { list: [] };
@ -359,16 +401,14 @@ export default {
// }); // });
}) })
.catch(() => { .catch(() => {
this.$message.info( this.$message.info(this.$t('global.canceled') + this.$t('store.allocation'));
this.$t('global.canceled') + this.$t('store.allocation')
);
}); });
}, },
handle(row) { handle(row) {
console.log('rw===============',row) console.log('rw===============', row);
this.scrapId = row.id this.scrapId = row.id;
this.bfOpen = true this.bfOpen = true;
console.log('bfOpen-----------',this.bfOpen) console.log('bfOpen-----------', this.bfOpen);
}, },
handleDelete() { handleDelete() {
if (this.selectionList.length === 0) { if (this.selectionList.length === 0) {
@ -379,509 +419,50 @@ export default {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
}).then(() => { }).then(() => {});
})
}, },
searchChange(params, done) { searchChange(params, done) {
this.query = params this.query = params;
this.page.currentPage = 1; this.page.currentPage = 1;
this.onLoad() this.onLoad();
done() done();
}, },
searchReset() { searchReset() {
this.query = {} this.query = {};
this.onLoad() this.onLoad();
}, },
currentChange(currentPage) { currentChange(currentPage) {
this.page.currentPage = currentPage this.page.currentPage = currentPage;
}, },
sizeChange(pageSize) { sizeChange(pageSize) {
this.page.pageSize = pageSize this.page.pageSize = pageSize;
}, },
// //
selectionChange(list) { selectionChange(list) {
this.selectionList = list; this.selectionList = list;
}, },
onLoad() { onLoad() {
this.loading = true this.loading = true;
let params = { let params = {
...this.query, ...this.query,
startDueDate:this.query.scrapCycle && this.query.scrapCycle.length != 0 && this.query.scrapCycle[0], startDueDate:
endDueDate:this.query.scrapCycle && this.query.scrapCycle.length != 0 && this.query.scrapCycle[1], this.query.scrapCycle && this.query.scrapCycle.length != 0 && this.query.scrapCycle[0],
} endDueDate:
// const {scrapCycle,...invalideParams} = params this.query.scrapCycle && this.query.scrapCycle.length != 0 && this.query.scrapCycle[1],
if(params.scrapCycle) delete params.scrapCycle };
if (params.scrapCycle) delete params.scrapCycle;
getList({ getList({
current: this.page.currentPage, current: this.page.currentPage,
size: this.page.pageSize, size: this.page.pageSize,
...params ...params,
}).then(res => { }).then(res => {
this.data = res.data.data.records this.data = res.data.data.records;
this.page.total = res.data.data.total this.page.total = res.data.data.total;
this.loading = false this.loading = false;
}) });
// this.data = [ },
// { },
// "allMoney": null, };
// "balanceMoney": 15.0,
// "barCode": null,
// "checkCode": "ck001",
// "coGoods": {
// "allGoodsQuantity": null,
// "batch": null,
// "bomQuantity": null,
// "buyQuantity": null,
// "cavityno": null,
// "checkoutCode": "2222",
// "coGoodsClass": null,
// "coStorageLocation": null,
// "cplb": null,
// "createTime": "2023-07-15 16:18:30",
// "curQuantity": 2999.0,
// "cycle": null,
// "deleted": false,
// "deliveryDate": null,
// "dept": null,
// "drawingNo": null,
// "ecnno": null,
// "enditem": 0,
// "erpQuantity": null,
// "goodsCode": "21E543-6108-B1",
// "goodsCodeAndGoodsName": "null21E543-6108-B1",
// "goodsId": 170,
// "goodsName": "",
// "grade": null,
// "houseQuantity": null,
// "lockQuantity": 0.0,
// "madeIn": null,
// "matbigclassify": null,
// "matsmallclassify": null,
// "maxNum": 300.0,
// "memo": null,
// "minNum": 50.0,
// "mtlsgrt": null,
// "mtltmrk": "4",
// "mustCheck": 0,
// "newGoodsName": null,
// "newSpecifications": null,
// "numAcc": null,
// "onthewayQuantity": 0.0,
// "partLink": null,
// "piNo": null,
// "price": null,
// "priority": null,
// "prtType": "",
// "prtrevedit": null,
// "prtstd": null,
// "prtwt": 0.0,
// "purchaseQuantity": 0.0,
// "releaseno": null,
// "releasenoTime": null,
// "remark": null,
// "rlsId": null,
// "singlePieceQuota": null,
// "source": null,
// "special": null,
// "specifications": null,
// "syQuantity": null,
// "trademark": null,
// "unitName": "",
// "updateTime": "2023-07-15 16:18:30",
// "used": true
// },
// "coStorehouse": {
// "codeAndName": null,
// "createTime": "2023-12-25 10:08:43",
// "deleted": false,
// "factoryId": 41,
// "memo": null,
// "saveUser": {
// "accountId": null,
// "card": null,
// "createTime": "2023-04-06",
// "curStatus": 1,
// "deleted": false,
// "deptName": null,
// "dimissionTime": null,
// "factoryId": 41,
// "head": 0,
// "jobName": "",
// "keyValue": 521,
// "ldapName": null,
// "mail": null,
// "mobile": null,
// "pfDepartment": {
// "appLink": null,
// "createTime": "2022-08-31",
// "deleted": false,
// "deptCode": "001",
// "deptId": 1,
// "deptName": "MES",
// "deptType": 1,
// "deptTypeTitle": "",
// "keyValue": 1,
// "memo": null,
// "orders": "00",
// "parentDeptId": null,
// "parentPath": null,
// "ucDeptId": null,
// "updateTime": "2022-08-31 16:32:46"
// },
// "ucUserId": null,
// "updateTime": "2023-04-06 16:23:38",
// "userCode": "0001",
// "userId": 521,
// "userName": "",
// "userSex": 1,
// "userSources": "",
// "userString": "521:A:",
// "userType": "A",
// "yearsOfService": null
// },
// "shCode": "RB001",
// "shId": 183,
// "shLevel": null,
// "shName": "",
// "toolingType": null,
// "toolingTypeStr": null,
// "type": 0,
// "typeStr": "",
// "updateTime": null
// },
// "createTime": "2023-12-25 10:26:44",
// "facType": 0,
// "factoryId": 41,
// "goodsCodeAndGoodsName": null,
// "goodsId": null,
// "goodsStatus": 0,
// "inStoreDay": 665,
// "isApplyFor": false,
// "keeper": null,
// "memo": null,
// "modelOrBrandStr": "4/null",
// "moldBaseMaterial": false,
// "moldStock": null,
// "outQuantity": null,
// "piNo": "Y20231225001",
// "quantity": 2999.0,
// "quantityLevel": "ccc",
// "rlsId": 222,
// "scrapCycle": "2024-09-18 00:00:00",
// "splyCode": null,
// "stayMaintainNum": 0,
// "stockSource": 0,
// "stopUse": false,
// "stopUseTitle": "",
// "storageLocation": {
// "coStorehouse": {
// "codeAndName": null,
// "createTime": "2023-12-25 10:08:43",
// "deleted": false,
// "factoryId": 41,
// "memo": null,
// "saveUser": {
// "accountId": null,
// "card": null,
// "createTime": "2023-04-06",
// "curStatus": 1,
// "deleted": false,
// "deptName": null,
// "dimissionTime": null,
// "factoryId": 41,
// "head": 0,
// "jobName": "",
// "keyValue": 521,
// "ldapName": null,
// "mail": null,
// "mobile": null,
// "pfDepartment": {
// "appLink": null,
// "createTime": "2022-08-31",
// "deleted": false,
// "deptCode": "001",
// "deptId": 1,
// "deptName": "MES",
// "deptType": 1,
// "deptTypeTitle": "",
// "keyValue": 1,
// "memo": null,
// "orders": "00",
// "parentDeptId": null,
// "parentPath": null,
// "ucDeptId": null,
// "updateTime": "2022-08-31 16:32:46"
// },
// "ucUserId": null,
// "updateTime": "2023-04-06 16:23:38",
// "userCode": "0001",
// "userId": 521,
// "userName": "",
// "userSex": 1,
// "userSources": "",
// "userString": "521:A:",
// "userType": "A",
// "yearsOfService": null
// },
// "shCode": "RB001",
// "shId": 183,
// "shLevel": null,
// "shName": "",
// "toolingType": null,
// "toolingTypeStr": null,
// "type": 0,
// "typeStr": "",
// "updateTime": null
// },
// "cslId": 222,
// "deleted": false,
// "goodsCode": "21E543-6108-B1",
// "goodsName": null,
// "location": "RB001SM02",
// "mtltmrk": null,
// "specifications": null
// },
// "stovePiNo": null,
// "sumNum": 0,
// "thickness": null,
// "updateTime": null,
// "useQuantity": 2999.0,
// "zyQuantity": 0.0
// },
// {
// "allMoney": null,
// "balanceMoney": 30.0,
// "barCode": null,
// "checkCode": "CK002",
// "coGoods": {
// "allGoodsQuantity": null,
// "batch": null,
// "bomQuantity": null,
// "buyQuantity": null,
// "cavityno": null,
// "checkoutCode": "1111",
// "coGoodsClass": null,
// "coStorageLocation": null,
// "cplb": null,
// "createTime": "2023-07-15 16:18:30",
// "curQuantity": 1950.0,
// "cycle": null,
// "deleted": false,
// "deliveryDate": null,
// "dept": null,
// "drawingNo": null,
// "ecnno": null,
// "enditem": 0,
// "erpQuantity": null,
// "goodsCode": "04-05-025",
// "goodsCodeAndGoodsName": "null04-05-025",
// "goodsId": 169,
// "goodsName": "",
// "grade": null,
// "houseQuantity": null,
// "lockQuantity": 0.0,
// "madeIn": null,
// "matbigclassify": null,
// "matsmallclassify": null,
// "maxNum": 300.0,
// "memo": null,
// "minNum": 50.0,
// "mtlsgrt": null,
// "mtltmrk": "23",
// "mustCheck": 0,
// "newGoodsName": null,
// "newSpecifications": null,
// "numAcc": null,
// "onthewayQuantity": 0.0,
// "partLink": null,
// "piNo": null,
// "price": null,
// "priority": null,
// "prtType": "",
// "prtrevedit": null,
// "prtstd": null,
// "prtwt": 0.0,
// "purchaseQuantity": 100.0,
// "releaseno": null,
// "releasenoTime": null,
// "remark": null,
// "rlsId": null,
// "singlePieceQuota": null,
// "source": null,
// "special": null,
// "specifications": "100/",
// "syQuantity": null,
// "trademark": null,
// "unitName": "",
// "updateTime": "2023-07-15 16:18:30",
// "used": true
// },
// "coStorehouse": {
// "codeAndName": null,
// "createTime": "2023-12-25 10:09:44",
// "deleted": false,
// "factoryId": 41,
// "memo": null,
// "saveUser": {
// "accountId": null,
// "card": null,
// "createTime": "2023-02-08",
// "curStatus": 1,
// "deleted": false,
// "deptName": null,
// "dimissionTime": null,
// "factoryId": 41,
// "head": 0,
// "jobName": "",
// "keyValue": 453,
// "ldapName": "00075",
// "mail": null,
// "mobile": null,
// "pfDepartment": {
// "appLink": null,
// "createTime": "2023-02-08",
// "deleted": false,
// "deptCode": "26",
// "deptId": 57,
// "deptName": "",
// "deptType": 1,
// "deptTypeTitle": "",
// "keyValue": 57,
// "memo": null,
// "orders": "26",
// "parentDeptId": 41,
// "parentPath": null,
// "ucDeptId": null,
// "updateTime": "2023-02-08 16:38:31"
// },
// "ucUserId": null,
// "updateTime": "2023-02-08 17:25:13",
// "userCode": "00075",
// "userId": 453,
// "userName": "1",
// "userSex": 1,
// "userSources": "1",
// "userString": "453:A:1",
// "userType": "A",
// "yearsOfService": null
// },
// "shCode": "RB002",
// "shId": 184,
// "shLevel": null,
// "shName": "",
// "toolingType": null,
// "toolingTypeStr": null,
// "type": 0,
// "typeStr": "",
// "updateTime": "2023-12-25 10:09:58"
// },
// "createTime": "2023-12-25 10:28:24",
// "facType": 0,
// "factoryId": 41,
// "goodsCodeAndGoodsName": null,
// "goodsId": null,
// "goodsStatus": 0,
// "inStoreDay": 665,
// "isApplyFor": false,
// "keeper": null,
// "memo": null,
// "modelOrBrandStr": "23/null",
// "moldBaseMaterial": false,
// "moldStock": null,
// "outQuantity": null,
// "piNo": "Y20231225001",
// "quantity": 1950.0,
// "quantityLevel": "aaa",
// "rlsId": 223,
// "scrapCycle": "2024-09-18 00:00:00",
// "splyCode": null,
// "stayMaintainNum": 0,
// "stockSource": 0,
// "stopUse": false,
// "stopUseTitle": "",
// "storageLocation": {
// "coStorehouse": {
// "codeAndName": null,
// "createTime": "2023-12-25 10:09:44",
// "deleted": false,
// "factoryId": 41,
// "memo": null,
// "saveUser": {
// "accountId": null,
// "card": null,
// "createTime": "2023-02-08",
// "curStatus": 1,
// "deleted": false,
// "deptName": null,
// "dimissionTime": null,
// "factoryId": 41,
// "head": 0,
// "jobName": "",
// "keyValue": 453,
// "ldapName": "00075",
// "mail": null,
// "mobile": null,
// "pfDepartment": {
// "appLink": null,
// "createTime": "2023-02-08",
// "deleted": false,
// "deptCode": "26",
// "deptId": 57,
// "deptName": "",
// "deptType": 1,
// "deptTypeTitle": "",
// "keyValue": 57,
// "memo": null,
// "orders": "26",
// "parentDeptId": 41,
// "parentPath": null,
// "ucDeptId": null,
// "updateTime": "2023-02-08 16:38:31"
// },
// "ucUserId": null,
// "updateTime": "2023-02-08 17:25:13",
// "userCode": "00075",
// "userId": 453,
// "userName": "1",
// "userSex": 1,
// "userSources": "1",
// "userString": "453:A:1",
// "userType": "A",
// "yearsOfService": null
// },
// "shCode": "RB002",
// "shId": 184,
// "shLevel": null,
// "shName": "",
// "toolingType": null,
// "toolingTypeStr": null,
// "type": 0,
// "typeStr": "",
// "updateTime": "2023-12-25 10:09:58"
// },
// "cslId": 223,
// "deleted": false,
// "goodsCode": "04-05-025",
// "goodsName": null,
// "location": "RB002XBJ01",
// "mtltmrk": null,
// "specifications": null
// },
// "stovePiNo": null,
// "sumNum": 0,
// "thickness": null,
// "updateTime": null,
// "useQuantity": 1950.0,
// "zyQuantity": 0.0
// }
// ]
// this.page.total = this.data.length
// this.loading = false
// setTimeout(() => {
// this.selectionClear()
// }, 500)
}
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
:root { :root {

Loading…
Cancel
Save