From f52a77eab6297c96ff6170e24bf50a14a7a3f2ff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=89=E8=99=B9=E7=9D=BF?= <297504645@qq.com>
Date: Thu, 20 Apr 2023 15:33:34 +0800
Subject: [PATCH 1/6] =?UTF-8?q?=E9=9A=90=E8=97=8F=E4=B8=8D=E5=90=88?=
=?UTF-8?q?=E6=A0=BC=E5=93=81=E6=89=93=E5=8D=B0=E9=80=80=E8=B4=A7=E5=8D=95?=
=?UTF-8?q?=E6=8C=89=E9=92=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../PurchaseReceiptNote-msQuery.vue | 52 +++++++++----------
1 file changed, 26 insertions(+), 26 deletions(-)
diff --git a/fe/PC/src/views/rawMaterialManage/purchaseReceipt/PurchaseReceiptNote-msQuery.vue b/fe/PC/src/views/rawMaterialManage/purchaseReceipt/PurchaseReceiptNote-msQuery.vue
index de93c859d..6f572e029 100644
--- a/fe/PC/src/views/rawMaterialManage/purchaseReceipt/PurchaseReceiptNote-msQuery.vue
+++ b/fe/PC/src/views/rawMaterialManage/purchaseReceipt/PurchaseReceiptNote-msQuery.vue
@@ -103,14 +103,14 @@ export default {
name: "print-shd",
size: 'mini'
},
- {
- type: 'info',
- icon: 'el-icon-printer',
- label: '打印退货单',
- name: "print-thd",
- hide: () => { return this.hideButton('bhgpshmx') },
- size: 'mini'
- },
+ // {
+ // type: 'info',
+ // icon: 'el-icon-printer',
+ // label: '打印退货单',
+ // name: "print-thd",
+ // hide: () => { return this.hideButton('bhgpshmx') },
+ // size: 'mini'
+ // },
],
// 自定义详情明细汇总等table页
dropdownTabsData: [
@@ -230,24 +230,24 @@ export default {
})
}
// 打印退货单(不合格品收货明细显示)
- if(val == 'print-thd'){
- this.toPrintHttp(()=>{
- let _printData = JSON.parse(JSON.stringify(this.propsData))
- _printData.details = []
- this.propsData.details.forEach(item => {
- if(item.purchaseReceiptInspectStatus == 3){
- _printData.details.push(item)
- }
- });
- let _option = {
- details:{
- reason:"failedReason"
- }
- }
- let data = initPrintAllData(_printData,'thd.rdlx','UnqualifiedReason',_option);
- this.Print(data)
- })
- }
+ // if(val == 'print-thd'){
+ // this.toPrintHttp(()=>{
+ // let _printData = JSON.parse(JSON.stringify(this.propsData))
+ // _printData.details = []
+ // this.propsData.details.forEach(item => {
+ // if(item.purchaseReceiptInspectStatus == 3){
+ // _printData.details.push(item)
+ // }
+ // });
+ // let _option = {
+ // details:{
+ // reason:"failedReason"
+ // }
+ // }
+ // let data = initPrintAllData(_printData,'thd.rdlx','UnqualifiedReason',_option);
+ // this.Print(data)
+ // })
+ // }
},
// 明细table按钮
currenDrawerButtonClick(row){
From a87a19f7e1375ab47045b08352093c2a52e44c8b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=89=E8=99=B9=E7=9D=BF?= <297504645@qq.com>
Date: Thu, 20 Apr 2023 15:34:01 +0800
Subject: [PATCH 2/6] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E6=B5=81=E7=A8=8B?=
=?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=89=B9=E6=AE=8A=E5=8A=9F=E8=83=BD=E5=B0=81?=
=?UTF-8?q?=E8=A3=85?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
fe/PC/src/utils/processButtonData.js | 86 +++++++++++++++++++++-------
1 file changed, 65 insertions(+), 21 deletions(-)
diff --git a/fe/PC/src/utils/processButtonData.js b/fe/PC/src/utils/processButtonData.js
index 01d1f6b8c..c21ca0723 100644
--- a/fe/PC/src/utils/processButtonData.js
+++ b/fe/PC/src/utils/processButtonData.js
@@ -1,64 +1,90 @@
//申请流程按钮
/**
- * @param {*} that 主页this
+ * @param {*} that 主页this
+ * @param {*} label 特殊label名称更改 示例:{submitRequest:'确认提交'}
+ * @param {*} initHide 自定义返回是否隐藏函数 {submitRequest:() => {return false)}
+ * @param {*} noShow 不显示的按钮 示例:['submitRequest']
+ * initHide优先级大于noShow 如果initHide和noShow中都有对应数据,则noShow无效
+ * vue调用文件参考示例:
+ * 1、使用 label 更改按钮名称
+ DrawerButtonData: [
+ ...requestData(this,{againHandleRequest:'新按钮名称'}),
+ ]
+ * 2、使用 initHide 函数处理是否隐藏 againHandleRequestInit为业务线判断隐藏函数,返回值为false/true
+ DrawerButtonData: [
+ ...requestData(this,false,{
+ againHandleRequest:() => {return this.againHandleRequestInit([9])}
+ }),
+ ]
+ * 3、使用 noShow 隐藏按钮
+ DrawerButtonData: [
+ ...requestData(this,false,false,['againHandleRequest']),
+ ]
* @returns
*/
- export function requestData(that,label){
+ export function requestData(that,label,initHide,noShow){
return [
{
type: 'primary',
icon: 'el-icon-circle-check',
- label: label==undefined?'提交':label,
+ // label: label==undefined?'提交':label,
+ label: changeLabelText(label,'submitRequest')?changeLabelText(label,'submitRequest'):'提交',
name: "submitRequest",
- hide: () => { return hideButtonRequest(that, [1]) },
+ hide: () => { return hideButtonRequest(that, [1], initHide, noShow , 'submitRequest') },
size: 'mini'
},
{
type: 'primary',
icon: 'el-icon-circle-check',
- label: label==undefined?'审批':label,
+ // label: label==undefined?'审批':label,
+ label: changeLabelText(label,'agreeRequest')?changeLabelText(label,'agreeRequest'):'审批',
name: "agreeRequest",
- hide: () => { return hideButtonRequest(that, [2]) },
+ hide: () => { return hideButtonRequest(that, [2], initHide, noShow , 'agreeRequest') },
size: 'mini'
},
{
type: 'primary',
icon: 'el-icon-circle-check',
- label: label==undefined?'处理':label,
+ // label: label==undefined?'处理':label,
+ label: changeLabelText(label,'handleRequest')?changeLabelText(label,'handleRequest'):'处理',
name: "handleRequest",
- hide: () => { return hideButtonRequest(that, [4]) },
+ hide: () => { return hideButtonRequest(that, [4], initHide, noShow , 'handleRequest') },
size: 'mini'
},
{
type: 'primary',
icon: 'el-icon-circle-check',
- label: '执行',
+ // label: '执行',
+ label: changeLabelText(label,'againHandleRequest')?changeLabelText(label,'againHandleRequest'):'执行',
name: "againHandleRequest",
- hide: () => { return hideButtonRequest(that, [9]) },
+ hide: () => { return hideButtonRequest(that, [9], initHide, noShow , 'againHandleRequest') },
size: 'mini'
},
{
type: 'danger',
icon: 'el-icon-delete-solid',
- label: '中止',
+ // label: '中止',
+ label: changeLabelText(label,'abortRequest')?changeLabelText(label,'abortRequest'):'中止',
name: "abortRequest",
- hide: () => { return hideButtonRequest(that, [5]) },
+ hide: () => { return hideButtonRequest(that, [5], initHide, noShow , 'abortRequest') },
size: 'mini'
},
{
type: 'danger',
icon: 'el-icon-circle-check',
- label: '驳回',
+ // label: '驳回',
+ label: changeLabelText(label,'refuseRequest')?changeLabelText(label,'refuseRequest'):'驳回',
name: "refuseRequest",
- hide: () => { return hideButtonRequest(that, [2]) },
+ hide: () => { return hideButtonRequest(that, [2], initHide, noShow , 'refuseRequest') },
size: 'mini'
},
{
type: 'danger',
icon: 'el-icon-delete-solid',
- label: '取消',
+ // label: '取消',
+ label: changeLabelText(label,'cancelRequest')?changeLabelText(label,'cancelRequest'):'取消',
name: "cancelRequest",
- hide: () => { return hideButtonRequest(that, [1,2,4]) },
+ hide: () => { return hideButtonRequest(that, [1,2,4], initHide, noShow , 'cancelRequest') },
size: 'mini'
},
// {
@@ -130,13 +156,23 @@
]
}
-function hideButtonRequest(that, val) {
+function hideButtonRequest(that, val, initHide, noShow, name) {
let data = true
- val.forEach(key => {
- if (that.propsData.requestStatus == key) {
- data = false
+ // 走自定义是否隐藏事件
+ if(initHide && initHide[name]){
+ data = initHide[name]()
+ }else{
+ // 隐藏按钮中是否有此按钮
+ if(noShow && noShow.indexOf(name) >= 0){
+ data = true
+ }else{
+ val.forEach(key => {
+ if (that.propsData.requestStatus == key) {
+ data = false
+ }
+ })
}
- })
+ }
return data
}
@@ -148,4 +184,12 @@ function hideButtonJob(that, val) {
}
})
return data
+}
+
+// 更改按钮自定义特殊名称
+function changeLabelText(labels,name){
+ if(labels && labels[name]){
+ return labels[name]
+ }
+ return false
}
\ No newline at end of file
From 06531ee6e17f7d7467d67175aeefe2649786f0d8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=89=E8=99=B9=E7=9D=BF?= <297504645@qq.com>
Date: Thu, 20 Apr 2023 15:34:18 +0800
Subject: [PATCH 3/6] =?UTF-8?q?=E5=8F=AB=E6=96=99=E6=8C=89=E9=92=AE?=
=?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E6=9A=82=E5=AD=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../manualMaterialRequest/IssueRequest.vue | 59 ++++++++++++++++++-
1 file changed, 58 insertions(+), 1 deletion(-)
diff --git a/fe/PC/src/views/rawMaterialManage/manualMaterialRequest/IssueRequest.vue b/fe/PC/src/views/rawMaterialManage/manualMaterialRequest/IssueRequest.vue
index 4710a1752..1a51eb746 100644
--- a/fe/PC/src/views/rawMaterialManage/manualMaterialRequest/IssueRequest.vue
+++ b/fe/PC/src/views/rawMaterialManage/manualMaterialRequest/IssueRequest.vue
@@ -82,8 +82,32 @@ export default {
return this.displayDialog.newDialog || this.displayDialog.editDialog;
},
},
+ // againHandleRequestLabel: function (val) {
+ // // console.log(val)
+ // // return function (val) {
+ // // let _label = false
+ // // // let _details = this.propsData ? this.propsData.details : null
+ // console.log(this.propsData)
+ // // }
+ // // val.forEach(key => {
+ // // if (this.propsData.requestStatus == key) {
+ // // _label = false
+ // // }
+ // // })
+ // // return _label
+ // // return function (val) {
+ // // let data = true
+ // // val.forEach(key => {
+ // // if (this.propsData.requestStatus == key) {
+ // // data = false
+ // // }
+ // // })
+ // // return data
+ // // }
+ // }
},
data () {
+ let _this = this;
return {
URL: 'wms/store/material-request',
tableLoading: false,
@@ -95,7 +119,22 @@ export default {
this.defaultFreshBtn(),//刷新
this.defaultFilterBtn(),//筛选
],
- DrawerButtonData: requestData(this)
+ DrawerButtonData: [
+ ...requestData(this),
+ //使用 initHide 函数处理是否隐藏
+ // ...requestData(this,false,{
+ // againHandleRequest:() => {return this.againHandleRequestInit([9])}
+ // }),
+ //使用 noShow 隐藏按钮
+ // ...requestData(this,false,false,['againHandleRequest']),
+ // {
+ // type: 'primary',
+ // icon: 'el-icon-circle-check',
+ // label: '完成',
+ // name: "IssueRequest-over",
+ // size: 'mini'
+ // },
+ ],
};
},
mounted () {
@@ -117,7 +156,25 @@ export default {
}).catch(err => {
this.Loading.tableLoading = false
})
+ },
+ // 重新定义【执行按钮】显示判断
+ againHandleRequestInit(val){
+ let data = true
+ val.forEach(key => {
+ if (this.propsData.requestStatus == key) {
+ data = false
+ }
+ })
+ return data
}
+ //抽屉常用按钮
+ // drawerbutton (val) {
+ // // 完成
+ // // if(val == 'IssueRequest-over'){
+ // // } else {
+ // // drawerMixins.methods.drawerbutton(val, this)
+ // // }
+ // },
}
};
From 830431538dcf021a169d2e12463d46098e73d9c0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=89=E8=99=B9=E7=9D=BF?= <297504645@qq.com>
Date: Thu, 20 Apr 2023 16:32:47 +0800
Subject: [PATCH 4/6] =?UTF-8?q?=E8=AF=A6=E6=83=85=E6=95=B0=E7=BB=84?=
=?UTF-8?q?=E8=BD=AC=E4=B9=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
fe/PC/src/components/currenDescriptions/index.vue | 2 +-
fe/PC/src/utils/tabsDesTions/index.js | 6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/fe/PC/src/components/currenDescriptions/index.vue b/fe/PC/src/components/currenDescriptions/index.vue
index fc49a673f..5bf4242e9 100644
--- a/fe/PC/src/components/currenDescriptions/index.vue
+++ b/fe/PC/src/components/currenDescriptions/index.vue
@@ -52,7 +52,7 @@
>
- {{ propsData[item.prop] }}
+ {{ propsData[item.prop] ? propsData[item.prop] + "" : "" }}
Date: Thu, 20 Apr 2023 16:46:59 +0800
Subject: [PATCH 5/6] =?UTF-8?q?=E4=B8=BB=E8=A1=A8=E6=95=B0=E7=BB=84?=
=?UTF-8?q?=E8=BD=AC=E4=B9=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
fe/PC/src/components/umyTable/index.vue | 2 +-
fe/PC/src/utils/tableColumns/index.js | 6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/fe/PC/src/components/umyTable/index.vue b/fe/PC/src/components/umyTable/index.vue
index 5f427db67..e395c3a3c 100644
--- a/fe/PC/src/components/umyTable/index.vue
+++ b/fe/PC/src/components/umyTable/index.vue
@@ -310,7 +310,7 @@
v-if="item.type == 'name' || !item.type"
@click="item.type == 'name' && inlineDialog(scope.row)"
:class="{ spamHover: item.type == 'name' }"
- >{{ scope.row[item.prop] }}{{ scope.row[item.prop] ? scope.row[item.prop] + "" : "" }}
diff --git a/fe/PC/src/utils/tableColumns/index.js b/fe/PC/src/utils/tableColumns/index.js
index d4d062d3d..0edc64fac 100644
--- a/fe/PC/src/utils/tableColumns/index.js
+++ b/fe/PC/src/utils/tableColumns/index.js
@@ -657,8 +657,10 @@ export const TransactionType = [
{ label: "来源库存状态", prop: 'outInventoryStatuses', type: "filterList", filters: "inventoryStage" },
{ label: "目标库存状态", prop: 'inInventoryStatuses', type: "filterList", filters: "inventoryStage" },
{ label: "是否可用", prop: 'enabled', type: "filter", filters: "whetherOrNot" },
- { label: "入库库区列表", prop: 'inLocationAreas', type: "filterList", filters: "inventoryStage" },
- { label: "出库库区列表", prop: 'outLocationAreas', type: "filterList", filters: "inventoryStage" },
+ // { label: "入库库区列表", prop: 'inLocationAreas', type: "filterList", filters: "inventoryStage" },
+ // { label: "出库库区列表", prop: 'outLocationAreas', type: "filterList", filters: "inventoryStage" },
+ { label: "入库库区列表", prop: 'inLocationAreas' },
+ { label: "出库库区列表", prop: 'outLocationAreas' },
{ label: "自动提交审批", prop: 'autoSubmitRequest', type: "filter", filters: "whetherOrNot" },
{ label: "自动审批通过", prop: 'autoAgreeRequest', type: "filter", filters: "whetherOrNot" },
{ label: "自动执行", prop: 'autoHandleRequest', type: "filter", filters: "whetherOrNot" },
From ee7808d9ee54309b4d939f5be09b68e35565e450 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=89=E8=99=B9=E7=9D=BF?= <297504645@qq.com>
Date: Thu, 20 Apr 2023 17:10:01 +0800
Subject: [PATCH 6/6] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E6=B5=81=E7=A8=8B?=
=?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
fe/PC/src/mixins/drawerMixins.js | 29 ++++++++++++++-----
fe/PC/src/utils/processButtonData.js | 2 +-
.../manualMaterialRequest/IssueRequest.vue | 16 +++++-----
3 files changed, 31 insertions(+), 16 deletions(-)
diff --git a/fe/PC/src/mixins/drawerMixins.js b/fe/PC/src/mixins/drawerMixins.js
index fedd69bed..490e906d8 100644
--- a/fe/PC/src/mixins/drawerMixins.js
+++ b/fe/PC/src/mixins/drawerMixins.js
@@ -54,6 +54,7 @@ export const drawerMixins = {
this.displayDialog.editDialog = true
}
// 申请业务 流程按钮实现
+ // 【提交】操作
if (val == 'submitRequest') {
that.Loading.appMainLoading = true
processRequest(that.propsData.id, that.URL + '/submit/').then(res => {
@@ -67,7 +68,9 @@ export const drawerMixins = {
console.log(err)
that.Loading.appMainLoading = false
})
- } else if (val == 'agreeRequest') {
+ }
+ // 【审批】操作
+ else if (val == 'agreeRequest') {
that.Loading.appMainLoading = true
processRequest(that.propsData.id, that.URL + '/agree/').then(res => {
that.$successMsg('已同意')
@@ -80,7 +83,9 @@ export const drawerMixins = {
console.log(err)
that.Loading.appMainLoading = false
})
- } else if (val == 'handleRequest') {
+ }
+ // 【处理】操作
+ else if (val == 'handleRequest') {
that.Loading.appMainLoading = true
processRequest(that.propsData.id, that.URL + '/handle/').then(res => {
that.$successMsg('处理完成')
@@ -93,7 +98,9 @@ export const drawerMixins = {
console.log(err)
that.Loading.appMainLoading = false
})
- } else if (val == 'againHandleRequest') { // 针对部分完成情况下,再次执行任务操作
+ }
+ // 【执行】操作
+ else if (val == 'againHandleRequest') { // 针对部分完成情况下,再次执行任务操作
that.Loading.appMainLoading = true
processRequest(that.propsData.id, that.URL + '/handle/').then(res => {
that.$successMsg('执行成功')
@@ -106,7 +113,9 @@ export const drawerMixins = {
console.log(err)
that.Loading.appMainLoading = false
})
- } else if (val == 'abortRequest') {
+ }
+ // 【中止】操作
+ else if (val == 'abortRequest') {
that.Loading.appMainLoading = true
processRequest(that.propsData.id, that.URL + '/abort/').then(res => {
that.$successMsg('已中止')
@@ -119,7 +128,9 @@ export const drawerMixins = {
console.log(err)
that.Loading.appMainLoading = false
})
- } else if (val == 'completeRequest') {
+ }
+ // 【执行完成】操作
+ else if (val == 'completeRequest') {
that.Loading.appMainLoading = true
processRequest(that.propsData.id, that.URL + '/complete/').then(res => {
that.$successMsg('执行完成')
@@ -132,7 +143,9 @@ export const drawerMixins = {
console.log(err)
that.Loading.appMainLoading = false
})
- } else if (val == 'cancelRequest') {
+ }
+ // 【取消】操作
+ else if (val == 'cancelRequest') {
that.Loading.appMainLoading = true
processRequest(that.propsData.id, that.URL + '/cancel/').then(res => {
that.$successMsg('已取消')
@@ -145,7 +158,9 @@ export const drawerMixins = {
console.log(err)
that.Loading.appMainLoading = false
})
- } else if (val == 'refuseRequest') {
+ }
+ // 【驳回】操作
+ else if (val == 'refuseRequest') {
that.Loading.appMainLoading = true
processRequest(that.propsData.id, that.URL + '/refuse/').then(res => {
that.$successMsg('已驳回')
diff --git a/fe/PC/src/utils/processButtonData.js b/fe/PC/src/utils/processButtonData.js
index c21ca0723..a50c346db 100644
--- a/fe/PC/src/utils/processButtonData.js
+++ b/fe/PC/src/utils/processButtonData.js
@@ -90,7 +90,7 @@
// {
// type: 'primary',
// icon: 'el-icon-circle-check',
- // label: '执行',
+ // label: '执行完成',
// name: "completeRequest",
// hide: () => { return hideButtonRequest(that, [5]) },
// size: 'mini'
diff --git a/fe/PC/src/views/rawMaterialManage/manualMaterialRequest/IssueRequest.vue b/fe/PC/src/views/rawMaterialManage/manualMaterialRequest/IssueRequest.vue
index 1a51eb746..214fed896 100644
--- a/fe/PC/src/views/rawMaterialManage/manualMaterialRequest/IssueRequest.vue
+++ b/fe/PC/src/views/rawMaterialManage/manualMaterialRequest/IssueRequest.vue
@@ -127,13 +127,13 @@ export default {
// }),
//使用 noShow 隐藏按钮
// ...requestData(this,false,false,['againHandleRequest']),
- // {
- // type: 'primary',
- // icon: 'el-icon-circle-check',
- // label: '完成',
- // name: "IssueRequest-over",
- // size: 'mini'
- // },
+ {
+ type: 'primary',
+ icon: 'el-icon-circle-check',
+ label: '完成',
+ name: "completeRequest",
+ size: 'mini'
+ },
],
};
},
@@ -166,7 +166,7 @@ export default {
}
})
return data
- }
+ },
//抽屉常用按钮
// drawerbutton (val) {
// // 完成