Browse Source

Merge branch 'dev_web' of http://dev.ccwin-in.com:3000/BoXu.Zheng/WZC2 into dev_web

dev_web_online
陈薪名 2 years ago
parent
commit
5983a6372d
  1. 2
      fe/PC/src/components/currenDescriptions/index.vue
  2. 2
      fe/PC/src/components/umyTable/index.vue
  3. 29
      fe/PC/src/mixins/drawerMixins.js
  4. 88
      fe/PC/src/utils/processButtonData.js
  5. 6
      fe/PC/src/utils/tableColumns/index.js
  6. 2
      fe/PC/src/utils/tabsDesTions/index.js
  7. 61
      fe/PC/src/views/rawMaterialManage/manualMaterialRequest/IssueRequest.vue
  8. 52
      fe/PC/src/views/rawMaterialManage/purchaseReceipt/PurchaseReceiptNote-msQuery.vue

2
fe/PC/src/components/currenDescriptions/index.vue

@ -52,7 +52,7 @@
></el-input> ></el-input>
</template> </template>
</span> </span>
<span v-else>{{ propsData[item.prop] }}</span> <span v-else>{{ propsData[item.prop] ? propsData[item.prop] + "" : "" }}</span>
</el-descriptions-item> </el-descriptions-item>
</template> </template>
<el-descriptions-item <el-descriptions-item

2
fe/PC/src/components/umyTable/index.vue

@ -310,7 +310,7 @@
v-if="item.type == 'name' || !item.type" v-if="item.type == 'name' || !item.type"
@click="item.type == 'name' && inlineDialog(scope.row)" @click="item.type == 'name' && inlineDialog(scope.row)"
:class="{ spamHover: item.type == 'name' }" :class="{ spamHover: item.type == 'name' }"
>{{ scope.row[item.prop] }}</span >{{ scope.row[item.prop] ? scope.row[item.prop] + "" : "" }}</span
> >
</el-form> </el-form>
</template> </template>

29
fe/PC/src/mixins/drawerMixins.js

@ -54,6 +54,7 @@ export const drawerMixins = {
this.displayDialog.editDialog = true this.displayDialog.editDialog = true
} }
// 申请业务 流程按钮实现 // 申请业务 流程按钮实现
// 【提交】操作
if (val == 'submitRequest') { if (val == 'submitRequest') {
that.Loading.appMainLoading = true that.Loading.appMainLoading = true
processRequest(that.propsData.id, that.URL + '/submit/').then(res => { processRequest(that.propsData.id, that.URL + '/submit/').then(res => {
@ -67,7 +68,9 @@ export const drawerMixins = {
console.log(err) console.log(err)
that.Loading.appMainLoading = false that.Loading.appMainLoading = false
}) })
} else if (val == 'agreeRequest') { }
// 【审批】操作
else if (val == 'agreeRequest') {
that.Loading.appMainLoading = true that.Loading.appMainLoading = true
processRequest(that.propsData.id, that.URL + '/agree/').then(res => { processRequest(that.propsData.id, that.URL + '/agree/').then(res => {
that.$successMsg('已同意') that.$successMsg('已同意')
@ -80,7 +83,9 @@ export const drawerMixins = {
console.log(err) console.log(err)
that.Loading.appMainLoading = false that.Loading.appMainLoading = false
}) })
} else if (val == 'handleRequest') { }
// 【处理】操作
else if (val == 'handleRequest') {
that.Loading.appMainLoading = true that.Loading.appMainLoading = true
processRequest(that.propsData.id, that.URL + '/handle/').then(res => { processRequest(that.propsData.id, that.URL + '/handle/').then(res => {
that.$successMsg('处理完成') that.$successMsg('处理完成')
@ -93,7 +98,9 @@ export const drawerMixins = {
console.log(err) console.log(err)
that.Loading.appMainLoading = false that.Loading.appMainLoading = false
}) })
} else if (val == 'againHandleRequest') { // 针对部分完成情况下,再次执行任务操作 }
// 【执行】操作
else if (val == 'againHandleRequest') { // 针对部分完成情况下,再次执行任务操作
that.Loading.appMainLoading = true that.Loading.appMainLoading = true
processRequest(that.propsData.id, that.URL + '/handle/').then(res => { processRequest(that.propsData.id, that.URL + '/handle/').then(res => {
that.$successMsg('执行成功') that.$successMsg('执行成功')
@ -106,7 +113,9 @@ export const drawerMixins = {
console.log(err) console.log(err)
that.Loading.appMainLoading = false that.Loading.appMainLoading = false
}) })
} else if (val == 'abortRequest') { }
// 【中止】操作
else if (val == 'abortRequest') {
that.Loading.appMainLoading = true that.Loading.appMainLoading = true
processRequest(that.propsData.id, that.URL + '/abort/').then(res => { processRequest(that.propsData.id, that.URL + '/abort/').then(res => {
that.$successMsg('已中止') that.$successMsg('已中止')
@ -119,7 +128,9 @@ export const drawerMixins = {
console.log(err) console.log(err)
that.Loading.appMainLoading = false that.Loading.appMainLoading = false
}) })
} else if (val == 'completeRequest') { }
// 【执行完成】操作
else if (val == 'completeRequest') {
that.Loading.appMainLoading = true that.Loading.appMainLoading = true
processRequest(that.propsData.id, that.URL + '/complete/').then(res => { processRequest(that.propsData.id, that.URL + '/complete/').then(res => {
that.$successMsg('执行完成') that.$successMsg('执行完成')
@ -132,7 +143,9 @@ export const drawerMixins = {
console.log(err) console.log(err)
that.Loading.appMainLoading = false that.Loading.appMainLoading = false
}) })
} else if (val == 'cancelRequest') { }
// 【取消】操作
else if (val == 'cancelRequest') {
that.Loading.appMainLoading = true that.Loading.appMainLoading = true
processRequest(that.propsData.id, that.URL + '/cancel/').then(res => { processRequest(that.propsData.id, that.URL + '/cancel/').then(res => {
that.$successMsg('已取消') that.$successMsg('已取消')
@ -145,7 +158,9 @@ export const drawerMixins = {
console.log(err) console.log(err)
that.Loading.appMainLoading = false that.Loading.appMainLoading = false
}) })
} else if (val == 'refuseRequest') { }
// 【驳回】操作
else if (val == 'refuseRequest') {
that.Loading.appMainLoading = true that.Loading.appMainLoading = true
processRequest(that.propsData.id, that.URL + '/refuse/').then(res => { processRequest(that.propsData.id, that.URL + '/refuse/').then(res => {
that.$successMsg('已驳回') that.$successMsg('已驳回')

88
fe/PC/src/utils/processButtonData.js

@ -1,70 +1,96 @@
//申请流程按钮 //申请流程按钮
/** /**
* @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 * @returns
*/ */
export function requestData(that,label){ export function requestData(that,label,initHide,noShow){
return [ return [
{ {
type: 'primary', type: 'primary',
icon: 'el-icon-circle-check', icon: 'el-icon-circle-check',
label: label==undefined?'提交':label, // label: label==undefined?'提交':label,
label: changeLabelText(label,'submitRequest')?changeLabelText(label,'submitRequest'):'提交',
name: "submitRequest", name: "submitRequest",
hide: () => { return hideButtonRequest(that, [1]) }, hide: () => { return hideButtonRequest(that, [1], initHide, noShow , 'submitRequest') },
size: 'mini' size: 'mini'
}, },
{ {
type: 'primary', type: 'primary',
icon: 'el-icon-circle-check', icon: 'el-icon-circle-check',
label: label==undefined?'审批':label, // label: label==undefined?'审批':label,
label: changeLabelText(label,'agreeRequest')?changeLabelText(label,'agreeRequest'):'审批',
name: "agreeRequest", name: "agreeRequest",
hide: () => { return hideButtonRequest(that, [2]) }, hide: () => { return hideButtonRequest(that, [2], initHide, noShow , 'agreeRequest') },
size: 'mini' size: 'mini'
}, },
{ {
type: 'primary', type: 'primary',
icon: 'el-icon-circle-check', icon: 'el-icon-circle-check',
label: label==undefined?'处理':label, // label: label==undefined?'处理':label,
label: changeLabelText(label,'handleRequest')?changeLabelText(label,'handleRequest'):'处理',
name: "handleRequest", name: "handleRequest",
hide: () => { return hideButtonRequest(that, [4]) }, hide: () => { return hideButtonRequest(that, [4], initHide, noShow , 'handleRequest') },
size: 'mini' size: 'mini'
}, },
{ {
type: 'primary', type: 'primary',
icon: 'el-icon-circle-check', icon: 'el-icon-circle-check',
label: '执行', // label: '执行',
label: changeLabelText(label,'againHandleRequest')?changeLabelText(label,'againHandleRequest'):'执行',
name: "againHandleRequest", name: "againHandleRequest",
hide: () => { return hideButtonRequest(that, [9]) }, hide: () => { return hideButtonRequest(that, [9], initHide, noShow , 'againHandleRequest') },
size: 'mini' size: 'mini'
}, },
{ {
type: 'danger', type: 'danger',
icon: 'el-icon-delete-solid', icon: 'el-icon-delete-solid',
label: '中止', // label: '中止',
label: changeLabelText(label,'abortRequest')?changeLabelText(label,'abortRequest'):'中止',
name: "abortRequest", name: "abortRequest",
hide: () => { return hideButtonRequest(that, [5]) }, hide: () => { return hideButtonRequest(that, [5], initHide, noShow , 'abortRequest') },
size: 'mini' size: 'mini'
}, },
{ {
type: 'danger', type: 'danger',
icon: 'el-icon-circle-check', icon: 'el-icon-circle-check',
label: '驳回', // label: '驳回',
label: changeLabelText(label,'refuseRequest')?changeLabelText(label,'refuseRequest'):'驳回',
name: "refuseRequest", name: "refuseRequest",
hide: () => { return hideButtonRequest(that, [2]) }, hide: () => { return hideButtonRequest(that, [2], initHide, noShow , 'refuseRequest') },
size: 'mini' size: 'mini'
}, },
{ {
type: 'danger', type: 'danger',
icon: 'el-icon-delete-solid', icon: 'el-icon-delete-solid',
label: '取消', // label: '取消',
label: changeLabelText(label,'cancelRequest')?changeLabelText(label,'cancelRequest'):'取消',
name: "cancelRequest", name: "cancelRequest",
hide: () => { return hideButtonRequest(that, [1,2,4]) }, hide: () => { return hideButtonRequest(that, [1,2,4], initHide, noShow , 'cancelRequest') },
size: 'mini' size: 'mini'
}, },
// { // {
// type: 'primary', // type: 'primary',
// icon: 'el-icon-circle-check', // icon: 'el-icon-circle-check',
// label: '执行', // label: '执行完成',
// name: "completeRequest", // name: "completeRequest",
// hide: () => { return hideButtonRequest(that, [5]) }, // hide: () => { return hideButtonRequest(that, [5]) },
// size: 'mini' // size: 'mini'
@ -130,13 +156,23 @@
] ]
} }
function hideButtonRequest(that, val) { function hideButtonRequest(that, val, initHide, noShow, name) {
let data = true let data = true
val.forEach(key => { // 走自定义是否隐藏事件
if (that.propsData.requestStatus == key) { if(initHide && initHide[name]){
data = false 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 return data
} }
@ -148,4 +184,12 @@ function hideButtonJob(that, val) {
} }
}) })
return data return data
}
// 更改按钮自定义特殊名称
function changeLabelText(labels,name){
if(labels && labels[name]){
return labels[name]
}
return false
} }

6
fe/PC/src/utils/tableColumns/index.js

@ -657,8 +657,10 @@ export const TransactionType = [
{ label: "来源库存状态", prop: 'outInventoryStatuses', type: "filterList", filters: "inventoryStage" }, { label: "来源库存状态", prop: 'outInventoryStatuses', type: "filterList", filters: "inventoryStage" },
{ label: "目标库存状态", prop: 'inInventoryStatuses', type: "filterList", filters: "inventoryStage" }, { label: "目标库存状态", prop: 'inInventoryStatuses', type: "filterList", filters: "inventoryStage" },
{ label: "是否可用", prop: 'enabled', type: "filter", filters: "whetherOrNot" }, { label: "是否可用", prop: 'enabled', type: "filter", filters: "whetherOrNot" },
{ label: "入库库区列表", prop: 'inLocationAreas', type: "filterList", filters: "inventoryStage" }, // { label: "入库库区列表", prop: 'inLocationAreas', type: "filterList", filters: "inventoryStage" },
{ label: "出库库区列表", prop: 'outLocationAreas', 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: 'autoSubmitRequest', type: "filter", filters: "whetherOrNot" },
{ label: "自动审批通过", prop: 'autoAgreeRequest', type: "filter", filters: "whetherOrNot" }, { label: "自动审批通过", prop: 'autoAgreeRequest', type: "filter", filters: "whetherOrNot" },
{ label: "自动执行", prop: 'autoHandleRequest', type: "filter", filters: "whetherOrNot" }, { label: "自动执行", prop: 'autoHandleRequest', type: "filter", filters: "whetherOrNot" },

2
fe/PC/src/utils/tabsDesTions/index.js

@ -493,6 +493,8 @@ export const TransactionType = [
{ label: "直接生成记录", prop: 'directCreateNote', type: "filter", filters: "whetherOrNot" }, { label: "直接生成记录", prop: 'directCreateNote', type: "filter", filters: "whetherOrNot" },
{ label: "是否可用", prop: 'enabled', type: "filter", filters: "whetherOrNot" }, { label: "是否可用", prop: 'enabled', type: "filter", filters: "whetherOrNot" },
{ label: "描述", prop: 'description' }, { label: "描述", prop: 'description' },
// { label: "入库库区列表", prop: 'inLocationAreas', type: "filterList", filters: "inventoryStage" },
// { label: "出库库区列表", prop: 'outLocationAreas', type: "filterList", filters: "inventoryStage" },
{ label: "入库库区列表", prop: 'inLocationAreas' }, { label: "入库库区列表", prop: 'inLocationAreas' },
{ label: "出库库区列表", prop: 'outLocationAreas' }, { label: "出库库区列表", prop: 'outLocationAreas' },
{ label: "备注", prop: 'remark' }, { label: "备注", prop: 'remark' },

61
fe/PC/src/views/rawMaterialManage/manualMaterialRequest/IssueRequest.vue

@ -82,8 +82,32 @@ export default {
return this.displayDialog.newDialog || this.displayDialog.editDialog; 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 () { data () {
let _this = this;
return { return {
URL: 'wms/store/material-request', URL: 'wms/store/material-request',
tableLoading: false, tableLoading: false,
@ -95,7 +119,22 @@ export default {
this.defaultFreshBtn(),// this.defaultFreshBtn(),//
this.defaultFilterBtn(),// 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: "completeRequest",
size: 'mini'
},
],
}; };
}, },
mounted () { mounted () {
@ -117,7 +156,25 @@ export default {
}).catch(err => { }).catch(err => {
this.Loading.tableLoading = false 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)
// // }
// },
} }
}; };
</script> </script>

52
fe/PC/src/views/rawMaterialManage/purchaseReceipt/PurchaseReceiptNote-msQuery.vue

@ -103,14 +103,14 @@ export default {
name: "print-shd", name: "print-shd",
size: 'mini' size: 'mini'
}, },
{ // {
type: 'info', // type: 'info',
icon: 'el-icon-printer', // icon: 'el-icon-printer',
label: '打印退货单', // label: '退',
name: "print-thd", // name: "print-thd",
hide: () => { return this.hideButton('bhgpshmx') }, // hide: () => { return this.hideButton('bhgpshmx') },
size: 'mini' // size: 'mini'
}, // },
], ],
// table // table
dropdownTabsData: [ dropdownTabsData: [
@ -230,24 +230,24 @@ export default {
}) })
} }
// 退 // 退
if(val == 'print-thd'){ // if(val == 'print-thd'){
this.toPrintHttp(()=>{ // this.toPrintHttp(()=>{
let _printData = JSON.parse(JSON.stringify(this.propsData)) // let _printData = JSON.parse(JSON.stringify(this.propsData))
_printData.details = [] // _printData.details = []
this.propsData.details.forEach(item => { // this.propsData.details.forEach(item => {
if(item.purchaseReceiptInspectStatus == 3){ // if(item.purchaseReceiptInspectStatus == 3){
_printData.details.push(item) // _printData.details.push(item)
} // }
}); // });
let _option = { // let _option = {
details:{ // details:{
reason:"failedReason" // reason:"failedReason"
} // }
} // }
let data = initPrintAllData(_printData,'thd.rdlx','UnqualifiedReason',_option); // let data = initPrintAllData(_printData,'thd.rdlx','UnqualifiedReason',_option);
this.Print(data) // this.Print(data)
}) // })
} // }
}, },
// table // table
currenDrawerButtonClick(row){ currenDrawerButtonClick(row){

Loading…
Cancel
Save