From 63e1ee997a5318e628b992f969bdac2fec6dbf14 Mon Sep 17 00:00:00 2001
From: yangpeixing <yangpeixing@hnkhzn.com>
Date: 星期四, 04 十二月 2025 14:39:00 +0800
Subject: [PATCH] 1
---
项目代码/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/stock/Dt_BillGroupStock.jsx | 359 +++++++++++++++++++++++++++++++++++++++--------------------
1 files changed, 234 insertions(+), 125 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/stock/Dt_BillGroupStock.jsx" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/stock/Dt_BillGroupStock.jsx"
index 870425f..96924f4 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/stock/Dt_BillGroupStock.jsx"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/stock/Dt_BillGroupStock.jsx"
@@ -8,13 +8,13 @@
//姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜
// import gridHeader from "./demo_Product/Dt_BillGroupStockDetail.vue";
-import gridHeader from './extend/printView.vue'
-// import gridBody from "./extend/SupplementationData.vue"
+// import gridHeader from './extend/printView.vue'
+import gridBody from './extend/Remark.vue'
let extension = {
components: {
//鏌ヨ鐣岄潰鎵╁睍缁勪欢
- gridHeader: gridHeader,
- gridBody: '',
+ gridHeader: '',
+ gridBody: gridBody,
gridFooter: '',
//鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢
modelHeader: '',
@@ -26,145 +26,224 @@
methods: {
//涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄�
onInit() {
+ // this.detailOptions.buttons.unshift({
+ // name: '鍏朵粬鍑哄簱', //鎸夐挳鍚嶇О
+ // icon: 'el-icon-document', //鎸夐挳鍥炬爣vue2鐗堟湰瑙乮view鏂囨。icon锛寁ue3鐗堟湰瑙乪lement ui鏂囨。icon(娉ㄦ剰涓嶆槸element puls鏂囨。)
+ // type: 'primary',
+ // onClick: function () {
+ // this.$confirm('鏄惁鍏朵粬鍑哄簱', "璀﹀憡浣犳鍦ㄤ娇鐢ㄥ叾浠栧嚭搴�", {
+ // confirmButtonText: '纭畾',
+ // cancelButtonText: '鍙栨秷',
+ // type: 'warning',
+ // center: true
+ // }).then(() => {
+ // this.http.post(`/api/Task/OtherOutBoundTaskAsync`, row, "姝e湪瀹屾垚浠诲姟").then((res) => {
+ // //绀轰緥锛氳皟鐢ㄥ悗鍙版帴鍙�
+ // if (res.status) {
+ // this.$Message.success('浠诲姟瀹屾垚')
+ // } else {
+ // this.$Message.error(res.message) //閿欒鎻愮ず
+ // }
+ // })
+ // })
+ // }
+ // });
+ var DoubleTrayBtn = this.buttons.find(x => x.value == "DoubleTray");
+ if (DoubleTrayBtn != null) {
+ DoubleTrayBtn.onClick = () => {
+ let rows = this.$refs.table.getSelected();
+ if (rows.length == 0) return this.$error("璇烽�夋嫨鏁版嵁!");
+ if (rows.length > 1) return this.$error("璇烽�夋嫨鏁版嵁!");
+ this.http.post(`/api/Task/OutBoundTaskAsync?palletCode=${rows[0].palletCode}&remark=${""}&doubleTray=${1}`, {}, '鏁版嵁澶勭悊涓�...')
+ .then((x) => {
+ if (x.status) {
+ this.$Message.success('鎴愬姛.');
+ this.refresh();
+ } else {
+ return this.$error(x.message);
+ }
+ });
+ }
+ }
+ this.boxButtons.push({
+ name: '纭畾鍑哄簱', //鎸夐挳鍚嶇О
+ type: 'danger',
+ icon: 'el-icon-check',
+ disabled: false,
+ plain: true,
+ onClick: function () {
+ if (this.editFormFields.remark == '鍏朵粬鍑哄簱') {
+ this.$confirm('鏄惁鍏朵粬鍑哄簱', '璀﹀憡', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning',
+ center: true,
+ customClass: 'large-text-confirm'
+ }).then(() => {
+ this.http
+ .post(
+ `/api/Task/OtherOutBoundTaskAsync`,
+ this.$refs.detail.rowData,
+ '姝e湪鐢熸垚鍑哄簱浠诲姟'
+ )
+ .then((res) => {
+ if (res.status) {
+ this.$Message.success(res.message)
+ this.boxModel = false
+ this.refresh()
+ } else {
+ this.$Message.error(res.message) //閿欒鎻愮ず
+ }
+ })
+ })
+ } else {
+ this.$confirm('鏄惁璋冩嫧鍑哄簱', '璀﹀憡', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning',
+ center: true,
+ customClass: 'large-text-confirm'
+ }).then(() => {
+ this.http
+ .post(
+ `/api/Task/HandAllocateOutBoundTaskAsync`,
+ this.$refs.detail.rowData,
+ '姝e湪鐢熸垚鍑哄簱浠诲姟'
+ )
+ .then((res) => {
+ if (res.status) {
+ this.$Message.success(res.message)
+ this.boxModel = false
+ this.refresh()
+ } else {
+ this.$Message.error(res.message) //閿欒鎻愮ず
+ }
+ })
+ })
+ }
+ }
+ })
+ this.boxButtons.push({
+ name: '鎵撳嵃浜岀淮鐮�', //鎸夐挳鍚嶇О
+ type: 'primary',
+ icon: 'el-icon-check',
+ disabled: false,
+ plain: true,
+ onClick: function () {
+ let rows = this.$refs.detail.getSelected()
+ if (rows.length == 0) return this.$error("璇烽�夋嫨鏁版嵁!");
+ let orderNos = rows.map(x => {
+ return x.orderNo
+ })
+ this.$confirm('鏄惁鎵撳嵃鍗曟嵁', '璀﹀憡', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning',
+ center: true,
+ customClass: 'large-text-confirm'
+ }).then(() => {
+ this.http
+ .post(
+ `/api/StockInfo/PrintOrder`,
+ orderNos,
+ '姝e湪鎵撳嵃'
+ )
+ .then((res) => {
+ if (res.status) {
+ this.$Message.success(res.message)
+ this.boxModel = false
+ this.refresh()
+ } else {
+ this.$Message.error(res.message) //閿欒鎻愮ず
+ }
+ })
+ })
+ }
+ })
this.columns.push({
- title: "鎿嶄綔",
- field: "鎿嶄綔",
- width: 150,
- align: "left", // 'center',
+ title: '鎿嶄綔',
+ field: '鎿嶄綔',
+ width: 250,
+ align: 'center', // 'center',
render: (h, { row, column, index }) => {
return (
<div>
<el-button
onClick={($e) => {
- // this.$refs.table.load();
- // console.log(this.$refs.table);
- this.$refs.gridHeader.open(row);
+ ; (row.remark = '鍏朵粬鍑哄簱'), this.linkDataNew(row, '鍏朵粬鍑哄簱')
}}
type="primary"
- plain
- style="height:26px; padding: 10px !important;"
>
- 鎵撳嵃
- </el-button>
+ 鍏朵粬鍑哄簱
+ </el-button>
+
+ <el-button
+ onClick={($e) => {
+ ; (row.remark = '璋冩嫧鍑哄簱'), this.linkDataNew(row, '璋冩嫧鍑哄簱')
+ }}
+ type="success"
+ >
+ 璋冩嫧鍑哄簱
+ </el-button>
+
+ <el-button
+ onClick={($e) => {
+ this.$refs.gridBody.open(row.palletCode)
+ }}
+ type="warning"
+ >
+ 鐩樼偣鍑哄簱
+ </el-button>
</div>
- );
- },
- });
-
-
-
-
-
-
-
-
-
-
- //妗嗘灦鍒濆鍖栭厤缃墠锛�
- let OutBoundBtn = this.buttons.find((x) => x.value == 'OutBound')
- if (OutBoundBtn) {
- OutBoundBtn.onClick = function () {
- // this.$Message.success('鐐瑰嚮浜嗘寜閽�')
- let row = this.$refs.table.getSelected() //鑾峰彇閫変腑鐨勮
- if (row <= 0) {
- //濡傛灉娌℃湁閫変腑琛�
- this.$Message.error('璇烽�夋嫨涓�琛屾暟鎹�')
- return
- }
- let locationCode = row[0].locationCode
- let palletCode = row[0].palletCode
- this.http
- .get(
- `/api/Task/CreateAndSendOutboundTask?locationCode=${locationCode}&palletCode=${palletCode}`,
- {},
- '姝e湪鍒涘缓浠诲姟'
- )
- .then((res) => {
- //绀轰緥锛氳皟鐢ㄥ悗鍙版帴鍙�
- if (res.status) {
- this.$Message.success('鍒涘缓浠诲姟鎴愬姛')
- console.log(res)
- this.refresh() //鍒锋柊琛ㄦ牸
- } else {
- this.$Message.error(res.message) //閿欒鎻愮ず
- }
- })
+ )
}
- }
-
-
- var btnSupplementationData = this.buttons.find(x => x.value == "SupplementationData");
- if (btnSupplementationData != null) {
- btnSupplementationData.onClick = () => {
- let rows = this.$refs.table.getSelected();
- if (rows.length == 0) {
- return this.$error("璇烽�夋嫨鏁版嵁!");
- } else if (rows.length > 1) {
- return this.$error("鍙兘閫夋嫨鍗曟潯鏁版嵁");
- }
- this.$refs.gridBody.open(rows[0].palletCode);
- this.refresh();
- }
-
- }
-
+ })
//绀轰緥锛氳缃慨鏀规柊寤恒�佺紪杈戝脊鍑烘瀛楁鏍囩鐨勯暱搴�
this.boxOptions.labelWidth = 150
-
- // this.columns.push({
- // title: "鎿嶄綔",
- // field: "鎿嶄綔",
- // width: 150,
- // align: "left", // 'center',
- // render: (h, { row, column, index }) => {
- // return (
- // <div>
- // <el-button
- // onClick={($e) => {
- // this.$refs.gridHeader.openModel1(row);
- // }}
- // type="primary"
- // plain
- // style="height:26px; padding: 10px !important;"
- // >
- // 鏌ョ湅搴撳瓨鏄庣粏
- // </el-button>
- // </div>
- // );
- // },
- // });
-
+ this.buttons.forEach((btn) => {
+ if (btn.name == '缂栬緫') {
+ btn.hidden = true
+ }
+ })
+ this.boxButtons.forEach((btn) => {
+ if (btn.name == '淇� 瀛�') {
+ btn.hidden = true
+ }
+ })
this.columns.forEach((column) => {
- //淇敼棰滆壊
- if (column.field == 'roadwayNo') {
+ if (column.field == 'floor') {
+ const floorMap = {
+ '1F': '涓�妤�',
+ '2F': '浜屾ゼ'
+ }
column.formatter = (row) => {
- // return '<span style="color: #2d8cf0;">' + row?.locationInfo?.roadwayNo + '</span>'
- return row?.locationInfo?.roadwayNo
+ return floorMap[row?.locationInfo?.floor] || ''
}
}
- if (column.field == 'materielCode') {
+ if (column.field == 'areaId') {
+ const floorMap = {
+ 1: '涓�妤煎爢鍨涙満鍖哄煙',
+ 2: '涓�妤糀GV鍑哄簱缂撳瓨鍖�',
+ 3: '涓�妤糀GV绔嬪簱缂撳瓨鍖�',
+ 4: '涓�妤糀GV鍏ュ簱缂撳瓨鍖�',
+ 5: '浜屾ゼB4-G4缂撳瓨鍖�',
+ 6: '浜屾ゼB5-G5缂撳瓨鍖�'
+ }
column.formatter = (row) => {
- // return '<span style="color: #2d8cf0;">' + row?.locationInfo?.roadwayNo + '</span>'
- return row?.stockInfoDetails[0]?.materielCode
+ return floorMap[row?.locationInfo?.areaId] || ''
}
}
- //鏍煎紡鍖栨棩鏈�
- // 妫�鏌ュ綋鍓嶅垪鐨勫瓧娈垫槸鍚︿负 'locationStatus'
if (column.field == 'locationStatus') {
- // 浣跨敤瀵硅薄瀛楅潰閲忔潵鏄犲皠 'locationStatus' 鐨勫�煎拰瀵瑰簲鐨勬枃鏈�
const statusMap = {
- '-1': '鍏ㄩ儴',
- '0': '绌洪棽',
- '1': '閿佸畾',
- '2': '鏈夎揣',
- '3': '鏈夎揣绂佺敤',
- '4': '鏃犺揣绂佺敤'
- };
- // 瀹氫箟涓�涓牸寮忓寲鍑芥暟锛屾牴鎹� 'locationStatus' 鐨勫�艰繑鍥炵浉搴旂殑鏂囨湰
+ 0: '绌洪棽',
+ 1: '閿佸畾',
+ 2: '鏈夎揣',
+ 3: '鏈夎揣绂佺敤',
+ 4: '鏃犺揣绂佺敤'
+ }
column.formatter = (row) => {
- // 浣跨敤 statusMap 瀵硅薄鏉ヨ幏鍙栧搴旂殑鏂囨湰锛屽鏋滄病鏈夊尮閰嶅垯杩斿洖 '鏈煡鐘舵��'
- return statusMap[row?.locationInfo?.locationStatus] || '鏈煡鐘舵��';
+ return statusMap[row?.locationInfo?.locationStatus] || ''
}
}
})
@@ -172,9 +251,7 @@
onInited() {
//妗嗘灦鍒濆鍖栭厤缃悗
//濡傛灉瑕侀厤缃槑缁嗚〃,鍦ㄦ鏂规硶鎿嶄綔
- this.detailOptions.columns.forEach(column=>{
- console.log(column)
- });
+ this.detailOptions.columns.forEach((column) => { })
},
searchBefore(param) {
//鐣岄潰鏌ヨ鍓�,鍙互缁檖aram.wheres娣诲姞鏌ヨ鍙傛暟
@@ -182,7 +259,6 @@
return true
},
searchAfter(result) {
- console.log(result)
return true
},
addBefore(formData) {
@@ -195,10 +271,43 @@
},
rowClick({ row, column, event }) {
//鏌ヨ鐣岄潰鐐瑰嚮琛屼簨浠�
- // this.$refs.table.$refs.table.toggleRowSelection(row) //鍗曞嚮琛屾椂閫変腑褰撳墠琛�;
+ //this.$refs.table.$refs.table.toggleRowSelection(row) //鍗曞嚮琛屾椂閫変腑褰撳墠琛�;
},
modelOpenAfter(row) {
-
+ const isAdd = this.currentAction == 'Add' //鍒ゆ柇鏄惁涓烘柊寤烘搷浣�
+ //闅愯棌鏄庣粏琛ㄦ寜閽�
+ // boxButtons
+ this.detailOptions.buttons.forEach((btn) => {
+ if (btn.name == '娣诲姞琛�') {
+ btn.hidden = true
+ //鎴栬�呰缃彧璇�
+ //btn.readonly=true;
+ }
+ })
+
+ const isDel = this.currentAction == 'Add' //鍒ゆ柇鏄惁涓烘柊寤烘搷浣�
+ //闅愯棌鏄庣粏琛ㄦ寜閽�
+ this.detailOptions.buttons.forEach((btn) => {
+ if (btn.name == '鍒犻櫎琛�') {
+ btn.hidden = true
+ //鎴栬�呰缃彧璇�
+ //btn.readonly=true;
+ }
+ })
+ this.detailOptions.buttons.forEach((btn) => {
+ if (btn.name == '瀵煎叆') {
+ btn.hidden = true
+ //鎴栬�呰缃彧璇�
+ //btn.readonly=true;
+ }
+ })
+ this.detailOptions.buttons.forEach((btn) => {
+ if (btn.name == '瀵煎嚭') {
+ btn.hidden = true
+ //鎴栬�呰缃彧璇�
+ //btn.readonly=true;
+ }
+ })
//鐐瑰嚮缂栬緫銆佹柊寤烘寜閽脊鍑烘鍚庯紝鍙互鍦ㄦ澶勫啓閫昏緫锛屽锛屼粠鍚庡彴鑾峰彇鏁版嵁
//(1)鍒ゆ柇鏄紪杈戣繕鏄柊寤烘搷浣滐細 this.currentAction=='Add';
//(2)缁欏脊鍑烘璁剧疆榛樿鍊�
--
Gitblit v1.9.3