Browse Source

Merge remote-tracking branch 'origin/master'

master
ligaode 6 months ago
parent
commit
7520b5707d
  1. 85
      yxt-as-ui/src/api/storage/allocationByBranches.js
  2. 84
      yxt-as-ui/src/api/storage/allocationByGroup.js
  3. 76
      yxt-as-ui/src/api/storage/oldPartsCope.js
  4. 73
      yxt-as-ui/src/api/storage/oldpPartStocktakingLoss.js
  5. 73
      yxt-as-ui/src/api/storage/oldpPartStocktakingSurplus.js
  6. 74
      yxt-as-ui/src/api/storage/stocktakingLoss.js
  7. 73
      yxt-as-ui/src/api/storage/stocktakingSurplus.js
  8. 165
      yxt-as-ui/src/router/index.js
  9. 12
      yxt-as-ui/src/views/workFlow/adjustmentFlow/adjustmentDaiBan.vue
  10. 21
      yxt-as-ui/src/views/workFlow/adjustmentFlow/adjustmentEdit.vue
  11. 10
      yxt-as-ui/src/views/workFlow/adjustmentFlow/adjustmentYiBan.vue
  12. 473
      yxt-as-ui/src/views/workFlow/allocationByBranchesFlow/allocationByBranchesDaiBan.vue
  13. 584
      yxt-as-ui/src/views/workFlow/allocationByBranchesFlow/allocationByBranchesEdit.vue
  14. 226
      yxt-as-ui/src/views/workFlow/allocationByBranchesFlow/allocationByBranchesYiBan.vue
  15. 172
      yxt-as-ui/src/views/workFlow/allocationByBranchesFlow/relation/chooseproducts.vue
  16. 474
      yxt-as-ui/src/views/workFlow/allocationByGroupFlow/allocationByGroupDaiBan.vue
  17. 596
      yxt-as-ui/src/views/workFlow/allocationByGroupFlow/allocationByGroupEdit.vue
  18. 227
      yxt-as-ui/src/views/workFlow/allocationByGroupFlow/allocationByGroupYiBan.vue
  19. 172
      yxt-as-ui/src/views/workFlow/allocationByGroupFlow/relation/chooseproducts.vue
  20. 472
      yxt-as-ui/src/views/workFlow/allocationFlow/allocationDaiBan.vue
  21. 617
      yxt-as-ui/src/views/workFlow/allocationFlow/allocationEdit.vue
  22. 225
      yxt-as-ui/src/views/workFlow/allocationFlow/allocationYiBan.vue
  23. 172
      yxt-as-ui/src/views/workFlow/allocationFlow/relation/chooseproducts.vue
  24. 496
      yxt-as-ui/src/views/workFlow/hezuoerjizhanFlow/secondaryCooperativeStationDaiBan.vue
  25. 373
      yxt-as-ui/src/views/workFlow/hezuoerjizhanFlow/secondaryCooperativeStationEdit.vue
  26. 244
      yxt-as-ui/src/views/workFlow/hezuoerjizhanFlow/secondaryCooperativeStationYiBan.vue
  27. 530
      yxt-as-ui/src/views/workFlow/oldPartsCopeFlow/oldPartsCopeDaiBan.vue
  28. 649
      yxt-as-ui/src/views/workFlow/oldPartsCopeFlow/oldPartsCopeEdit.vue
  29. 302
      yxt-as-ui/src/views/workFlow/oldPartsCopeFlow/oldPartsCopeYiBan.vue
  30. 686
      yxt-as-ui/src/views/workFlow/oldPartsFactoryFlow/oldPartsFactoryDaiBan.vue
  31. 14
      yxt-as-ui/src/views/workFlow/oldPartsFactoryFlow/oldPartsFactoryEdit.vue
  32. 367
      yxt-as-ui/src/views/workFlow/oldPartsFactoryFlow/oldPartsFactoryYiBan.vue
  33. 448
      yxt-as-ui/src/views/workFlow/oldpPartStocktakingLossFlow/oldpPartStocktakingLossDaiBan.vue
  34. 374
      yxt-as-ui/src/views/workFlow/oldpPartStocktakingLossFlow/oldpPartStocktakingLossEdit.vue
  35. 203
      yxt-as-ui/src/views/workFlow/oldpPartStocktakingLossFlow/oldpPartStocktakingLossYiBan.vue
  36. 446
      yxt-as-ui/src/views/workFlow/oldpPartStocktakingSurplusFlow/oldpPartStocktakingSurplusDaiBan.vue
  37. 426
      yxt-as-ui/src/views/workFlow/oldpPartStocktakingSurplusFlow/oldpPartStocktakingSurplusEdit.vue
  38. 202
      yxt-as-ui/src/views/workFlow/oldpPartStocktakingSurplusFlow/oldpPartStocktakingSurplusYiBan.vue
  39. 447
      yxt-as-ui/src/views/workFlow/stocktakingLossFlow/stocktakingLossDaiBan.vue
  40. 396
      yxt-as-ui/src/views/workFlow/stocktakingLossFlow/stocktakingLossEdit.vue
  41. 203
      yxt-as-ui/src/views/workFlow/stocktakingLossFlow/stocktakingLossYiBan.vue
  42. 447
      yxt-as-ui/src/views/workFlow/stocktakingSurplusFlow/stocktakingSurplusDaiBan.vue
  43. 458
      yxt-as-ui/src/views/workFlow/stocktakingSurplusFlow/stocktakingSurplusEdit.vue
  44. 203
      yxt-as-ui/src/views/workFlow/stocktakingSurplusFlow/stocktakingSurplusYiBan.vue

85
yxt-as-ui/src/api/storage/allocationByBranches.js

@ -114,4 +114,89 @@ export default {
});
},
// 流程审批(同意)
complete: function(params) {
return request({
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/complete',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 流程审批(加签)
delegate: function(params) {
return request({
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/delegate',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 流程审批(转办)
assignTask: function(params) {
return request({
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/assignTask',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 流程审批(驳回)
reject: function(params) {
return request({
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/reject',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 流程审批(终止)
breakProcess: function(params) {
return request({
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/breakProcess',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 流程审批(撤回)
revokeProcess: function(params) {
return request({
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/revokeProcess',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 审批流程(同意)获取下一环节
getNextNodesForSubmit: function(data) {
return request({
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/getNextNodesForSubmit',
method: 'get',
params: data
})
},
// 审批流程(驳回)获取上一环节
getPreviousNodesForReject: function(data) {
return request({
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/getPreviousNodesForReject',
method: 'get',
params: data
})
},
}

84
yxt-as-ui/src/api/storage/allocationByGroup.js

@ -114,4 +114,88 @@ export default {
});
},
// 流程审批(同意)
complete: function(params) {
return request({
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/complete',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 流程审批(加签)
delegate: function(params) {
return request({
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/delegate',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 流程审批(转办)
assignTask: function(params) {
return request({
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/assignTask',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 流程审批(驳回)
reject: function(params) {
return request({
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/reject',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 流程审批(终止)
breakProcess: function(params) {
return request({
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/breakProcess',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 流程审批(撤回)
revokeProcess: function(params) {
return request({
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/revokeProcess',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 审批流程(同意)获取下一环节
getNextNodesForSubmit: function(data) {
return request({
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/getNextNodesForSubmit',
method: 'get',
params: data
})
},
// 审批流程(驳回)获取上一环节
getPreviousNodesForReject: function(data) {
return request({
url: '/wms/apiadmin/inventory/wmsinventoryallocatebill/getPreviousNodesForReject',
method: 'get',
params: data
})
},
}

76
yxt-as-ui/src/api/storage/oldPartsCope.js

@ -69,4 +69,80 @@ export default {
}
})
},
// 流程审批(同意)
complete: function(params) {
return request({
url: '/as/v1/asoldparthandleapply/complete',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 流程审批(加签)
delegate: function(params) {
return request({
url: '/as/v1/asoldparthandleapply/delegate',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 流程审批(驳回)
reject: function(params) {
return request({
url: '/as/v1/asoldparthandleapply/reject',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 流程审批(终止)
breakProcess: function(params) {
return request({
url: '/as/v1/asoldparthandleapply/breakProcess',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 流程审批(撤回)
revokeProcess: function(params) {
return request({
url: '/as/v1/asoldparthandleapply/revokeProcess',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 审批流程(同意)获取下一环节
getNextNodesForSubmit: function(data) {
return request({
url: '/as/v1/asoldparthandleapply/getNextNodesForSubmit',
method: 'get',
params: data
})
},
// 审批流程(驳回)获取上一环节
getPreviousNodesForReject: function(data) {
return request({
url: '/as/v1/asoldparthandleapply/getPreviousNodesForReject',
method: 'get',
params: data
})
},
}

73
yxt-as-ui/src/api/storage/oldpPartStocktakingLoss.js

@ -93,4 +93,77 @@ export default {
},
// 流程审批(同意)
complete: function(params) {
return request({
url: '/wms/v1/wmsinventoryloss/complete',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 流程审批(加签)
delegate: function(params) {
return request({
url: '/wms/v1/wmsinventoryloss/delegate',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 流程审批(驳回)
reject: function(params) {
return request({
url: '/wms/v1/wmsinventoryloss/reject',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 流程审批(终止)
breakProcess: function(params) {
return request({
url: '/wms/v1/wmsinventoryloss/breakProcess',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 流程审批(撤回)
revokeProcess: function(params) {
return request({
url: '/wms/v1/wmsinventoryloss/revokeProcess',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 审批流程(同意)获取下一环节
getNextNodesForSubmit: function(data) {
return request({
url: '/wms/v1/wmsinventoryloss/getNextNodesForSubmit',
method: 'get',
params: data
})
},
// 审批流程(驳回)获取上一环节
getPreviousNodesForReject: function(data) {
return request({
url: '/wms/v1/wmsinventoryloss/getPreviousNodesForReject',
method: 'get',
params: data
})
},
}

73
yxt-as-ui/src/api/storage/oldpPartStocktakingSurplus.js

@ -91,4 +91,77 @@ export default {
},
// 流程审批(同意)
complete: function(params) {
return request({
url: '/wms/v1/wmsinventorysurplus/complete',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 流程审批(加签)
delegate: function(params) {
return request({
url: '/wms/v1/wmsinventorysurplus/delegate',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 流程审批(驳回)
reject: function(params) {
return request({
url: '/wms/v1/wmsinventorysurplus/reject',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 流程审批(终止)
breakProcess: function(params) {
return request({
url: '/wms/v1/wmsinventorysurplus/breakProcess',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 流程审批(撤回)
revokeProcess: function(params) {
return request({
url: '/wms/v1/wmsinventorysurplus/revokeProcess',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 审批流程(同意)获取下一环节
getNextNodesForSubmit: function(data) {
return request({
url: '/wms/v1/wmsinventorysurplus/getNextNodesForSubmit',
method: 'get',
params: data
})
},
// 审批流程(驳回)获取上一环节
getPreviousNodesForReject: function(data) {
return request({
url: '/wms/v1/wmsinventorysurplus/getPreviousNodesForReject',
method: 'get',
params: data
})
},
}

74
yxt-as-ui/src/api/storage/stocktakingLoss.js

@ -93,4 +93,78 @@ export default {
},
// 流程审批(同意)
complete: function(params) {
return request({
url: '/wms/v1/wmsinventoryloss/complete',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 流程审批(加签)
delegate: function(params) {
return request({
url: '/wms/v1/wmsinventoryloss/delegate',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 流程审批(驳回)
reject: function(params) {
return request({
url: '/wms/v1/wmsinventoryloss/reject',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 流程审批(终止)
breakProcess: function(params) {
return request({
url: '/wms/v1/wmsinventoryloss/breakProcess',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 流程审批(撤回)
revokeProcess: function(params) {
return request({
url: '/wms/v1/wmsinventoryloss/revokeProcess',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 审批流程(同意)获取下一环节
getNextNodesForSubmit: function(data) {
return request({
url: '/wms/v1/wmsinventoryloss/getNextNodesForSubmit',
method: 'get',
params: data
})
},
// 审批流程(驳回)获取上一环节
getPreviousNodesForReject: function(data) {
return request({
url: '/wms/v1/wmsinventoryloss/getPreviousNodesForReject',
method: 'get',
params: data
})
},
}

73
yxt-as-ui/src/api/storage/stocktakingSurplus.js

@ -91,4 +91,77 @@ export default {
},
// 流程审批(同意)
complete: function(params) {
return request({
url: '/wms/v1/wmsinventorysurplus/complete',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 流程审批(加签)
delegate: function(params) {
return request({
url: '/wms/v1/wmsinventorysurplus/delegate',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 流程审批(驳回)
reject: function(params) {
return request({
url: '/wms/v1/wmsinventorysurplus/reject',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 流程审批(终止)
breakProcess: function(params) {
return request({
url: '/wms/v1/wmsinventorysurplus/breakProcess',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 流程审批(撤回)
revokeProcess: function(params) {
return request({
url: '/wms/v1/wmsinventorysurplus/revokeProcess',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 审批流程(同意)获取下一环节
getNextNodesForSubmit: function(data) {
return request({
url: '/wms/v1/wmsinventorysurplus/getNextNodesForSubmit',
method: 'get',
params: data
})
},
// 审批流程(驳回)获取上一环节
getPreviousNodesForReject: function(data) {
return request({
url: '/wms/v1/wmsinventorysurplus/getPreviousNodesForReject',
method: 'get',
params: data
})
},
}

165
yxt-as-ui/src/router/index.js

@ -1411,6 +1411,171 @@ export const constantRoutes = [{
name: 'OtherOutboundYiBan'
},
// 合作二级站备案申请 -- 编辑
{
path: '/hezuoerjizhanFlow/secondaryCooperativeStationEdit',
component: () =>
import('@/views/workFlow/hezuoerjizhanFlow/secondaryCooperativeStationEdit.vue'),
name: 'SecondaryCooperativeStationEdit'
},
// 合作二级站备案申请 -- 待办
{
path: '/hezuoerjizhanFlow/secondaryCooperativeStationDaiBan',
component: () =>
import('@/views/workFlow/hezuoerjizhanFlow/secondaryCooperativeStationDaiBan.vue'),
name: 'SecondaryCooperativeStationDaiBan'
},
// 合作二级站备案申请 -- 已办
{
path: '/hezuoerjizhanFlow/secondaryCooperativeStationYiBan',
component: () =>
import('@/views/workFlow/hezuoerjizhanFlow/secondaryCooperativeStationYiBan.vue'),
name: 'SecondaryCooperativeStationYiBan'
},
// 旧件处理申请 -- 编辑
{
path: '/oldPartsCopeFlow/oldPartsCopeEdit',
component: () =>
import('@/views/workFlow/oldPartsCopeFlow/oldPartsCopeEdit.vue'),
name: 'OldPartsCopeEdit'
},
// 旧件处理申请 -- 待办
{
path: '/oldPartsCopeFlow/oldPartsCopeDaiBan',
component: () =>
import('@/views/workFlow/oldPartsCopeFlow/oldPartsCopeDaiBan.vue'),
name: 'OldPartsCopeDaiBan'
},
// 旧件处理申请 -- 已办
{
path: '/oldPartsCopeFlow/oldPartsCopeYiBan',
component: () =>
import('@/views/workFlow/oldPartsCopeFlow/oldPartsCopeYiBan.vue'),
name: 'OldPartsCopeYiBan'
},
// 调拨(一级站内) -- 编辑
{
path: '/adjustmentFlow/aodjustmentEdit',
component: () =>
import('@/views/workFlow/adjustmentFlow/adjustmentEdit.vue'),
name: 'AdjustmentEdit'
},
// 调拨(一级站内) -- 待办
{
path: '/adjustmentFlow/adjustmentDaiBan',
component: () =>
import('@/views/workFlow/adjustmentFlow/adjustmentDaiBan.vue'),
name: 'AdjustmentDaiBan'
},
// 调拨(一级站内) -- 已办
{
path: '/adjustmentFlow/adjustmentYiBan',
component: () =>
import('@/views/workFlow/adjustmentFlow/adjustmentYiBan.vue'),
name: 'AdjustmentYiBan'
},
// 调拨(分公司内) -- 编辑
{
path: '/allocationByBranchesFlow/allocationByBranchesEdit',
component: () =>
import('@/views/workFlow/allocationByBranchesFlow/allocationByBranchesEdit.vue'),
name: 'AllocationByBranchesEdit'
},
// 调拨(分公司内) -- 待办
{
path: '/allocationByBranchesFlow/allocationByBranchesDaiBan',
component: () =>
import('@/views/workFlow/allocationByBranchesFlow/allocationByBranchesDaiBan.vue'),
name: 'AllocationByBranchesDaiBan'
},
// 调拨(分公司内) -- 已办
{
path: '/allocationByBranchesFlow/allocationByBranchesYiBan',
component: () =>
import('@/views/workFlow/allocationByBranchesFlow/allocationByBranchesYiBan.vue'),
name: 'AllocationByBranchesYiBan'
},
// 调拨(集团内) -- 编辑
{
path: '/allocationByGroupFlow/allocationByGroupEdit',
component: () =>
import('@/views/workFlow/allocationByGroupFlow/allocationByGroupEdit.vue'),
name: 'AllocationByGroupEdit'
},
// 调拨(集团内) -- 待办
{
path: '/allocationByGroupFlow/allocationByGroupDaiBan',
component: () =>
import('@/views/workFlow/allocationByGroupFlow/allocationByGroupDaiBan.vue'),
name: 'AllocationByGroupDaiBan'
},
// 调拨(集团内) -- 已办
{
path: '/allocationByGroupFlow/allocationByGroupYiBan',
component: () =>
import('@/views/workFlow/allocationByGroupFlow/allocationByGroupYiBan.vue'),
name: 'AllocationByGroupYiBan'
},
// 盘盈入库 -- 编辑
{
path: '/stocktakingSurplusFlow/stocktakingSurplusEdit',
component: () =>
import('@/views/workFlow/stocktakingSurplusFlow/stocktakingSurplusEdit.vue'),
name: 'StocktakingSurplusEdit'
},
// 盘盈入库 -- 待办
{
path: '/stocktakingSurplusFlow/stocktakingSurplusDaiBan',
component: () =>
import('@/views/workFlow/stocktakingSurplusFlow/stocktakingSurplusDaiBan.vue'),
name: 'StocktakingSurplusDaiBan'
},
// 盘盈入库 -- 已办
{
path: '/stocktakingSurplusFlow/stocktakingSurplusYiBan',
component: () =>
import('@/views/workFlow/stocktakingSurplusFlow/stocktakingSurplusYiBan.vue'),
name: 'StocktakingSurplusYiBan'
},
// 盘亏出库 -- 编辑
{
path: '/stocktakingLossFlow/stocktakingLossEdit',
component: () =>
import('@/views/workFlow/stocktakingLossFlow/stocktakingLossEdit.vue'),
name: 'StocktakingLossEdit'
},
// 盘亏出库 -- 待办
{
path: '/stocktakingLossFlow/stocktakingLossDaiBan',
component: () =>
import('@/views/workFlow/stocktakingLossFlow/stocktakingLossDaiBan.vue'),
name: 'StocktakingLossDaiBan'
},
// 盘亏出库 -- 已办
{
path: '/stocktakingLossFlow/stocktakingLossYiBan',
component: () =>
import('@/views/workFlow/stocktakingLossFlow/stocktakingLossYiBan.vue'),
name: 'StocktakingLossYiBan'
},
// 404 page must be placed at the end !!!
// { path: '*', redirect: '/404', hidden: true }
]

12
yxt-as-ui/src/views/workFlow/adjustmentFlow/adjustmentDaiBan.vue

@ -96,7 +96,7 @@
</template>
<script>
import req from '@/api/storage/adjustment.js'
import req from '@/api/storage/adjustment.js'
import {
selectStaffListss
} from '@/api/Common/dictcommons'
@ -111,14 +111,12 @@
index: 0,
formobj: {
"sid": "",
"createByName": window.sessionStorage.getItem('name'),
"createByName": "",
"billNo": "",
"deptName": window.sessionStorage.getItem('defaultOrgPathName').substring(window
.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1),
"deptSid": window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage
.getItem('defaultOrgPath').lastIndexOf('/') + 1),
"deptName": "",
"deptSid": "",
"remarks": "",
"createBySid": window.sessionStorage.getItem('userSid'),
"createBySid": "",
"createTime": getCurrentDate(),
"procDefId": "",
"nodeId": "",

21
yxt-as-ui/src/views/workFlow/adjustmentFlow/adjustmentEdit.vue

@ -92,14 +92,12 @@
submitdisabled: false,
formobj: {
"sid": "",
"createByName": window.sessionStorage.getItem('name'),
"createByName": "",
"billNo": "",
"deptName": window.sessionStorage.getItem('defaultOrgPathName').substring(window
.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1),
"deptSid": window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage
.getItem('defaultOrgPath').lastIndexOf('/') + 1),
"deptName": "",
"deptSid": "",
"remarks": "",
"createBySid": window.sessionStorage.getItem('userSid'),
"createBySid": "",
"createTime": getCurrentDate(),
"procDefId": "",
"nodeId": "",
@ -131,16 +129,6 @@
}, '*')
},
methods: {
init() {
getOrgSidByPath({
orgPath: window.sessionStorage.getItem('defaultOrgPath')
}).then((res) => {
if (res.success) {
this.formobj.createOrgSid = res.data
this.formobj.useOrgSid = res.data
}
})
},
calculation(row) {
console.log("calculation》》》》", row)
@ -269,7 +257,6 @@
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.init()
req.init(sid).then((res) => {
if (res.success) {
this.formobj = res.data

10
yxt-as-ui/src/views/workFlow/adjustmentFlow/adjustmentYiBan.vue

@ -65,14 +65,12 @@
index: 0,
formobj: {
"sid": "",
"createByName": window.sessionStorage.getItem('name'),
"createByName": "",
"billNo": "",
"deptName": window.sessionStorage.getItem('defaultOrgPathName').substring(window
.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1),
"deptSid": window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage
.getItem('defaultOrgPath').lastIndexOf('/') + 1),
"deptName": "",
"deptSid": "",
"remarks": "",
"createBySid": window.sessionStorage.getItem('userSid'),
"createBySid": "",
"createTime": getCurrentDate(),
"procDefId": "",
"nodeId": "",

473
yxt-as-ui/src/views/workFlow/allocationByBranchesFlow/allocationByBranchesDaiBan.vue

@ -0,0 +1,473 @@
<template>
<div class="app-container">
<div class="tab-header webtop">
<div>调拨详情</div>
<div>
<el-button type="primary" size="small" @click="openCountersign('加签')"> </el-button>
<el-button type="primary" size="small" @click="openAgree('同意')"> </el-button>
<el-button type="danger" size="small" @click="openReject('驳回')"> </el-button>
<el-button type="danger" size="small" @click="openStop('终止')"> </el-button>
</div>
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">调出站</div>
<el-form-item><span class="addinputInfo">{{ formobj.outPlatName }}</span></el-form-item>
</el-col>
<el-col :span="5">
<div class="span-sty">调入站</div>
<el-form-item><span class="addinputInfo">{{ formobj.inOrgName }}</span></el-form-item>
</el-col>
<el-col :span="3">
<el-form-item><span style="width: 100%;">{{ formobj.inPlatName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">经办人</div>
<el-form-item><span class="addinputInfo">{{ formobj.confirmName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<div class="title titleOne">
<div>调拨商品列表</div>
</div>
<el-table :data="formobj.wmsInventoryAllocateBillDetailNewList" :index="index" border style="width: 100%;"
show-summary :summary-method="getSummaries">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center" />
<el-table-column prop="goodsID" label="商品ID" align="center" />
<el-table-column prop="goodsSpuName" label="商品名称" align="center" />
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" />
<el-table-column prop="goodsSkuOwnSpec" label="型号" align="center" />
<el-table-column prop="unit" label="单位" align="center" />
<el-table-column prop="warehouseName" label="仓库" width="150" align="center" />
<el-table-column prop="warehouseArea" label="仓库" width="150" align="center" />
<el-table-column prop="warehouseRackCode" label="库位" align="center" />
<el-table-column prop="stockCount" label="库存数量" align="center" />
<el-table-column prop="markUpRatio" label="加价比例" align="center" />
<el-table-column prop="requAmount" label="调拨单价" align="center" />
<el-table-column prop="count" label="调拨数量" align="center" />
<el-table-column prop="amount" label="调拨金额" align="center" width="100" />
</el-table>
</el-form>
</div>
<!-- 选择待办人 的弹出框-->
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%">
<el-form class="formadd">
<el-row v-show="countersignLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="4" class="tleftb">
<span class="icon">*</span>加签人员:
</el-col>
<el-col :span="20">
<el-form-item>
<el-select v-model="countersign.assignee" placeholder="请选择" filterable>
<el-option v-for="item in options" :key="item.userSid" :label="item.staffName" :value="item.userSid">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="4" class="tleftb">
<span>当前环节:</span>
</el-col>
<el-col :span="20">
<el-form-item><span>{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item>
</el-col>
</el-row>
<el-row :class="{rowClass:!currentLink}">
<el-col :span="4" class="tleftb">
<span>意见:</span>
</el-col>
<el-col :span="20">
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw"
type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable></el-input></el-form-item>
</el-col>
</el-row>
<div style="text-align:center;margin-top: 20px;">
<el-button type="primary" size="mini" @click="reject"> </el-button>
<el-button type="info " size="mini" @click="nodeDialogVisible = false"> </el-button>
</div>
</el-form>
</el-dialog>
</div>
</template>
<script>
import req from '@/api/storage/allocation.js'
import {
selectStaffListss
} from '@/api/Common/dictcommons'
export default {
data() {
return {
index: 0,
formobj: {},
options: [],
operation: '', //
dialogList: {
comment: ''
},
startTask: true,
current: {
taskDefKey: '',
taskName: '' //
},
nextNode: {}, //
nodeDialogVisible: false,
currentLink: true,
countersignLink: false,
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
},
//
countersign: {
taskId: '',
assignee: '',
userSid: '',
instanceId: '',
views: ''
}
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
// this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath')
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
this.current.taskDefKey = obj.taskDefKey
this.current.taskName = obj.taskName
//
this.countersign.taskId = obj.taskId
this.countersign.userSid = window.sessionStorage.getItem('userSid')
this.countersign.instanceId = obj.instanceId
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 400 + 'px'
}
}, '*')
},
methods: {
//
getSummaries(param) {
const {
columns,
data
} = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'count') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
} else if (column.property === 'amount') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
}
})
return sums
},
showInfo(sid) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.init(sid).then((res) => {
if (res.success) {
this.formobj = res.data
}
})
selectStaffListss().then((res) => {
if (res.success) {
this.options = res.data
}
})
},
//
openCountersign(val) {
this.operation = val
this.currentLink = true
this.countersignLink = true
this.dialogList.comment = ''
req.getNextNodesForSubmit({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openAgree(val) {
this.operation = val
this.currentLink = true
this.countersignLink = false
this.dialogList.comment = '同意'
req.getNextNodesForSubmit({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openReject(val) {
this.operation = val
this.currentLink = true
this.countersignLink = false
this.dialogList.comment = ''
req.getPreviousNodesForReject({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openStop(val) {
this.operation = val
this.currentLink = false
this.countersignLink = false
this.dialogList.comment = ''
this.nodeDialogVisible = true
},
reject() {
if (this.operation === '同意') {
this.handleAgree()
} else if (this.operation === '驳回') {
if (this.dialogList.comment === '') {
this.$message({
showClose: true,
type: 'error',
message: '请填写审批意见'
})
} else {
this.handleReject()
}
} else if (this.operation === '终止') {
if (this.dialogList.comment === '') {
this.$message({
showClose: true,
type: 'error',
message: '请填写审批意见'
})
} else {
this.handleStop()
}
} else if (this.operation === '加签') {
this.handleCountersign()
}
},
/** 加签 */
handleCountersign() {
if (this.countersign.assignee === '') {
this.$message({
showClose: true,
type: 'error',
message: '请选择加签人员'
})
return
}
if (this.dialogList.comment === '') {
this.$message({
showClose: true,
type: 'error',
message: '请填写审批意见'
})
return
}
this.countersign.views = this.dialogList.comment
req.delegate(this.countersign).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 同意任务 */
handleAgree() {
this.linkByParameter.comment = this.dialogList.comment
req.complete(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 驳回任务 */
handleReject() {
this.linkByParameter.comment = this.dialogList.comment
req.reject(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 终止任务 */
handleStop() {
this.linkByParameter.comment = this.dialogList.comment
req.breakProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
.rowClass {
border-top: 1px solid #E0E3EB;
}
</style>

584
yxt-as-ui/src/views/workFlow/allocationByBranchesFlow/allocationByBranchesEdit.vue

@ -0,0 +1,584 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">提交</el-button>
</div>
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<span class="addinputInfo">{{ formobj.createTime }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">调出站</div>
<el-form-item><span class="addinputInfo">{{ formobj.outPlatName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 调入站点</div>
<el-form-item prop="inPlatName">
<el-select v-model="formobj.inPlatName" placeholder="请选择调入站" @change="selectInDeptName"
class="addinputInfo addinputw">
<el-option v-for="(item,i) in deptList" :key="i" :label="item.name" :value="item.sid">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 经办人</div>
<el-form-item prop="confirmName"> <el-select v-model="formobj.confirmName" placeholder="请选择经办人" clearable
@change="selectOperatorName" class="addinputInfo addinputw">
<el-option v-for="(item,i) in operatorNameList" :key="i" :label="item.name" :value="item.sid">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item> <el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo"
type="textarea" :rows="4" clearable /></el-form-item>
</el-col>
</el-row>
<div class="title titleOne">
<div>调拨商品列表</div>
<el-button type="primary" size="mini" class="btntopblueline" @click="seleGoods()">添加</el-button>
</div>
<el-table :data="formobj.wmsInventoryAllocateBillDetailNewList" :index="index" border style="width: 100%;"
show-summary :summary-method="getSummaries">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center" />
<el-table-column fixed label="操作" wid align="center" width="100">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="deleteGoods(scope.$index)">删除</el-button>
</template>
</el-table-column>
<el-table-column prop="goodsID" label="商品ID" width="100" align="center" />
<el-table-column prop="goodsSpuName" label="商品名称" width="100" align="center" />
<el-table-column prop="goodsSkuCode" label="商品编码" width="100" align="center" />
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" />
<el-table-column prop="unit" label="单位" align="center" />
<el-table-column prop="warehouseName" label="仓库" width="150" align="center" />
<el-table-column prop="warehouseAreaName" label="库区" width="150" align="center" />
<el-table-column prop="warehouseRackCode" label="库位" align="center" />
<el-table-column prop="stockCount" label="库存数量" width="100" align="center" />
<el-table-column prop="markUpRatio" label="加价比例(%)" width="120" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.markUpRatio" clearable placeholder=""
oninput="value=value.replace(/^([0-9-]\d*\.?\d{0,2})?.*$/,'$1')"
@input="commodityComputeYHAndXSJE(scope.row)" />
</template>
</el-table-column>
<el-table-column prop="requAmount" label="调拨单价" align="center" width="100" />
<el-table-column prop="count" label="调拨数量" width="120" align="center">
<template slot-scope="scope">
<el-input @input="commodityComputeYHAndXSJE2(scope.row)" v-model="scope.row.count" clearable
placeholder="" oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
</template>
</el-table-column>
<el-table-column prop="amount" label="调拨金额" align="center" width="100" />
</el-table>
</el-form>
</div>
</div>
<!-- 选择商品 -->
<chooseproducts v-show="viewState == 2" ref="divSp" @backData="backData" @doback="resetState" />
</div>
</template>
<script>
import req from '@/api/storage/allocation.js'
import chooseproducts from './relation/chooseproducts'
import {
getCurrentDate
} from '@/utils/index.js'
import {
getServiceStationByOrgSid,
selAllByOrgSidPath,
getOrgSidByPath,
fetchBySid,
tranTwo
} from '@/api/Common/dictcommons'
export default {
components: {
chooseproducts,
},
data() {
return {
viewTitle: '',
viewState: 1,
submitdisabled: false,
activeNames: '1',
index: 0,
formobj: {
"sid": "",
"billNo": "",
"useOrgSid": "",
"createBySid": '',
"createByName": '',
"deptName": '',
"deptSid": '',
"createTime": getCurrentDate(),
"outOrgName": '',
"outOrgSid": '',
"outPlatName": '',
"outPlatSid": '',
"inOrgName": '',
"inOrgSid": '',
"inPlatName": "",
"inPlatSid": "",
"inOrgAttributeKey": "",
"inOrgAttributeValue": "",
"confirmName": "",
"confirmSid": "",
"remarks": "",
"grade": "2",
"createOrgSid": "",
"procDefId": "",
"nodeId": "",
"procInstId": "",
"nodeState": "待提交",
"taskId": "",
"wmsInventoryAllocateBillDetailNewList": []
},
rules: {
inOrgName: [{
required: true,
message: '调入分公司不能为空',
trigger: 'change'
}],
inPlatName: [{
required: true,
message: '调入站点不能为空',
trigger: 'change'
}],
confirmName: [{
required: true,
message: '经办人不能为空',
trigger: 'change'
}],
},
orgList: [],
deptList: [],
operatorNameList: [],
warehouseList: [],
warehouseRackList: []
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
}
}, '*')
},
methods: {
//
getSummaries(param) {
const {
columns,
data
} = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'count') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
} else if (column.property === 'amount') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
}
})
return sums
},
selectInOrg(val) {
console.log("selectInOrg", val);
const choose = this.orgList.filter((item) => item.sid == val)
console.log('>>>>>>>>>selectInOrg', choose)
this.formobj.inOrgSid = choose[0].sid
this.formobj.inOrgName = choose[0].name
getServiceStationByOrgSid(choose[0].sid).then((res) => {
if (res.success) {
this.formobj.inDeptSid = ''
this.formobj.inDeptName = ''
this.formobj.inOrgAttributeKey = ''
this.formobj.inOrgAttributeValue = ''
console.log("getListDeptByOrgSid", res);
this.deptList = res.data
}
})
},
selectInDeptName(val) {
console.log("selectInDeptName", val);
const choose = this.deptList.filter((item) => item.sid == val)
console.log('>>>>>>>>>selectInDeptName', choose)
this.formobj.inPlatSid = choose[0].sid
this.formobj.inPlatName = choose[0].name
this.formobj.inOrgAttributeKey = choose[0].orgAttributeKey
this.formobj.inOrgAttributeValue = choose[0].orgAttributeValue
},
selectOperatorName(val) {
console.log("selectOperatorName", val);
const choose = this.operatorNameList.filter((item) => item.sid == val)
console.log('>>>>>>>>>selectOutOrg', choose)
this.formobj.confirmSid = choose[0].sid
this.formobj.confirmName = choose[0].name
},
getWarehouseAreaList(sid) {
var query = {
ckSid: sid
}
req.getWarehouseareas(query).then((res) => {
if (res.success) {
this.warehouseRackList = res.data
console.log("aaaaaa", this.warehouseRackList);
}
})
},
selectWarehouseName(row, val) {
console.log("selectWarehouseName", row);
console.log("selectWarehouseName", val);
const choose = this.warehouseList.filter((item) => item.sid == val)
console.log('>>>>>>>>>selectInOrg', choose)
row.inWarehouseSid = choose[0].sid
row.inWarehouseName = choose[0].warehouseName
row.inWarehouseRackSid = ''
row.inWarehouseRackCode = ''
this.getWarehouseAreaList(val)
},
selectWarehouseAreaCode(row, val) {
console.log("selectWarehouseAreaCode", row);
console.log("selectWarehouseAreaCode", val);
const choose = this.warehouseRackList.filter((item) => item.sid == val)
console.log('>>>>>>>>>selectInOrg', choose)
row.inWarehouseRackSid = choose[0].sid
row.inWarehouseRackCode = choose[0].areaCode
},
showAdd() {
this.viewTitle = '【新增】商品调拨申请'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
},
showInfo(sid) {
this.viewTitle = '【修改】商品调拨申请'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.init(sid).then((res) => {
if (res.success) {
this.formobj = res.data
this.formobj.instanceId = res.data.procInstId
tranTwo(this.formobj.deptSid).then((resp) => {
if (resp.success) {
console.log("tranTwo", resp);
this.deptList = resp.data
}
})
selAllByOrgSidPath({
orgSidPath: this.formobj.orgPath
}).then((res) => {
if (res.success) {
console.log("selAllByOrgSidPath", res);
this.operatorNameList = res.data
}
})
}
})
},
backData(value) {
this.viewState = 1
if (value.length > 0) {
value.forEach((e) => {
this.formobj.wmsInventoryAllocateBillDetailNewList.push({
"goodsSpuSid": e.goodsSpuSid,
"goodsSpuName": e.goodsSpuName,
"goodsSkuCode": e.goodsSkuCode,
"goodsSkuOwnSpec": e.goodsSkuOwnSpec,
"goodsSkuSid": e.goodsSkuSid,
"goodsSkuTitle": e.goodsSkuTitle,
"billSid": this.formobj.sid,
"inventorySid": e.inventorySid,
"warehouseSid": e.warehouseSid,
"warehouseName": e.warehouseName,
"warehouseAreaSid": e.warehouseAreaSid,
"warehouseArea": e.warehouseArea,
"warehouseRackSid": e.warehouseRackSid,
"warehouseRackCode": e.warehouseRackCode,
"taxPrice": e.taxPrice,
"stockCount": e.count,
"inWarehouseSid": '',
"inWarehouseName": '',
"inWarehouseRackSid": '',
"inWarehouseRackCode": '',
"count": 0,
"amount": 0,
"requAmount": e.taxPrice,
"markUpRatio": 0,
"unit": e.unit,
"goodsID": e.goodsID,
"manufacturerSid": e.manufacturerSid,
"manufacturerName": e.manufacturerName,
})
})
}
},
deleteGoods(index) {
this.formobj.wmsInventoryAllocateBillDetailNewList.splice(index, 1)
},
resetState() {
this.viewState = 1
},
seleGoods() {
this.viewState = 2
const aa = []
this.$refs['divSp'].showData(aa, this.formobj.deptSid)
},
//
commodityComputeYHAndXSJE(row) {
console.log("commodityComputeYHAndXSJE", row);
row.requAmount = (Number(row.taxPrice) * Number(1 + Number(row.markUpRatio) / 100)).toFixed(2)
row.amount = (Number(row.count) * Number(row.requAmount)).toFixed(2)
},
//
commodityComputeYHAndXSJE2(row) {
if (Number(row.stockCount) < Number(row.count)) {
row.count = Number(row.stockCount)
} else {
row.amount = (Number(row.count) * Number(row.requAmount)).toFixed(2)
}
},
saveOrUpdate() {
console.log("saveOrUpdate", this.formobj);
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.save(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '保存成功'
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
},
submit() {
console.log("saveOrUpdate", this.formobj);
this.$refs['form_obj'].validate((valid) => {
if (valid) {
if (this.formobj.wmsInventoryAllocateBillDetailNewList.length == 0) {
this.$message({
type: "warning",
showClose: true,
message: '调拨商品不能为空'
})
return
}
for (var i = 0; i < this.formobj.wmsInventoryAllocateBillDetailNewList.length; i++) {
var item = this.formobj.wmsInventoryAllocateBillDetailNewList[i]
if (Number(item.count) == 0) {
this.$message({
type: "warning",
showClose: true,
message: '调拨数量不能为空或0'
})
return
}
}
this.submitdisabled = true
req.allocation(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '调拨成功'
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
},
}
}
</script>
<style scoped>
.formaddcopy02 .el-row .el-col /deep/ .el-form-item__error {
margin-left: 120px !important;
}
.must {
color: #f00;
}
.span-sty {
width: 130px !important;
}
.span-sty2 {
position: absolute;
top: 0;
bottom: 0;
left: 0;
line-height: 42px;
text-align: right;
font-size: 14px;
color: #606266;
font-weight: 600;
width: 70px;
padding-right: 5px;
border-right: 1px solid #e0e3eb;
width: 110px !important;
}
.addinputInfo2 {
margin-left: 110px !important;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw2 {
margin-left: 110px !important;
width: calc(100% - 105px);
}
.addinputInfo {
margin-left: 120px !important;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 120px !important;
width: calc(100% - 115px);
}
.first_row {
border-top: 1px solid #E0E3EB;
}
.titleOne {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .el-radio-group {
display: inline;
line-height: 1px;
vertical-align: middle;
}
</style>

226
yxt-as-ui/src/views/workFlow/allocationByBranchesFlow/allocationByBranchesYiBan.vue

@ -0,0 +1,226 @@
<template>
<div class="app-container">
<div class="tab-header webtop">
<div>调拨详情</div>
<div>
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button>
</div>
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">调出站</div>
<el-form-item><span class="addinputInfo">{{ formobj.outPlatName }}</span></el-form-item>
</el-col>
<el-col :span="5">
<div class="span-sty">调入站</div>
<el-form-item><span class="addinputInfo">{{ formobj.inOrgName }}</span></el-form-item>
</el-col>
<el-col :span="3">
<el-form-item><span style="width: 100%;">{{ formobj.inPlatName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">经办人</div>
<el-form-item><span class="addinputInfo">{{ formobj.confirmName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<div class="title titleOne">
<div>调拨商品列表</div>
</div>
<el-table :data="formobj.wmsInventoryAllocateBillDetailNewList" :index="index" border style="width: 100%;"
show-summary :summary-method="getSummaries">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center" />
<el-table-column prop="goodsID" label="商品ID" align="center" />
<el-table-column prop="goodsSpuName" label="商品名称" align="center" />
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" />
<el-table-column prop="goodsSkuOwnSpec" label="型号" align="center" />
<el-table-column prop="unit" label="单位" align="center" />
<el-table-column prop="warehouseName" label="仓库" width="150" align="center" />
<el-table-column prop="warehouseArea" label="仓库" width="150" align="center" />
<el-table-column prop="warehouseRackCode" label="库位" align="center" />
<el-table-column prop="stockCount" label="库存数量" align="center" />
<el-table-column prop="markUpRatio" label="加价比例" align="center" />
<el-table-column prop="requAmount" label="调拨单价" align="center" />
<el-table-column prop="count" label="调拨数量" align="center" />
<el-table-column prop="amount" label="调拨金额" align="center" width="100" />
</el-table>
</el-form>
</div>
</div>
</template>
<script>
import req from '@/api/storage/allocation.js'
export default {
data() {
return {
index: 0,
formobj: {},
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
},
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
}
}, '*')
},
methods: {
//
getSummaries(param) {
const {
columns,
data
} = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'count') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
} else if (column.property === 'amount') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
}
})
return sums
},
showInfo(sid) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.init(sid).then((res) => {
if (res.success) {
this.formobj = res.data
}
})
},
/** 确认撤回任务 */
openRevoke() {
this.$confirm('是否确认执行撤回操作', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.handleRevoke()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消撤回'
})
})
},
/** 撤回任务 */
handleRevoke() {
req.revokeProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
</style>

172
yxt-as-ui/src/views/workFlow/allocationByBranchesFlow/relation/chooseproducts.vue

@ -0,0 +1,172 @@
<template>
<div class="app-container">
<div>
<div class="tab-header webtop">
<div>选择商品</div>
<div>
<el-button type="primary" size="small" @click="AddUpdateReturn">确定</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="120px" class="tab-header">
<el-form-item label="商品ID" class="searchlist">
<el-input v-model="listQuery.params.goodsID" placeholder="" clearable />
</el-form-item>
<el-form-item label="商品编码" class="searchlist">
<el-input v-model="listQuery.params.goodsSkuCode" placeholder="" clearable />
</el-form-item>
<el-form-item label="商品名称" class="searchlist">
<el-input v-model="listQuery.params.goodsSkuTitle" placeholder="" clearable />
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" icon="el-icon-search" @click="handleFilter" size="small">查询</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button>
</div>
</div>
</div>
<div class="listtop">
<div class="tit">商品列表</div>
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>-->
</div>
<div class="">
<el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column width="50px" type="selection" align="center" />
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column prop="goodsID" label="商品ID" align="center" />
<el-table-column prop="goodsSkuTitle" label="商品名称" align="center" />
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" />
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" />
<el-table-column prop="unit" label="单位" align="center" />
<el-table-column prop="warehouseName" label="仓库" align="center" />
<el-table-column prop="warehouseArea" label="库区" align="center" />
<el-table-column prop="warehouseRackCode" label="库位" align="center" />
<el-table-column prop="count" label="库存数量" align="center" />
</el-table>
</div>
<div class="pages">
<div class="tit" />
<!-- 翻页 -->
<Pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current"
:limit.sync="listQuery.size" class="pagination" @pagination="getList" />
</div>
</div>
</div>
</div>
</template>
<script>
import Pagination from '@/components/pagination'
import req from '@/api/storage/allocation.js'
export default {
name: 'SelectVehicle',
components: {
Pagination
},
data() {
return {
isSearchShow: false,
searchxianshitit: '隐藏查询条件',
tableKey: 0,
sids: [],
list: [],
number: '',
listLoading: false,
listQuery: {
current: 1,
size: 10,
params: {
deptSid: '',
goodsID: '',
goodsSkuTitle: '',
goodsSkuCode: '',
},
total: 0
}
}
},
methods: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
getList() {
this.listLoading = true
req.getGoods(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
this.listQuery.total = response.data.total
this.list = response.data.records
}
})
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
//
handleReset() {
this.listQuery.current = 1
this.listQuery.size = 10
this.listQuery.total = 0
this.listQuery.params.goodsID = ''
this.listQuery.params.goodsSkuTitle = ''
this.listQuery.params.goodsSkuCode = ''
this.getList()
},
handleSelectionChange(row) {
this.sids = row
},
showData(value, deptSid) {
// const aa = []
// if (value.length > 0) {
// for (var i = 0; i < value.length; i++) {
// aa.push(value[i].saleVehSid)
// }
// this.listQuery.params.saleVehSids = aa
// } else {
// this.listQuery.params.saleVehSids = []
// }``
this.listQuery.params.deptSid = deptSid
this.getList()
},
//
AddUpdateReturn() {
if (this.sids.length > 0) {
this.$emit('backData', this.sids)
} else {
this.$notify({
title: '提示',
message: '请至少选择一条记录进行操作',
type: 'error',
duration: 2000
})
}
},
//
handleReturn() {
this.$emit('doback')
}
}
}
</script>
<style scoped>
</style>

474
yxt-as-ui/src/views/workFlow/allocationByGroupFlow/allocationByGroupDaiBan.vue

@ -0,0 +1,474 @@
<template>
<div class="app-container">
<div class="tab-header webtop">
<div>调拨详情</div>
<div>
<el-button type="primary" size="small" @click="openCountersign('加签')"> </el-button>
<el-button type="primary" size="small" @click="openAgree('同意')"> </el-button>
<el-button type="danger" size="small" @click="openReject('驳回')"> </el-button>
<el-button type="danger" size="small" @click="openStop('终止')"> </el-button>
</div>
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">调出站</div>
<el-form-item><span class="addinputInfo">{{ formobj.outPlatName }}</span></el-form-item>
</el-col>
<el-col :span="5">
<div class="span-sty">调入站</div>
<el-form-item><span class="addinputInfo">{{ formobj.inOrgName }}</span></el-form-item>
</el-col>
<el-col :span="3">
<el-form-item><span style="width: 100%;">{{ formobj.inPlatName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">经办人</div>
<el-form-item><span class="addinputInfo">{{ formobj.confirmName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<div class="title titleOne">
<div>调拨商品列表</div>
</div>
<el-table :data="formobj.wmsInventoryAllocateBillDetailNewList" :index="index" border style="width: 100%;"
show-summary :summary-method="getSummaries">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center" />
<el-table-column prop="goodsID" label="商品ID" align="center" />
<el-table-column prop="goodsSpuName" label="商品名称" align="center" />
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" />
<el-table-column prop="goodsSkuOwnSpec" label="型号" align="center" />
<el-table-column prop="unit" label="单位" align="center" />
<el-table-column prop="warehouseName" label="仓库" width="150" align="center" />
<el-table-column prop="warehouseArea" label="仓库" width="150" align="center" />
<el-table-column prop="warehouseRackCode" label="库位" align="center" />
<el-table-column prop="stockCount" label="库存数量" align="center" />
<el-table-column prop="markUpRatio" label="加价比例" align="center" />
<el-table-column prop="requAmount" label="调拨单价" align="center" />
<el-table-column prop="count" label="调拨数量" align="center" />
<el-table-column prop="amount" label="调拨金额" align="center" width="100" />
</el-table>
</el-form>
</div>
<!-- 选择待办人 的弹出框-->
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%">
<el-form class="formadd">
<el-row v-show="countersignLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="4" class="tleftb">
<span class="icon">*</span>加签人员:
</el-col>
<el-col :span="20">
<el-form-item>
<el-select v-model="countersign.assignee" placeholder="请选择" filterable>
<el-option v-for="item in options" :key="item.userSid" :label="item.staffName" :value="item.userSid">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="4" class="tleftb">
<span>当前环节:</span>
</el-col>
<el-col :span="20">
<el-form-item><span>{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item>
</el-col>
</el-row>
<el-row :class="{rowClass:!currentLink}">
<el-col :span="4" class="tleftb">
<span>意见:</span>
</el-col>
<el-col :span="20">
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw"
type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable></el-input></el-form-item>
</el-col>
</el-row>
<div style="text-align:center;margin-top: 20px;">
<el-button type="primary" size="mini" @click="reject"> </el-button>
<el-button type="info " size="mini" @click="nodeDialogVisible = false"> </el-button>
</div>
</el-form>
</el-dialog>
</div>
</template>
<script>
import req from '@/api/storage/allocation.js'
import {
selectStaffListss
} from '@/api/Common/dictcommons'
export default {
data() {
return {
index: 0,
formobj: {},
options: [],
operation: '', //
dialogList: {
comment: ''
},
startTask: true,
current: {
taskDefKey: '',
taskName: '' //
},
nextNode: {}, //
nodeDialogVisible: false,
currentLink: true,
countersignLink: false,
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
},
//
countersign: {
taskId: '',
assignee: '',
userSid: '',
instanceId: '',
views: ''
}
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
// this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath')
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
this.current.taskDefKey = obj.taskDefKey
this.current.taskName = obj.taskName
//
this.countersign.taskId = obj.taskId
this.countersign.userSid = window.sessionStorage.getItem('userSid')
this.countersign.instanceId = obj.instanceId
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 400 + 'px'
}
}, '*')
},
methods: {
//
getSummaries(param) {
const {
columns,
data
} = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'count') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
} else if (column.property === 'amount') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
}
})
return sums
},
showInfo(sid) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.init(sid).then((res) => {
if (res.success) {
this.formobj = res.data
}
})
selectStaffListss().then((res) => {
if (res.success) {
this.options = res.data
}
})
},
//
openCountersign(val) {
this.operation = val
this.currentLink = true
this.countersignLink = true
this.dialogList.comment = ''
req.getNextNodesForSubmit({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openAgree(val) {
this.operation = val
this.currentLink = true
this.countersignLink = false
this.dialogList.comment = '同意'
req.getNextNodesForSubmit({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openReject(val) {
this.operation = val
this.currentLink = true
this.countersignLink = false
this.dialogList.comment = ''
req.getPreviousNodesForReject({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openStop(val) {
this.operation = val
this.currentLink = false
this.countersignLink = false
this.dialogList.comment = ''
this.nodeDialogVisible = true
},
reject() {
if (this.operation === '同意') {
this.handleAgree()
} else if (this.operation === '驳回') {
if (this.dialogList.comment === '') {
this.$message({
showClose: true,
type: 'error',
message: '请填写审批意见'
})
} else {
this.handleReject()
}
} else if (this.operation === '终止') {
if (this.dialogList.comment === '') {
this.$message({
showClose: true,
type: 'error',
message: '请填写审批意见'
})
} else {
this.handleStop()
}
} else if (this.operation === '加签') {
this.handleCountersign()
}
},
/** 加签 */
handleCountersign() {
if (this.countersign.assignee === '') {
this.$message({
showClose: true,
type: 'error',
message: '请选择加签人员'
})
return
}
if (this.dialogList.comment === '') {
this.$message({
showClose: true,
type: 'error',
message: '请填写审批意见'
})
return
}
this.countersign.views = this.dialogList.comment
req.delegate(this.countersign).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 同意任务 */
handleAgree() {
this.linkByParameter.comment = this.dialogList.comment
req.complete(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 驳回任务 */
handleReject() {
this.linkByParameter.comment = this.dialogList.comment
req.reject(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 终止任务 */
handleStop() {
this.linkByParameter.comment = this.dialogList.comment
req.breakProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
.rowClass {
border-top: 1px solid #E0E3EB;
}
</style>

596
yxt-as-ui/src/views/workFlow/allocationByGroupFlow/allocationByGroupEdit.vue

@ -0,0 +1,596 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">提交</el-button>
</div>
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<span class="addinputInfo">{{ formobj.createTime }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<div class="span-sty">调出站</div>
<el-form-item><span class="addinputInfo">{{ formobj.outPlatName }}</span></el-form-item>
</el-col>
<el-col :span="5">
<div class="span-sty2"><span class="must">*</span> 调入分公司</div>
<el-form-item prop="inOrgName"> <el-select v-model="formobj.inOrgName" placeholder="请选择分公司"
@change="selectInOrg" class="addinputInfo2 addinputw2">
<el-option v-for="(item,i) in orgList" :key="i" :label="item.name" :value="item.sid">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<div class="span-sty2"><span class="must">*</span> 调入站点</div>
<el-form-item prop="inPlatName">
<el-select v-model="formobj.inPlatName" placeholder="请选择调入站" @change="selectInDeptName"
class="addinputInfo addinputw">
<el-option v-for="(item,i) in deptList" :key="i" :label="item.name" :value="item.sid">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 经办人</div>
<el-form-item prop="confirmName"> <el-select v-model="formobj.confirmName" placeholder="请选择经办人" clearable
@change="selectOperatorName" class="addinputInfo addinputw">
<el-option v-for="(item,i) in operatorNameList" :key="i" :label="item.name" :value="item.sid">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item> <el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo"
type="textarea" :rows="4" clearable /></el-form-item>
</el-col>
</el-row>
<div class="title titleOne">
<div>调拨商品列表</div>
<el-button type="primary" size="mini" class="btntopblueline" @click="seleGoods()">添加</el-button>
</div>
<el-table :data="formobj.wmsInventoryAllocateBillDetailNewList" :index="index" border style="width: 100%;"
show-summary :summary-method="getSummaries">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center" />
<el-table-column fixed label="操作" wid align="center" width="100">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="deleteGoods(scope.$index)">删除</el-button>
</template>
</el-table-column>
<el-table-column prop="goodsID" label="商品ID" width="100" align="center" />
<el-table-column prop="goodsSpuName" label="商品名称" width="100" align="center" />
<el-table-column prop="goodsSkuCode" label="商品编码" width="100" align="center" />
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" />
<el-table-column prop="unit" label="单位" align="center" />
<el-table-column prop="warehouseName" label="仓库" width="150" align="center" />
<el-table-column prop="warehouseArea" label="库区" width="150" align="center" />
<el-table-column prop="warehouseRackCode" label="库位" align="center" />
<el-table-column prop="stockCount" label="库存数量" width="100" align="center" />
<el-table-column prop="markUpRatio" label="加价比例(%)" width="120" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.markUpRatio" clearable placeholder=""
oninput="value=value.replace(/^([0-9-]\d*\.?\d{0,2})?.*$/,'$1')"
@input="commodityComputeYHAndXSJE(scope.row)" />
</template>
</el-table-column>
<el-table-column prop="requAmount" label="调拨单价" align="center" width="100" />
<el-table-column prop="count" label="调拨数量" width="120" align="center">
<template slot-scope="scope">
<el-input @input="commodityComputeYHAndXSJE2(scope.row)" v-model="scope.row.count" clearable
placeholder="" oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
</template>
</el-table-column>
<el-table-column prop="amount" label="调拨金额" align="center" width="100" />
</el-table>
</el-form>
</div>
</div>
<!-- 选择商品 -->
<chooseproducts v-show="viewState == 2" ref="divSp" @backData="backData" @doback="resetState" />
</div>
</template>
<script>
import req from '@/api/storage/allocation.js'
import chooseproducts from './relation/chooseproducts'
import {
getCurrentDate
} from '@/utils/index.js'
import {
selectOrgSidList,
getOrgSidByPath,
selAllByOrgSidPath,
fetchBySid,
tranThree
} from '@/api/Common/dictcommons'
export default {
components: {
chooseproducts,
},
data() {
return {
viewTitle: '',
viewState: 1,
submitdisabled: false,
activeNames: '1',
index: 0,
formobj: {
"sid": "",
"billNo": "",
"useOrgSid": "",
"createBySid": '',
"createByName": '',
"deptName": '',
"deptSid": '',
"createTime": getCurrentDate(),
"outOrgName": '',
"outOrgSid": '',
"outPlatName": '',
"outPlatSid": '',
"inOrgName": '',
"inOrgSid": '',
"inPlatName": "",
"inPlatSid": "",
"inOrgAttributeKey": "",
"inOrgAttributeValue": "",
"confirmName": "",
"confirmSid": "",
"remarks": "",
"grade": "3",
"createOrgSid": "",
"procDefId": "",
"nodeId": "",
"procInstId": "",
"nodeState": "待提交",
"taskId": "",
"wmsInventoryAllocateBillDetailNewList": []
},
rules: {
inOrgName: [{
required: true,
message: '调入分公司不能为空',
trigger: 'change'
}],
inPlatName: [{
required: true,
message: '调入站点不能为空',
trigger: 'change'
}],
confirmName: [{
required: true,
message: '经办人不能为空',
trigger: 'change'
}],
},
orgList: [],
deptList: [],
operatorNameList: [],
warehouseList: [],
warehouseRackList: []
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
}
}, '*')
},
methods: {
//
getSummaries(param) {
const {
columns,
data
} = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'count') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
} else if (column.property === 'amount') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
}
})
return sums
},
selectInOrg(val) {
console.log("selectInOrg", val);
const choose = this.orgList.filter((item) => item.sid == val)
console.log('>>>>>>>>>selectInOrg', choose)
this.formobj.inOrgSid = choose[0].sid
this.formobj.inOrgName = choose[0].name
tranThree({
sid: choose[0].sid,
deptSid: this.formobj.deptSid
}).then((res) => {
if (res.success) {
this.formobj.inDeptSid = ''
this.formobj.inDeptName = ''
this.formobj.inOrgAttributeKey = ''
this.formobj.inOrgAttributeValue = ''
console.log("getListDeptByOrgSid", res);
this.deptList = res.data
}
})
},
selectInDeptName(val) {
console.log("selectInDeptName", val);
const choose = this.deptList.filter((item) => item.sid == val)
console.log('>>>>>>>>>selectInDeptName', choose)
this.formobj.inPlatSid = choose[0].sid
this.formobj.inPlatName = choose[0].name
this.formobj.inOrgAttributeKey = choose[0].orgAttributeKey
this.formobj.inOrgAttributeValue = choose[0].orgAttributeValue
},
selectOperatorName(val) {
console.log("selectOperatorName", val);
const choose = this.operatorNameList.filter((item) => item.sid == val)
console.log('>>>>>>>>>selectOutOrg', choose)
this.formobj.confirmSid = choose[0].sid
this.formobj.confirmName = choose[0].name
},
getWarehouseAreaList(sid) {
var query = {
ckSid: sid
}
req.getWarehouseareas(query).then((res) => {
if (res.success) {
this.warehouseRackList = res.data
console.log("aaaaaa", this.warehouseRackList);
}
})
},
selectWarehouseName(row, val) {
console.log("selectWarehouseName", row);
console.log("selectWarehouseName", val);
const choose = this.warehouseList.filter((item) => item.sid == val)
console.log('>>>>>>>>>selectInOrg', choose)
row.inWarehouseSid = choose[0].sid
row.inWarehouseName = choose[0].warehouseName
row.inWarehouseRackSid = ''
row.inWarehouseRackCode = ''
this.getWarehouseAreaList(val)
},
selectWarehouseAreaCode(row, val) {
console.log("selectWarehouseAreaCode", row);
console.log("selectWarehouseAreaCode", val);
const choose = this.warehouseRackList.filter((item) => item.sid == val)
console.log('>>>>>>>>>selectInOrg', choose)
row.inWarehouseRackSid = choose[0].sid
row.inWarehouseRackCode = choose[0].areaCode
},
showAdd() {
this.viewTitle = '【新增】商品调拨申请'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
},
showInfo(sid) {
this.viewTitle = '【修改】商品调拨申请'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.init(sid).then((res) => {
if (res.success) {
this.formobj = res.data
this.formobj.instanceId = res.data.procInstId
selectOrgSidList().then((res) => {
if (res.success) {
console.log("selectOrgSidList", res);
this.orgList = res.data
}
})
selAllByOrgSidPath({
orgSidPath: this.formobj.orgPath
}).then((res) => {
if (res.success) {
console.log("selAllByOrgSidPath", res);
this.operatorNameList = res.data
}
})
}
})
},
backData(value) {
this.viewState = 1
if (value.length > 0) {
value.forEach((e) => {
this.formobj.wmsInventoryAllocateBillDetailNewList.push({
"goodsSpuSid": e.goodsSpuSid,
"goodsSpuName": e.goodsSpuName,
"goodsSkuCode": e.goodsSkuCode,
"goodsSkuOwnSpec": e.goodsSkuOwnSpec,
"goodsSkuSid": e.goodsSkuSid,
"goodsSkuTitle": e.goodsSkuTitle,
"billSid": this.formobj.sid,
"inventorySid": e.inventorySid,
"warehouseSid": e.warehouseSid,
"warehouseName": e.warehouseName,
"warehouseAreaSid": e.warehouseAreaSid,
"warehouseArea": e.warehouseArea,
"warehouseRackSid": e.warehouseRackSid,
"warehouseRackCode": e.warehouseRackCode,
"taxPrice": e.taxPrice,
"stockCount": e.count,
"inWarehouseSid": '',
"inWarehouseName": '',
"inWarehouseRackSid": '',
"inWarehouseRackCode": '',
"count": 0,
"amount": 0,
"requAmount": e.taxPrice,
"markUpRatio": 0,
"unit": e.unit,
"goodsID": e.goodsID,
"manufacturerSid": e.manufacturerSid,
"manufacturerName": e.manufacturerName,
})
})
}
},
deleteGoods(index) {
this.formobj.wmsInventoryAllocateBillDetailNewList.splice(index, 1)
},
resetState() {
this.viewState = 1
},
seleGoods() {
this.viewState = 2
const aa = []
this.$refs['divSp'].showData(aa, this.formobj.deptSid)
},
//
commodityComputeYHAndXSJE(row) {
console.log("commodityComputeYHAndXSJE", row);
row.requAmount = (Number(row.taxPrice) * Number(1 + Number(row.markUpRatio) / 100)).toFixed(2)
row.amount = (Number(row.count) * Number(row.requAmount)).toFixed(2)
},
//
commodityComputeYHAndXSJE2(row) {
if (Number(row.stockCount) < Number(row.count)) {
row.count = Number(row.stockCount)
} else {
row.amount = (Number(row.count) * Number(row.requAmount)).toFixed(2)
}
},
saveOrUpdate() {
console.log("saveOrUpdate", this.formobj);
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.save(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '保存成功'
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
},
submit() {
console.log("saveOrUpdate", this.formobj);
this.$refs['form_obj'].validate((valid) => {
if (valid) {
if (this.formobj.wmsInventoryAllocateBillDetailNewList.length == 0) {
this.$message({
type: "warning",
showClose: true,
message: '调拨商品不能为空'
})
return
}
for (var i = 0; i < this.formobj.wmsInventoryAllocateBillDetailNewList.length; i++) {
var item = this.formobj.wmsInventoryAllocateBillDetailNewList[i]
if (Number(item.count) == 0) {
this.$message({
type: "warning",
showClose: true,
message: '调拨数量不能为空或0'
})
return
}
}
this.submitdisabled = true
req.allocation(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '调拨成功'
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
},
}
}
</script>
<style scoped>
.formaddcopy02 .el-row .el-col /deep/ .el-form-item__error {
margin-left: 120px !important;
}
.must {
color: #f00;
}
.span-sty {
width: 130px !important;
}
.span-sty2 {
position: absolute;
top: 0;
bottom: 0;
left: 0;
line-height: 42px;
text-align: right;
font-size: 14px;
color: #606266;
font-weight: 600;
width: 70px;
padding-right: 5px;
border-right: 1px solid #e0e3eb;
width: 110px !important;
}
.addinputInfo2 {
margin-left: 110px !important;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw2 {
margin-left: 110px !important;
width: calc(100% - 105px);
}
.addinputInfo {
margin-left: 120px !important;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 120px !important;
width: calc(100% - 115px);
}
.first_row {
border-top: 1px solid #E0E3EB;
}
.titleOne {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .el-radio-group {
display: inline;
line-height: 1px;
vertical-align: middle;
}
</style>

227
yxt-as-ui/src/views/workFlow/allocationByGroupFlow/allocationByGroupYiBan.vue

@ -0,0 +1,227 @@
<template>
<div class="app-container">
<div class="tab-header webtop">
<div>调拨详情</div>
<div>
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button>
</div>
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">调出站</div>
<el-form-item><span class="addinputInfo">{{ formobj.outPlatName }}</span></el-form-item>
</el-col>
<el-col :span="5">
<div class="span-sty">调入站</div>
<el-form-item><span class="addinputInfo">{{ formobj.inOrgName }}</span></el-form-item>
</el-col>
<el-col :span="3">
<el-form-item><span style="width: 100%;">{{ formobj.inPlatName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">经办人</div>
<el-form-item><span class="addinputInfo">{{ formobj.confirmName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<div class="title titleOne">
<div>调拨商品列表</div>
</div>
<el-table :data="formobj.wmsInventoryAllocateBillDetailNewList" :index="index" border style="width: 100%;"
show-summary :summary-method="getSummaries">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center" />
<el-table-column prop="goodsID" label="商品ID" align="center" />
<el-table-column prop="goodsSpuName" label="商品名称" align="center" />
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" />
<el-table-column prop="goodsSkuOwnSpec" label="型号" align="center" />
<el-table-column prop="unit" label="单位" align="center" />
<el-table-column prop="warehouseName" label="仓库" width="150" align="center" />
<el-table-column prop="warehouseArea" label="仓库" width="150" align="center" />
<el-table-column prop="warehouseRackCode" label="库位" align="center" />
<el-table-column prop="stockCount" label="库存数量" align="center" />
<el-table-column prop="markUpRatio" label="加价比例" align="center" />
<el-table-column prop="requAmount" label="调拨单价" align="center" />
<el-table-column prop="count" label="调拨数量" align="center" />
<el-table-column prop="amount" label="调拨金额" align="center" width="100" />
</el-table>
</el-form>
</div>
</div>
</template>
<script>
import req from '@/api/storage/allocation.js'
export default {
data() {
return {
index: 0,
formobj: {},
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
},
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
}
}, '*')
},
methods: {
//
getSummaries(param) {
const {
columns,
data
} = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'count') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
} else if (column.property === 'amount') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
}
})
return sums
},
showInfo(sid) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.init(sid).then((res) => {
if (res.success) {
this.formobj = res.data
}
})
},
/** 确认撤回任务 */
openRevoke() {
this.$confirm('是否确认执行撤回操作', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.handleRevoke()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消撤回'
})
})
},
/** 撤回任务 */
handleRevoke() {
req.revokeProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
</style>

172
yxt-as-ui/src/views/workFlow/allocationByGroupFlow/relation/chooseproducts.vue

@ -0,0 +1,172 @@
<template>
<div class="app-container">
<div>
<div class="tab-header webtop">
<div>选择商品</div>
<div>
<el-button type="primary" size="small" @click="AddUpdateReturn">确定</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="120px" class="tab-header">
<el-form-item label="商品ID" class="searchlist">
<el-input v-model="listQuery.params.goodsID" placeholder="" clearable />
</el-form-item>
<el-form-item label="商品编码" class="searchlist">
<el-input v-model="listQuery.params.goodsSkuCode" placeholder="" clearable />
</el-form-item>
<el-form-item label="商品名称" class="searchlist">
<el-input v-model="listQuery.params.goodsSkuTitle" placeholder="" clearable />
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" icon="el-icon-search" @click="handleFilter" size="small">查询</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button>
</div>
</div>
</div>
<div class="listtop">
<div class="tit">商品列表</div>
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>-->
</div>
<div class="">
<el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column width="50px" type="selection" align="center" />
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column prop="goodsID" label="商品ID" align="center" />
<el-table-column prop="goodsSkuTitle" label="商品名称" align="center" />
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" />
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" />
<el-table-column prop="unit" label="单位" align="center" />
<el-table-column prop="warehouseName" label="仓库" align="center" />
<el-table-column prop="warehouseArea" label="库区" align="center" />
<el-table-column prop="warehouseRackCode" label="库位" align="center" />
<el-table-column prop="count" label="库存数量" align="center" />
</el-table>
</div>
<div class="pages">
<div class="tit" />
<!-- 翻页 -->
<Pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current"
:limit.sync="listQuery.size" class="pagination" @pagination="getList" />
</div>
</div>
</div>
</div>
</template>
<script>
import Pagination from '@/components/pagination'
import req from '@/api/storage/allocation.js'
export default {
name: 'SelectVehicle',
components: {
Pagination
},
data() {
return {
isSearchShow: false,
searchxianshitit: '隐藏查询条件',
tableKey: 0,
sids: [],
list: [],
number: '',
listLoading: false,
listQuery: {
current: 1,
size: 10,
params: {
deptSid: '',
goodsID: '',
goodsSkuTitle: '',
goodsSkuCode: '',
},
total: 0
}
}
},
methods: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
getList() {
this.listLoading = true
req.getGoods(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
this.listQuery.total = response.data.total
this.list = response.data.records
}
})
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
//
handleReset() {
this.listQuery.current = 1
this.listQuery.size = 10
this.listQuery.total = 0
this.listQuery.params.goodsID = ''
this.listQuery.params.goodsSkuTitle = ''
this.listQuery.params.goodsSkuCode = ''
this.getList()
},
handleSelectionChange(row) {
this.sids = row
},
showData(value, deptSid) {
// const aa = []
// if (value.length > 0) {
// for (var i = 0; i < value.length; i++) {
// aa.push(value[i].saleVehSid)
// }
// this.listQuery.params.saleVehSids = aa
// } else {
// this.listQuery.params.saleVehSids = []
// }``
this.listQuery.params.deptSid = deptSid
this.getList()
},
//
AddUpdateReturn() {
if (this.sids.length > 0) {
this.$emit('backData', this.sids)
} else {
this.$notify({
title: '提示',
message: '请至少选择一条记录进行操作',
type: 'error',
duration: 2000
})
}
},
//
handleReturn() {
this.$emit('doback')
}
}
}
</script>
<style scoped>
</style>

472
yxt-as-ui/src/views/workFlow/allocationFlow/allocationDaiBan.vue

@ -0,0 +1,472 @@
<template>
<div class="app-container">
<div class="tab-header webtop">
<div>调拨详情</div>
<div>
<el-button type="primary" size="small" @click="openCountersign('加签')"> </el-button>
<el-button type="primary" size="small" @click="openAgree('同意')"> </el-button>
<el-button type="danger" size="small" @click="openReject('驳回')"> </el-button>
<el-button type="danger" size="small" @click="openStop('终止')"> </el-button>
</div>
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">调出站</div>
<el-form-item><span class="addinputInfo">{{ formobj.outPlatName }}</span></el-form-item>
</el-col>
<el-col :span="5">
<div class="span-sty">调入站</div>
<el-form-item><span class="addinputInfo">{{ formobj.inOrgName }}</span></el-form-item>
</el-col>
<el-col :span="3">
<el-form-item><span style="width: 100%;">{{ formobj.inPlatName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">经办人</div>
<el-form-item><span class="addinputInfo">{{ formobj.confirmName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<div class="title titleOne">
<div>调拨商品列表</div>
</div>
<el-table :data="formobj.wmsInventoryAllocateBillDetailNewList" :index="index" border style="width: 100%;"
show-summary :summary-method="getSummaries">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center" />
<el-table-column prop="goodsID" label="商品ID" align="center" />
<el-table-column prop="goodsSpuName" label="商品名称" align="center" />
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" />
<el-table-column prop="goodsSkuOwnSpec" label="型号" align="center" />
<el-table-column prop="unit" label="单位" align="center" />
<el-table-column prop="warehouseName" label="仓库" width="150" align="center" />
<el-table-column prop="warehouseArea" label="仓库" width="150" align="center" />
<el-table-column prop="warehouseRackCode" label="库位" align="center" />
<el-table-column prop="stockCount" label="库存数量" align="center" />
<el-table-column prop="markUpRatio" label="加价比例" align="center" />
<el-table-column prop="requAmount" label="调拨单价" align="center" />
<el-table-column prop="count" label="调拨数量" align="center" />
<el-table-column prop="amount" label="调拨金额" align="center" width="100" />
</el-table>
</el-form>
</div>
<!-- 选择待办人 的弹出框-->
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%">
<el-form class="formadd">
<el-row v-show="countersignLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="4" class="tleftb">
<span class="icon">*</span>加签人员:
</el-col>
<el-col :span="20">
<el-form-item>
<el-select v-model="countersign.assignee" placeholder="请选择" filterable>
<el-option v-for="item in options" :key="item.userSid" :label="item.staffName" :value="item.userSid">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="4" class="tleftb">
<span>当前环节:</span>
</el-col>
<el-col :span="20">
<el-form-item><span>{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item>
</el-col>
</el-row>
<el-row :class="{rowClass:!currentLink}">
<el-col :span="4" class="tleftb">
<span>意见:</span>
</el-col>
<el-col :span="20">
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw"
type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable></el-input></el-form-item>
</el-col>
</el-row>
<div style="text-align:center;margin-top: 20px;">
<el-button type="primary" size="mini" @click="reject"> </el-button>
<el-button type="info " size="mini" @click="nodeDialogVisible = false"> </el-button>
</div>
</el-form>
</el-dialog>
</div>
</template>
<script>
import req from '@/api/storage/allocation.js'
import {
selectStaffListss
} from '@/api/Common/dictcommons'
export default {
data() {
return {
index: 0,
formobj: {},
options: [],
operation: '', //
dialogList: {
comment: ''
},
startTask: true,
current: {
taskDefKey: '',
taskName: '' //
},
nextNode: {}, //
nodeDialogVisible: false,
currentLink: true,
countersignLink: false,
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
},
//
countersign: {
taskId: '',
assignee: '',
userSid: '',
instanceId: '',
views: ''
}
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
// this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath')
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
this.current.taskDefKey = obj.taskDefKey
this.current.taskName = obj.taskName
//
this.countersign.taskId = obj.taskId
this.countersign.userSid = window.sessionStorage.getItem('userSid')
this.countersign.instanceId = obj.instanceId
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 400 + 'px'
}
}, '*')
},
methods: {
//
getSummaries(param) {
const {
columns,
data
} = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'count') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
} else if (column.property === 'amount') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
}
})
return sums
},
showInfo(sid) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.init(sid).then((res) => {
if (res.success) {
this.formobj = res.data
}
})
selectStaffListss().then((res) => {
if (res.success) {
this.options = res.data
}
})
},
//
openCountersign(val) {
this.operation = val
this.currentLink = true
this.countersignLink = true
this.dialogList.comment = ''
req.getNextNodesForSubmit({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openAgree(val) {
this.operation = val
this.currentLink = true
this.countersignLink = false
this.dialogList.comment = '同意'
req.getNextNodesForSubmit({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openReject(val) {
this.operation = val
this.currentLink = true
this.countersignLink = false
this.dialogList.comment = ''
req.getPreviousNodesForReject({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openStop(val) {
this.operation = val
this.currentLink = false
this.countersignLink = false
this.dialogList.comment = ''
this.nodeDialogVisible = true
},
reject() {
if (this.operation === '同意') {
this.handleAgree()
} else if (this.operation === '驳回') {
if (this.dialogList.comment === '') {
this.$message({
showClose: true,
type: 'error',
message: '请填写审批意见'
})
} else {
this.handleReject()
}
} else if (this.operation === '终止') {
if (this.dialogList.comment === '') {
this.$message({
showClose: true,
type: 'error',
message: '请填写审批意见'
})
} else {
this.handleStop()
}
} else if (this.operation === '加签') {
this.handleCountersign()
}
},
/** 加签 */
handleCountersign() {
if (this.countersign.assignee === '') {
this.$message({
showClose: true,
type: 'error',
message: '请选择加签人员'
})
return
}
if (this.dialogList.comment === '') {
this.$message({
showClose: true,
type: 'error',
message: '请填写审批意见'
})
return
}
this.countersign.views = this.dialogList.comment
req.delegate(this.countersign).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 同意任务 */
handleAgree() {
this.linkByParameter.comment = this.dialogList.comment
req.complete(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 驳回任务 */
handleReject() {
this.linkByParameter.comment = this.dialogList.comment
req.reject(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 终止任务 */
handleStop() {
this.linkByParameter.comment = this.dialogList.comment
req.breakProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
.rowClass {
border-top: 1px solid #E0E3EB;
}
</style>

617
yxt-as-ui/src/views/workFlow/allocationFlow/allocationEdit.vue

@ -0,0 +1,617 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">提交</el-button>
</div>
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<span class="addinputInfo">{{ formobj.createTime }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">调出站</div>
<el-form-item><span class="addinputInfo">{{ formobj.outPlatName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 调入站点</div>
<el-form-item prop="inPlatName">
<el-select v-model="formobj.inPlatName" placeholder="请选择调入站" @change="selectInDeptName"
class="addinputInfo addinputw">
<el-option v-for="(item,i) in deptList" :key="i" :label="item.name" :value="item.sid">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 经办人</div>
<el-form-item prop="confirmName"> <el-select v-model="formobj.confirmName" placeholder="请选择经办人" clearable
@change="selectOperatorName" class="addinputInfo addinputw">
<el-option v-for="(item,i) in operatorNameList" :key="i" :label="item.name" :value="item.sid">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item> <el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo"
type="textarea" :rows="4" clearable /></el-form-item>
</el-col>
</el-row>
<div class="title titleOne">
<div>调拨商品列表</div>
<el-button type="primary" size="mini" class="btntopblueline" @click="seleGoods()">添加</el-button>
</div>
<el-table :data="formobj.wmsInventoryAllocateBillDetailNewList" :index="index" border style="width: 100%;"
show-summary :summary-method="getSummaries">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center" />
<el-table-column fixed label="操作" wid align="center" width="100">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="deleteGoods(scope.$index)">删除</el-button>
</template>
</el-table-column>
<el-table-column prop="goodsID" label="商品ID" width="100" align="center" />
<el-table-column prop="goodsSpuName" label="商品名称" width="100" align="center" />
<el-table-column prop="goodsSkuCode" label="商品编码" width="100" align="center" />
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" />
<el-table-column prop="unit" label="单位" align="center" />
<el-table-column prop="warehouseName" label="仓库" width="150" align="center" />
<el-table-column prop="warehouseArea" label="库区" width="150" align="center" />
<el-table-column prop="warehouseRackCode" label="库位" align="center" />
<el-table-column prop="stockCount" label="库存数量" width="100" align="center" />
<el-table-column prop="markUpRatio" label="加价比例(%)" width="120" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.markUpRatio" clearable placeholder=""
oninput="value=value.replace(/^([0-9-]\d*\.?\d{0,2})?.*$/,'$1')"
@input="commodityComputeYHAndXSJE(scope.row)" />
</template>
</el-table-column>
<el-table-column prop="requAmount" label="调拨单价" align="center" width="100" />
<el-table-column prop="count" label="调拨数量" width="120" align="center">
<template slot-scope="scope">
<el-input @input="commodityComputeYHAndXSJE2(scope.row)" v-model="scope.row.count" clearable
placeholder="" oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
</template>
</el-table-column>
<el-table-column prop="amount" label="调拨金额" align="center" width="100" />
</el-table>
</el-form>
</div>
</div>
<!-- 选择商品 -->
<chooseproducts v-show="viewState == 2" ref="divSp" @backData="backData" @doback="resetState" />
</div>
</template>
<script>
import req from '@/api/storage/allocation.js'
import chooseproducts from './relation/chooseproducts'
import {
getCurrentDate
} from '@/utils/index.js'
import {
getOrgSidByPath,
fetchBySid,
fetchByDepSid,
selectOrgSidList,
getServiceStationByOrgSid,
selAllByOrgSidPath,
tranOne, // -
tranfour, // -
} from '@/api/Common/dictcommons'
export default {
components: {
chooseproducts,
},
data() {
return {
viewTitle: '',
viewState: 1,
submitdisabled: false,
activeNames: '1',
index: 0,
formobj: {
"sid": "",
"billNo": "",
"useOrgSid": "",
"createBySid": '',
"createByName": '',
"deptName": '',
"deptSid": '',
"createTime": getCurrentDate(),
"outOrgName": '',
"outOrgSid": '',
"outPlatName": '',
"outPlatSid": '',
"inOrgName": '',
"inOrgSid": '',
"inPlatName": "",
"inPlatSid": "",
"inOrgAttributeKey": "",
"inOrgAttributeValue": "",
"confirmName": "",
"confirmSid": "",
"remarks": "",
"grade": "1",
"createOrgSid": "",
"procDefId": "",
"nodeId": "",
"procInstId": "",
"nodeState": "待提交",
"taskId": "",
"wmsInventoryAllocateBillDetailNewList": []
},
rules: {
inOrgName: [{
required: true,
message: '调入分公司不能为空',
trigger: 'change'
}],
inPlatName: [{
required: true,
message: '调入站点不能为空',
trigger: 'change'
}],
confirmName: [{
required: true,
message: '经办人不能为空',
trigger: 'change'
}],
},
orgList: [],
deptList: [],
operatorNameList: [],
warehouseList: [],
warehouseRackList: []
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
}
}, '*')
},
methods: {
//
getSummaries(param) {
const {
columns,
data
} = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'count') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
} else if (column.property === 'amount') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
}
})
return sums
},
selectInOrg(val) {
console.log("selectInOrg", val);
const choose = this.orgList.filter((item) => item.sid == val)
console.log('>>>>>>>>>selectInOrg', choose)
this.formobj.inOrgSid = choose[0].sid
this.formobj.inOrgName = choose[0].name
getServiceStationByOrgSid(choose[0].sid).then((res) => {
if (res.success) {
this.formobj.inDeptSid = ''
this.formobj.inDeptName = ''
this.formobj.inOrgAttributeKey = ''
this.formobj.inOrgAttributeValue = ''
console.log("getListDeptByOrgSid", res);
this.deptList = res.data
}
})
},
selectInDeptName(val) {
console.log("selectInDeptName", val);
const choose = this.deptList.filter((item) => item.sid == val)
console.log('>>>>>>>>>selectInDeptName', choose)
this.formobj.inPlatSid = choose[0].sid
this.formobj.inPlatName = choose[0].name
this.formobj.inOrgAttributeKey = choose[0].orgAttributeKey
this.formobj.inOrgAttributeValue = choose[0].orgAttributeValue
},
selectOperatorName(val) {
console.log("selectOperatorName", val);
const choose = this.operatorNameList.filter((item) => item.sid == val)
console.log('>>>>>>>>>selectOutOrg', choose)
this.formobj.confirmSid = choose[0].sid
this.formobj.confirmName = choose[0].name
},
getWarehouseAreaList(sid) {
var query = {
ckSid: sid
}
req.getWarehouseareas(query).then((res) => {
if (res.success) {
this.warehouseRackList = res.data
console.log("aaaaaa", this.warehouseRackList);
}
})
},
selectWarehouseName(row, val) {
console.log("selectWarehouseName", row);
console.log("selectWarehouseName", val);
const choose = this.warehouseList.filter((item) => item.sid == val)
console.log('>>>>>>>>>selectInOrg', choose)
row.inWarehouseSid = choose[0].sid
row.inWarehouseName = choose[0].warehouseName
row.inWarehouseRackSid = ''
row.inWarehouseRackCode = ''
this.getWarehouseAreaList(val)
},
selectWarehouseAreaCode(row, val) {
console.log("selectWarehouseAreaCode", row);
console.log("selectWarehouseAreaCode", val);
const choose = this.warehouseRackList.filter((item) => item.sid == val)
console.log('>>>>>>>>>selectInOrg', choose)
row.inWarehouseRackSid = choose[0].sid
row.inWarehouseRackCode = choose[0].areaCode
},
showAdd() {
this.viewTitle = '【新增】商品调拨申请'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
},
showInfo(sid) {
this.viewTitle = '【修改】商品调拨申请'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.init(sid).then((res) => {
if (res.success) {
this.formobj = res.data
this.formobj.instanceId = res.data.procInstId
fetchByDepSid({
sid: this.formobj.deptSid
}).then((respsone) => {
if (respsone.success) {
console.log("fetchByDepSid", respsone.data);
//
if (respsone.data.orgAttributeKey == 'fwz_001') {
// -
tranOne(this.formobj.deptSid).then((resp) => {
if (resp.success) {
console.log("tranOne", resp);
this.deptList = resp.data
}
})
} else { //
// -
tranfour(this.formobj.deptSid).then((resp) => {
if (resp.success) {
console.log("tranfour", resp);
this.deptList = resp.data
}
})
}
}
})
selectOrgSidList().then((res) => {
if (res.success) {
console.log("selectOrgSidList", res);
this.orgList = res.data
}
})
selAllByOrgSidPath({
orgSidPath: this.formobj.orgPath
}).then((res) => {
if (res.success) {
console.log("selAllByOrgSidPath", res);
this.operatorNameList = res.data
}
})
}
})
},
backData(value) {
this.viewState = 1
if (value.length > 0) {
value.forEach((e) => {
this.formobj.wmsInventoryAllocateBillDetailNewList.push({
"goodsSpuSid": e.goodsSpuSid,
"goodsSpuName": e.goodsSpuName,
"goodsSkuCode": e.goodsSkuCode,
"goodsSkuOwnSpec": e.goodsSkuOwnSpec,
"goodsSkuSid": e.goodsSkuSid,
"goodsSkuTitle": e.goodsSkuTitle,
"billSid": this.formobj.sid,
"inventorySid": e.inventorySid,
"warehouseSid": e.warehouseSid,
"warehouseName": e.warehouseName,
"warehouseAreaSid": e.warehouseAreaSid,
"warehouseArea": e.warehouseArea,
"warehouseRackSid": e.warehouseRackSid,
"warehouseRackCode": e.warehouseRackCode,
"taxPrice": e.taxPrice,
"stockCount": e.count,
"inWarehouseSid": '',
"inWarehouseName": '',
"inWarehouseRackSid": '',
"inWarehouseRackCode": '',
"count": 0,
"amount": 0,
"requAmount": e.taxPrice,
"markUpRatio": 0,
"unit": e.unit,
"goodsID": e.goodsID,
"manufacturerSid": e.manufacturerSid,
"manufacturerName": e.manufacturerName,
})
})
}
},
deleteGoods(index) {
this.formobj.wmsInventoryAllocateBillDetailNewList.splice(index, 1)
},
resetState() {
this.viewState = 1
},
seleGoods() {
this.viewState = 2
const aa = []
this.$refs['divSp'].showData(aa, this.formobj.deptSid)
},
//
commodityComputeYHAndXSJE(row) {
console.log("commodityComputeYHAndXSJE", row);
row.requAmount = (Number(row.taxPrice) * Number(1 + Number(row.markUpRatio) / 100)).toFixed(2)
row.amount = (Number(row.count) * Number(row.requAmount)).toFixed(2)
},
//
commodityComputeYHAndXSJE2(row) {
if (Number(row.stockCount) < Number(row.count)) {
row.count = Number(row.stockCount)
} else {
row.amount = (Number(row.count) * Number(row.requAmount)).toFixed(2)
}
},
saveOrUpdate() {
console.log("saveOrUpdate", this.formobj);
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.save(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '保存成功'
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
},
submit() {
console.log("saveOrUpdate", this.formobj);
this.$refs['form_obj'].validate((valid) => {
if (valid) {
if (this.formobj.wmsInventoryAllocateBillDetailNewList.length == 0) {
this.$message({
type: "warning",
showClose: true,
message: '调拨商品不能为空'
})
return
}
for (var i = 0; i < this.formobj.wmsInventoryAllocateBillDetailNewList.length; i++) {
var item = this.formobj.wmsInventoryAllocateBillDetailNewList[i]
if (Number(item.count) == 0) {
this.$message({
type: "warning",
showClose: true,
message: '调拨数量不能为空或0'
})
return
}
}
this.submitdisabled = true
req.allocation(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '调拨成功'
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
},
}
}
</script>
<style scoped>
.formaddcopy02 .el-row .el-col /deep/ .el-form-item__error {
margin-left: 120px !important;
}
.must {
color: #f00;
}
.span-sty {
width: 130px !important;
}
.span-sty2 {
position: absolute;
top: 0;
bottom: 0;
left: 0;
line-height: 42px;
text-align: right;
font-size: 14px;
color: #606266;
font-weight: 600;
width: 70px;
padding-right: 5px;
border-right: 1px solid #e0e3eb;
width: 110px !important;
}
.addinputInfo2 {
margin-left: 110px !important;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw2 {
margin-left: 110px !important;
width: calc(100% - 105px);
}
.addinputInfo {
margin-left: 120px !important;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 120px !important;
width: calc(100% - 115px);
}
.first_row {
border-top: 1px solid #E0E3EB;
}
.titleOne {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .el-radio-group {
display: inline;
line-height: 1px;
vertical-align: middle;
}
</style>

225
yxt-as-ui/src/views/workFlow/allocationFlow/allocationYiBan.vue

@ -0,0 +1,225 @@
<template>
<div class="app-container">
<div class="tab-header webtop">
<div>调拨详情</div>
<div>
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button>
</div>
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">调出站</div>
<el-form-item><span class="addinputInfo">{{ formobj.outPlatName }}</span></el-form-item>
</el-col>
<el-col :span="5">
<div class="span-sty">调入站</div>
<el-form-item><span class="addinputInfo">{{ formobj.inOrgName }}</span></el-form-item>
</el-col>
<el-col :span="3">
<el-form-item><span style="width: 100%;">{{ formobj.inPlatName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">经办人</div>
<el-form-item><span class="addinputInfo">{{ formobj.confirmName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<div class="title titleOne">
<div>调拨商品列表</div>
</div>
<el-table :data="formobj.wmsInventoryAllocateBillDetailNewList" :index="index" border style="width: 100%;"
show-summary :summary-method="getSummaries">
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center" />
<el-table-column prop="goodsID" label="商品ID" align="center" />
<el-table-column prop="goodsSpuName" label="商品名称" align="center" />
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" />
<el-table-column prop="goodsSkuOwnSpec" label="型号" align="center" />
<el-table-column prop="unit" label="单位" align="center" />
<el-table-column prop="warehouseName" label="仓库" width="150" align="center" />
<el-table-column prop="warehouseArea" label="仓库" width="150" align="center" />
<el-table-column prop="warehouseRackCode" label="库位" align="center" />
<el-table-column prop="stockCount" label="库存数量" align="center" />
<el-table-column prop="markUpRatio" label="加价比例" align="center" />
<el-table-column prop="requAmount" label="调拨单价" align="center" />
<el-table-column prop="count" label="调拨数量" align="center" />
<el-table-column prop="amount" label="调拨金额" align="center" width="100" />
</el-table>
</el-form>
</div>
</div>
</template>
<script>
import req from '@/api/storage/allocation.js'
export default {
data() {
return {
index: 0,
formobj: {},
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
},
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
}
}, '*')
},
methods: {
//
getSummaries(param) {
const {
columns,
data
} = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'count') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
} else if (column.property === 'amount') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] += ''
}
})
return sums
},
showInfo(sid) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.init(sid).then((res) => {
if (res.success) {
this.formobj = res.data
}
})
},
/** 确认撤回任务 */
openRevoke() {
this.$confirm('是否确认执行撤回操作', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.handleRevoke()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消撤回'
})
})
},
/** 撤回任务 */
handleRevoke() {
req.revokeProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
</style>

172
yxt-as-ui/src/views/workFlow/allocationFlow/relation/chooseproducts.vue

@ -0,0 +1,172 @@
<template>
<div class="app-container">
<div>
<div class="tab-header webtop">
<div>选择商品</div>
<div>
<el-button type="primary" size="small" @click="AddUpdateReturn">确定</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="120px" class="tab-header">
<el-form-item label="商品ID" class="searchlist">
<el-input v-model="listQuery.params.goodsID" placeholder="" clearable />
</el-form-item>
<el-form-item label="商品编码" class="searchlist">
<el-input v-model="listQuery.params.goodsSkuCode" placeholder="" clearable />
</el-form-item>
<el-form-item label="商品名称" class="searchlist">
<el-input v-model="listQuery.params.goodsSkuTitle" placeholder="" clearable />
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" icon="el-icon-search" @click="handleFilter" size="small">查询</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button>
</div>
</div>
</div>
<div class="listtop">
<div class="tit">商品列表</div>
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>-->
</div>
<div class="">
<el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column width="50px" type="selection" align="center" />
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column prop="goodsID" label="商品ID" align="center" />
<el-table-column prop="goodsSkuTitle" label="商品名称" align="center" />
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" />
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" />
<el-table-column prop="unit" label="单位" align="center" />
<el-table-column prop="warehouseName" label="仓库" align="center" />
<el-table-column prop="warehouseArea" label="库区" align="center" />
<el-table-column prop="warehouseRackCode" label="库位" align="center" />
<el-table-column prop="count" label="库存数量" align="center" />
</el-table>
</div>
<div class="pages">
<div class="tit" />
<!-- 翻页 -->
<Pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current"
:limit.sync="listQuery.size" class="pagination" @pagination="getList" />
</div>
</div>
</div>
</div>
</template>
<script>
import Pagination from '@/components/pagination'
import req from '@/api/storage/allocation.js'
export default {
name: 'SelectVehicle',
components: {
Pagination
},
data() {
return {
isSearchShow: false,
searchxianshitit: '隐藏查询条件',
tableKey: 0,
sids: [],
list: [],
number: '',
listLoading: false,
listQuery: {
current: 1,
size: 10,
params: {
deptSid: '',
goodsID: '',
goodsSkuTitle: '',
goodsSkuCode: '',
},
total: 0
}
}
},
methods: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
getList() {
this.listLoading = true
req.getGoods(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
this.listQuery.total = response.data.total
this.list = response.data.records
}
})
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
//
handleReset() {
this.listQuery.current = 1
this.listQuery.size = 10
this.listQuery.total = 0
this.listQuery.params.goodsID = ''
this.listQuery.params.goodsSkuTitle = ''
this.listQuery.params.goodsSkuCode = ''
this.getList()
},
handleSelectionChange(row) {
this.sids = row
},
showData(value, deptSid) {
// const aa = []
// if (value.length > 0) {
// for (var i = 0; i < value.length; i++) {
// aa.push(value[i].saleVehSid)
// }
// this.listQuery.params.saleVehSids = aa
// } else {
// this.listQuery.params.saleVehSids = []
// }``
this.listQuery.params.deptSid = deptSid
this.getList()
},
//
AddUpdateReturn() {
if (this.sids.length > 0) {
this.$emit('backData', this.sids)
} else {
this.$notify({
title: '提示',
message: '请至少选择一条记录进行操作',
type: 'error',
duration: 2000
})
}
},
//
handleReturn() {
this.$emit('doback')
}
}
}
</script>
<style scoped>
</style>

496
yxt-as-ui/src/views/workFlow/hezuoerjizhanFlow/secondaryCooperativeStationDaiBan.vue

@ -0,0 +1,496 @@
<template>
<div class="app-container">
<div class="tab-header webtop">
<div>合作二级站备案申请详情</div>
<div>
<el-button type="primary" size="small" @click="openCountersign('加签')"> </el-button>
<el-button type="primary" size="small" @click="openAgree('同意')"> </el-button>
<el-button type="danger" size="small" @click="openReject('驳回')"> </el-button>
<el-button type="danger" size="small" @click="openStop('终止')"> </el-button>
</div>
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<div class="title">合作二级站基本信息</div>
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="24">
<div class="span-sty">二级站点名称</div>
<el-form-item><span class="addinputInfo">{{ formobj.siteName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="16">
<div class="span-sty">法定代表人</div>
<el-form-item><span class="addinputInfo">{{ formobj.legalPerson }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">手机号码</div>
<el-form-item><span class="addinputInfo">{{ formobj.phone }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="16">
<div class="span-sty">负责人</div>
<el-form-item><span class="addinputInfo">{{ formobj.directorName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">手机号码</div>
<el-form-item><span class="addinputInfo">{{ formobj.directorPhone }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="16">
<div class="span-sty">统一社会信用号码</div>
<el-form-item><span class="addinputInfo">{{ formobj.unifiedCreditCode }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">证件有效期</div>
<el-form-item><span class="addinputInfo">{{ formobj.termValidity }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">地址</div>
<el-form-item><span class="addinputInfo">{{ formobj.address }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="16">
<div class="span-sty">合作有效期至</div>
<el-form-item><span class="addinputInfo">{{ formobj.limitedTerm }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">授信金额</div>
<el-form-item><span class="addinputInfo">{{ formobj.creditGranting }}</span></el-form-item>
</el-col>
</el-row>
<div class="title">附件清单</div>
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="24">
<div class="span-sty">营业执照</div>
<el-form-item><el-image class="addinputInfo" style="width: 150px;height: 150px"
v-for="(item, index) in formobj.businessLicenseFile" :key="index" :src="item.url"
:preview-src-list="[item.url]" /></el-form-item>
</el-col>
<el-col :span="24">
<div class="span-sty">合作协议</div>
<el-form-item><el-image class="addinputInfo" style="width: 150px;height: 150px"
v-for="(item, index) in formobj.agreementFile" :key="index" :src="item.url"
:preview-src-list="[item.url]" /></el-form-item>
</el-col>
<el-col :span="24">
<div class="span-sty">其他资料</div>
<el-form-item><el-image class="addinputInfo" style="width: 150px;height: 150px"
v-for="(item, index) in formobj.otherFile" :key="index" :src="item.url"
:preview-src-list="[item.url]" /></el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<!-- 选择待办人 的弹出框-->
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%">
<el-form class="formadd">
<el-row v-show="countersignLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="4" class="tleftb">
<span class="icon">*</span>加签人员:
</el-col>
<el-col :span="20">
<el-form-item>
<el-select v-model="countersign.assignee" placeholder="请选择" filterable>
<el-option v-for="item in options" :key="item.userSid" :label="item.staffName" :value="item.userSid">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="4" class="tleftb">
<span>当前环节:</span>
</el-col>
<el-col :span="20">
<el-form-item><span>{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item>
</el-col>
</el-row>
<el-row :class="{rowClass:!currentLink}">
<el-col :span="4" class="tleftb">
<span>意见:</span>
</el-col>
<el-col :span="20">
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw"
type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable></el-input></el-form-item>
</el-col>
</el-row>
<div style="text-align:center;margin-top: 20px;">
<el-button type="primary" size="mini" @click="reject"> </el-button>
<el-button type="info " size="mini" @click="nodeDialogVisible = false"> </el-button>
</div>
</el-form>
</el-dialog>
</div>
</template>
<script>
import req from '@/api/basicinformation/secondaryCooperativeStation'
import {
getCurrentDate
} from '@/utils/index'
import {
selectStaffListss
} from '@/api/Common/dictcommons'
export default {
name: 'SecondaryCooperativeStation',
data() {
return {
viewState: 1,
formobj: {
"sid": "",
"nodeState": "",
"procInstId": "",
"procDefId": "",
"taskId": "",
"nodeId": "",
"useOrgName": "",
"deptName": '',
"deptSid": '',
"createByName": '',
"createBySid": '',
"createOrgSid": '',
"createOrgName": '',
"remarks": "",
"finishTime": "",
"createTime": getCurrentDate(),
"siteName": "",
"legalPerson": "",
"phone": "",
"directorName": "",
"directorPhone": "",
"unifiedCreditCode": "",
"termValidity": "",
"address": "",
"limitedTerm": "",
"creditGranting": "",
"businessLicenseFile": [],
"agreementFile": [],
"otherFile": [],
},
options: [],
operation: '', //
dialogList: {
comment: ''
},
startTask: true,
current: {
taskDefKey: '',
taskName: '' //
},
nextNode: {}, //
nodeDialogVisible: false,
currentLink: true,
countersignLink: false,
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
},
//
countersign: {
taskId: '',
assignee: '',
userSid: '',
instanceId: '',
views: ''
},
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
// this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath')
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
this.current.taskDefKey = obj.taskDefKey
this.current.taskName = obj.taskName
//
this.countersign.taskId = obj.taskId
this.countersign.userSid = window.sessionStorage.getItem('userSid')
this.countersign.instanceId = obj.instanceId
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 400 + 'px'
}
}, '*')
},
methods: {
showInfo(sid) {
req.fetchDetailsBySid(sid).then((res) => {
if (res.success) {
this.formobj = res.data
}
})
selectStaffListss().then((res) => {
if (res.success) {
this.options = res.data
}
})
},
//
openCountersign(val) {
this.operation = val
this.currentLink = true
this.countersignLink = true
this.dialogList.comment = ''
req.getNextNodesForSubmit({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openAgree(val) {
this.operation = val
this.currentLink = true
this.countersignLink = false
this.dialogList.comment = '同意'
req.getNextNodesForSubmit({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openReject(val) {
this.operation = val
this.currentLink = true
this.countersignLink = false
this.dialogList.comment = ''
req.getPreviousNodesForReject({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openStop(val) {
this.operation = val
this.currentLink = false
this.countersignLink = false
this.dialogList.comment = ''
this.nodeDialogVisible = true
},
reject() {
if (this.operation === '同意') {
this.handleAgree()
} else if (this.operation === '驳回') {
if (this.dialogList.comment === '') {
this.$message({
showClose: true,
type: 'error',
message: '请填写审批意见'
})
} else {
this.handleReject()
}
} else if (this.operation === '终止') {
if (this.dialogList.comment === '') {
this.$message({
showClose: true,
type: 'error',
message: '请填写审批意见'
})
} else {
this.handleStop()
}
} else if (this.operation === '加签') {
this.handleCountersign()
}
},
/** 加签 */
handleCountersign() {
if (this.countersign.assignee === '') {
this.$message({
showClose: true,
type: 'error',
message: '请选择加签人员'
})
return
}
if (this.dialogList.comment === '') {
this.$message({
showClose: true,
type: 'error',
message: '请填写审批意见'
})
return
}
this.countersign.views = this.dialogList.comment
req.delegate(this.countersign).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 同意任务 */
handleAgree() {
this.linkByParameter.comment = this.dialogList.comment
req.complete(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 驳回任务 */
handleReject() {
this.linkByParameter.comment = this.dialogList.comment
req.reject(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 终止任务 */
handleStop() {
this.linkByParameter.comment = this.dialogList.comment
req.breakProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
.rowClass {
border-top: 1px solid #E0E3EB;
}
</style>

373
yxt-as-ui/src/views/workFlow/hezuoerjizhanFlow/secondaryCooperativeStationEdit.vue

@ -0,0 +1,373 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">提交</el-button>
</div>
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.remarks" clearable
placeholder="" /></el-form-item>
</el-col>
</el-row>
<div class="title">合作二级站基本信息</div>
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="24">
<div class="span-sty"><span class="icon">*</span>二级站点名称</div>
<el-form-item prop="siteName"><el-input class="addinputInfo addinputw" v-model="formobj.siteName"
clearable placeholder="" /></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="16">
<div class="span-sty"><span class="icon">*</span>法定代表人</div>
<el-form-item prop="legalPerson"><el-input class="addinputInfo addinputw" v-model="formobj.legalPerson"
clearable placeholder="" /></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">手机号码</div>
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.phone" clearable
placeholder="" /></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="16">
<div class="span-sty"><span class="icon">*</span>负责人</div>
<el-form-item prop="directorName"><el-input class="addinputInfo addinputw" v-model="formobj.directorName"
clearable placeholder="" /></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty"><span class="icon">*</span>手机号码</div>
<el-form-item prop="directorPhone"><el-input class="addinputInfo addinputw"
v-model="formobj.directorPhone" clearable placeholder="" /></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="16">
<div class="span-sty"><span class="icon">*</span>统一社会信用号码</div>
<el-form-item prop="unifiedCreditCode"><el-input class="addinputInfo addinputw"
v-model="formobj.unifiedCreditCode" clearable placeholder="" /></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty"><span class="icon">*</span>证件有效期</div>
<el-form-item prop="termValidity"><el-date-picker v-model="formobj.termValidity" value-format="yyyy-MM-dd"
format="yyyy-MM-dd" type="date" class="addinputInfo addinputw"
placeholder="选择日期"></el-date-picker></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty"><span class="icon">*</span>地址</div>
<el-form-item prop="address"><el-input class="addinputInfo addinputw" v-model="formobj.address" clearable
placeholder="" /></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="16">
<div class="span-sty"><span class="icon">*</span>合作有效期至</div>
<el-form-item prop="limitedTerm"><el-date-picker v-model="formobj.limitedTerm" value-format="yyyy-MM-dd"
format="yyyy-MM-dd" type="date" class="addinputInfo addinputw"
placeholder="选择日期"></el-date-picker></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty"><span class="icon">*</span>授信金额</div>
<el-form-item prop="creditGranting"><el-input class="addinputInfo addinputw"
v-model="formobj.creditGranting" clearable placeholder=""
oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" /></el-form-item>
</el-col>
</el-row>
<div class="title">附件清单</div>
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="24">
<div class="span-sty"><span class="icon">*</span>营业执照</div>
<el-form-item prop="businessLicenseFile">
<uploadImg ref="uploadImg" class="addinputInfo" v-model="formobj.businessLicenseFile" :limit="50"
bucket="map" :upload-data="{ type: '0001' }" />
</el-form-item>
</el-col>
<el-col :span="24">
<div class="span-sty"><span class="icon">*</span>合作协议</div>
<el-form-item prop="agreementFile">
<uploadImg ref="uploadImg" class="addinputInfo" v-model="formobj.agreementFile" :limit="50" bucket="map"
:upload-data="{ type: '0001' }" />
</el-form-item>
</el-col>
<el-col :span="24">
<div class="span-sty">其他资料</div>
<el-form-item>
<uploadImg ref="uploadImg" class="addinputInfo" v-model="formobj.otherFile" :limit="50" bucket="map"
:upload-data="{ type: '0001' }" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
</div>
</template>
<script>
import req from '@/api/basicinformation/secondaryCooperativeStation'
import uploadImg from '@/components/uploadFile/uploadImg'
import {
getCurrentDate
} from '@/utils/index'
export default {
name: 'SecondaryCooperativeStationAdd',
components: {
uploadImg
},
data() {
return {
viewTitle: '',
viewState: 1,
submitdisabled: false,
tableKey: 1,
index: 0,
formobj: {
"sid": "",
"nodeState": "",
"procInstId": "",
"procDefId": "",
"taskId": "",
"nodeId": "",
"instanceId": "",
"useOrgName": "",
"deptName": '',
"deptSid": '',
"createByName": '',
"createBySid": '',
"createOrgSid": '',
"createOrgName": '',
"remarks": "",
"finishTime": "",
"createTime": getCurrentDate(),
"siteName": "",
"legalPerson": "",
"phone": "",
"directorName": "",
"directorPhone": "",
"unifiedCreditCode": "",
"termValidity": "",
"address": "",
"limitedTerm": "",
"creditGranting": "",
"businessLicenseFile": [],
"agreementFile": [],
"otherFile": [],
},
rules: {
siteName: [{
required: true,
message: '二级站名称不能为空',
trigger: 'blur'
}],
legalPerson: [{
required: true,
message: '法定代表人不能为空',
trigger: 'blur'
}],
directorName: [{
required: true,
message: '负责人不能为空',
trigger: 'blur'
}],
directorPhone: [{
required: true,
message: '负责人手机号码不能为空',
trigger: 'blur'
}],
directorPhone: [{
required: true,
message: '负责人手机号码不能为空',
trigger: 'blur'
}],
unifiedCreditCode: [{
required: true,
message: '统一社会信用代码不能为空',
trigger: 'blur'
}],
termValidity: [{
required: true,
message: '证件有效期不能为空',
trigger: 'change'
}],
address: [{
required: true,
message: '地址不能为空',
trigger: 'blur'
}],
limitedTerm: [{
required: true,
message: '合作有效期不能为空',
trigger: 'change'
}],
creditGranting: [{
required: true,
message: '授信金额不能为空',
trigger: 'change'
}],
businessLicenseFile: [{
required: true,
message: '营业执照不能为空',
trigger: 'change'
}],
agreementFile: [{
required: true,
message: '合作协议不能为空',
trigger: 'change'
}]
}
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
}
}, '*')
},
methods: {
showInfo(sid) {
this.viewTitle = '【编辑】合作二级站备案申请'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.fetchDetailsBySid(sid).then((res) => {
if (res.success) {
this.formobj = res.data
this.formobj.instanceId = res.data.procInstId
}
})
},
saveOrUpdate() {
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.saveOrUpdate(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '保存成功'
})
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
},
submit() {
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.submit(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '提交成功'
})
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
},
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 120px !important;
width: calc(100% - 115px);
}
/deep/ .el-form-item__error {
margin-left: 120px !important;
}
.titleOne {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
/*表格列设置fixed后固定列出现下边框的设置*/
/deep/ .el-table__fixed {
height: 100% !important;
}
/*表格列设置fixed后固定列出现下边框的设置*/
/deep/ .el-table__fixed-right {
height: 100% !important;
}
</style>

244
yxt-as-ui/src/views/workFlow/hezuoerjizhanFlow/secondaryCooperativeStationYiBan.vue

@ -0,0 +1,244 @@
<template>
<div class="app-container">
<div class="tab-header webtop">
<div>合作二级站备案申请详情</div>
<div>
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button>
</div>
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<div class="title">合作二级站基本信息</div>
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="24">
<div class="span-sty">二级站点名称</div>
<el-form-item><span class="addinputInfo">{{ formobj.siteName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="16">
<div class="span-sty">法定代表人</div>
<el-form-item><span class="addinputInfo">{{ formobj.legalPerson }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">手机号码</div>
<el-form-item><span class="addinputInfo">{{ formobj.phone }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="16">
<div class="span-sty">负责人</div>
<el-form-item><span class="addinputInfo">{{ formobj.directorName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">手机号码</div>
<el-form-item><span class="addinputInfo">{{ formobj.directorPhone }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="16">
<div class="span-sty">统一社会信用号码</div>
<el-form-item><span class="addinputInfo">{{ formobj.unifiedCreditCode }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">证件有效期</div>
<el-form-item><span class="addinputInfo">{{ formobj.termValidity }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">地址</div>
<el-form-item><span class="addinputInfo">{{ formobj.address }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="16">
<div class="span-sty">合作有效期至</div>
<el-form-item><span class="addinputInfo">{{ formobj.limitedTerm }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">授信金额</div>
<el-form-item><span class="addinputInfo">{{ formobj.creditGranting }}</span></el-form-item>
</el-col>
</el-row>
<div class="title">附件清单</div>
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="24">
<div class="span-sty">营业执照</div>
<el-form-item><el-image class="addinputInfo" style="width: 150px;height: 150px"
v-for="(item, index) in formobj.businessLicenseFile" :key="index" :src="item.url"
:preview-src-list="[item.url]" /></el-form-item>
</el-col>
<el-col :span="24">
<div class="span-sty">合作协议</div>
<el-form-item><el-image class="addinputInfo" style="width: 150px;height: 150px"
v-for="(item, index) in formobj.agreementFile" :key="index" :src="item.url"
:preview-src-list="[item.url]" /></el-form-item>
</el-col>
<el-col :span="24">
<div class="span-sty">其他资料</div>
<el-form-item><el-image class="addinputInfo" style="width: 150px;height: 150px"
v-for="(item, index) in formobj.otherFile" :key="index" :src="item.url"
:preview-src-list="[item.url]" /></el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
</template>
<script>
import req from '@/api/basicinformation/secondaryCooperativeStation'
export default {
name: 'SecondaryCooperativeStation',
data() {
return {
viewState: 1,
formobj: {
"sid": "",
"nodeState": "",
"procInstId": "",
"procDefId": "",
"taskId": "",
"nodeId": "",
"useOrgName": "",
"deptName": '',
"deptSid": '',
"createByName": '',
"createBySid": '',
"createOrgSid": '',
"createOrgName": '',
"remarks": "",
"finishTime": "",
"createTime": getCurrentDate(),
"siteName": "",
"legalPerson": "",
"phone": "",
"directorName": "",
"directorPhone": "",
"unifiedCreditCode": "",
"termValidity": "",
"address": "",
"limitedTerm": "",
"creditGranting": "",
"businessLicenseFile": [],
"agreementFile": [],
"otherFile": [],
},
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
}
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 400 + 'px'
}
}, '*')
},
methods: {
showInfo(sid) {
req.fetchDetailsBySid(sid).then((res) => {
if (res.success) {
this.formobj = res.data
}
})
},
/** 确认撤回任务 */
openRevoke() {
this.$confirm('是否确认执行撤回操作', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.handleRevoke()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消撤回'
})
})
},
/** 撤回任务 */
handleRevoke() {
req.revokeProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
</style>

530
yxt-as-ui/src/views/workFlow/oldPartsCopeFlow/oldPartsCopeDaiBan.vue

@ -0,0 +1,530 @@
<template>
<div>
<div class="tab-header webtop">
<!-- 标题 -->
<div>旧件处理申请</div>
<!-- start 添加修改按钮 -->
<div>
<el-button type="primary" size="small" @click="openCountersign('加签')"> </el-button>
<el-button type="primary" size="small" @click="openAgree('同意')"> </el-button>
<el-button type="danger" size="small" @click="openReject('驳回')"> </el-button>
<el-button type="danger" size="small" @click="openStop('终止')"> </el-button>
</div>
<!-- end 添加修改按钮 -->
<!-- end 详情按钮 -->
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">处理原因</div>
<el-form-item><span class="addinputInfo">{{ formobj.handleReasonValue }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">处理方式</div>
<el-form-item><span class="addinputInfo">{{ formobj.handleModeValue }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">收益总额</div>
<el-form-item><span class="addinputInfo">{{ totalQuantity }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">附件</div>
<el-form-item class="trightb_item">
<el-image style="width: 120px;height: 120px; margin: 10px;" class="addinputInfo"
v-for="(item,index) in formobj.filePaths" :src="item" :preview-src-list="[item]">
</el-image>
</el-form-item>
</el-col>
</el-row>
<div class="title">
<div>待处理旧件列表</div>
</div>
<el-table v-loading="listLoading" :data="formobj.asOldparthandleList" border>
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column prop="goodsID" label="商品ID" align="center" />
<el-table-column prop="goodsSpuName" label="商品名称" align="center" />
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" />
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" />
<el-table-column prop="unit" label="单位" align="center" />
<el-table-column prop="manufacturerName" label="厂家" align="center" />
<el-table-column prop="count" label="库存数量" align="center" />
<el-table-column prop="profit" label="收益金额" align="center" />
</el-table>
</el-form>
</div>
<!-- 选择待办人 的弹出框-->
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%">
<el-form class="formadd">
<el-row v-show="countersignLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="4" class="tleftb">
<span class="icon">*</span>加签人员:
</el-col>
<el-col :span="20">
<el-form-item>
<el-select v-model="countersign.assignee" placeholder="请选择" filterable>
<el-option v-for="item in options" :key="item.userSid" :label="item.staffName" :value="item.userSid">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="4" class="tleftb">
<span>当前环节:</span>
</el-col>
<el-col :span="20">
<el-form-item><span>{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item>
</el-col>
</el-row>
<el-row :class="{rowClass:!currentLink}">
<el-col :span="4" class="tleftb">
<span>意见:</span>
</el-col>
<el-col :span="20">
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw"
type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable></el-input></el-form-item>
</el-col>
</el-row>
<div style="text-align:center;margin-top: 20px;">
<el-button type="primary" size="mini" @click="reject"> </el-button>
<el-button type="info " size="mini" @click="nodeDialogVisible = false"> </el-button>
</div>
</el-form>
</el-dialog>
</div>
</template>
<script>
import req from '@/api/storage/oldPartsCope.js'
import {
selectStaffListss
} from '@/api/Common/dictcommons'
export default {
data() {
return {
listLoading: false,
submitdisabled: false,
formobj: {
"sid": "",
"remarks": "",
"createBySid": "",
"createByName": "",
"createDeptSid": "",
"createDeptName": "",
"createTime": "",
"billNo": "",
"filePaths": [],
"useOrgSid": "",
"useOrgName": "",
"orgSidPath": "",
"procDefId": "",
"nodeId": "",
"procInstId": "",
"nodeState": "",
"taskId": "",
"finishTime": "",
"totalProfit": "",
"asOldparthandleList": [
]
},
hideUploadBtn: false,
imgList: [],
options: [],
operation: '', //
dialogList: {
comment: ''
},
startTask: true,
current: {
taskDefKey: '',
taskName: '' //
},
nextNode: {}, //
nodeDialogVisible: false,
currentLink: true,
countersignLink: false,
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
},
//
countersign: {
taskId: '',
assignee: '',
userSid: '',
instanceId: '',
views: ''
},
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
// this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath')
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
this.current.taskDefKey = obj.taskDefKey
this.current.taskName = obj.taskName
//
this.countersign.taskId = obj.taskId
this.countersign.userSid = window.sessionStorage.getItem('userSid')
this.countersign.instanceId = obj.instanceId
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
}
}, '*')
},
computed: {
//
totalQuantity() {
let quantity = 0
if (this.formobj.asOldparthandleList.length > 0) {
this.formobj.asOldparthandleList.forEach((e) => {
quantity += Number(e.profit)
})
}
this.formobj.totalProfit = quantity
return quantity
},
},
methods: {
indexMethod(index) {
return Number(index) + 1
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.imgList = []
this.formobj = {
"sid": "",
"remarks": "",
"createBySid": "",
"createByName": "",
"createDeptSid": "",
"createDeptName": "",
"createTime": "",
"billNo": "",
"filePaths": [],
"useOrgSid": "",
"useOrgName": "",
"orgSidPath": "",
"procDefId": "",
"nodeId": "",
"procInstId": "",
"nodeState": "",
"taskId": "",
"finishTime": "",
"totalProfit": "",
"asOldparthandleList": []
}
this.$emit('doback')
},
showInfo(sid) {
req.init(sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
for (var i = 0; i < resp.data.filePaths.length; i++) {
this.imgList.push({
url: resp.data.filePaths[i].url
})
}
selectStaffListss().then((res) => {
if (res.success) {
this.options = res.data
}
})
}
})
.catch(e => {
this.formobj = {}
})
},
//
openCountersign(val) {
this.operation = val
this.currentLink = true
this.countersignLink = true
this.dialogList.comment = ''
req.getNextNodesForSubmit({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openAgree(val) {
this.operation = val
this.currentLink = true
this.countersignLink = false
this.dialogList.comment = '同意'
req.getNextNodesForSubmit({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openReject(val) {
this.operation = val
this.currentLink = true
this.countersignLink = false
this.dialogList.comment = ''
req.getPreviousNodesForReject({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openStop(val) {
this.operation = val
this.currentLink = false
this.countersignLink = false
this.dialogList.comment = ''
this.nodeDialogVisible = true
},
reject() {
if (this.operation === '同意') {
this.handleAgree()
} else if (this.operation === '驳回') {
if (this.dialogList.comment === '') {
this.$message({
showClose: true,
type: 'error',
message: '请填写审批意见'
})
} else {
this.handleReject()
}
} else if (this.operation === '终止') {
if (this.dialogList.comment === '') {
this.$message({
showClose: true,
type: 'error',
message: '请填写审批意见'
})
} else {
this.handleStop()
}
} else if (this.operation === '加签') {
this.handleCountersign()
}
},
/** 加签 */
handleCountersign() {
if (this.countersign.assignee === '') {
this.$message({
showClose: true,
type: 'error',
message: '请选择加签人员'
})
return
}
if (this.dialogList.comment === '') {
this.$message({
showClose: true,
type: 'error',
message: '请填写审批意见'
})
return
}
this.countersign.views = this.dialogList.comment
req.delegate(this.countersign).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 同意任务 */
handleAgree() {
this.linkByParameter.comment = this.dialogList.comment
req.complete(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 驳回任务 */
handleReject() {
this.linkByParameter.comment = this.dialogList.comment
req.reject(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 终止任务 */
handleStop() {
this.linkByParameter.comment = this.dialogList.comment
req.breakProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
.rowClass {
border-top: 1px solid #E0E3EB;
}
</style>

649
yxt-as-ui/src/views/workFlow/oldPartsCopeFlow/oldPartsCopeEdit.vue

@ -0,0 +1,649 @@
<template>
<div>
<div class="tab-header webtop">
<!-- 标题 -->
<div>{{title}}旧件处理申请</div>
<!-- start 添加修改按钮 -->
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">提交</el-button>
</div>
<!-- end 添加修改按钮 -->
<!-- end 详情按钮 -->
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<div class="title">
<div>基础信息</div>
</div>
<el-row class="first_row">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<!-- <el-col :span="12">
<div class="span-sty">单据编号</div>
<el-form-item><span class="addinputInfo">{{ formobj.billNo }}</span></el-form-item>
</el-col> -->
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createTime }}</span>
<!-- <el-date-picker v-model="formobj.createTime" class="addinputw addinputInfo" type="date"
value-format="yyyy-MM-dd" placeholder="选择日期">
</el-date-picker> -->
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 处理原因</div>
<el-form-item prop="handleReasonValue">
<el-select v-model="formobj.handleReasonValue" placeholder="请选择" class="addinputw addinputInfo"
@change="selectHandleReason">
<el-option v-for="(item,i) in handleReasonList" :key="i" :label="item.name" :value="item.sid">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 处理方式</div>
<el-form-item prop="handleModeValue">
<el-select v-model="formobj.handleModeValue" placeholder="请选择" class="addinputw addinputInfo"
@change="selectHandleMode">
<el-option v-for="(item,i) in handleModeList" :key="i" :label="item.name" :value="item.sid">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">收益总额</div>
<el-form-item><span class="addinputInfo">{{ totalQuantity }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item>
<el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" type="textarea"
:rows="4" clearable />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty"><span class="must">*</span> 附件</div>
<el-form-item prop="imgList">
<upload-img ref="uploadImg" class="addinputw" v-model="imgList" :limit="50" bucket="map"
:upload-data="{ type: '0001' }" @change="backData" />
</el-form-item>
</el-col>
</el-row>
<div class="title titleOne">
<div>商品列表</div>
<el-button type="primary" size="mini" @click="importDetail()">选择旧件</el-button>
</div>
<el-table v-loading="listLoading" :data="formobj.asOldparthandleList" border>
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column fixed label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="deleteAsOldparthandle(scope.row)">删除</el-button>
</template>
</el-table-column>
<!-- <el-table-column align="center" width="100" :render-header="commodityHeader">
<template slot-scope="scope">
<i class="el-icon-delete" @click="commodityDelete(scope.$index)"></i>
</template>
</el-table-column>
<el-table-column label="商品名称" align="center" min-width="200">
<template slot-scope="scope">
<el-popover placement="right" width="900" trigger="click">
<div>
<el-table :data="commodityData" v-loading="commodityLoading" highlight-current-row
@current-change="commodityCurrentChange($event, scope.row)">
<el-table-column fixed prop="goodsSpuName" label="商品名称" align="center" />
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" />
<el-table-column prop="goodsSkuOwnSpec" label="厂家" align="center" />
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" />
<el-table-column prop="unit" label="单位" align="center" />
</el-table>
<el-pagination :page.sync="commodityQuery.current" :page-size="commodityQuery.size"
layout="total, pager" :total="commodityQuery.total" />
</div>
<el-input slot="reference" v-model="scope.row.goodsSkuName"
@input="commodityInput(scope.row.goodsSkuName)" clearable placeholder="商品名称" />
</el-popover>
</template>
</el-table-column> -->
<!-- <el-table-column prop="vinNo" label="车架号" align="center" /> -->
<el-table-column prop="goodsID" label="商品ID" align="center" />
<el-table-column prop="goodsSpuName" label="商品名称" align="center" />
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" />
<el-table-column prop="manufacturerName" label="厂家" align="center" />
<!-- <el-table-column prop="supplierName" label="供应商" align="center" /> -->
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" />
<el-table-column prop="unit" label="单位" align="center" />
<el-table-column prop="warehouseName" label="仓库" align="center" />
<el-table-column prop="warehouseRackCode" label="库位" align="center" />
<el-table-column label="数量" align="center" width="180">
<template slot-scope="scope">
<el-input ref="focusAssumptionInput" v-model="scope.row.count" clearable placeholder=""
@input="commodityComputeYHAndXSJE(scope.row)" oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
</template>
</el-table-column>
<el-table-column prop="profit" label="收益金额" align="center" />
</el-table>
</el-form>
</div>
<el-dialog title="选择旧件商品" :visible.sync="dialogVisible" :before-close="handleClose"
style="width:150%;margin-left: -20%;">
<el-form :inline="true" class="tab-header" style="margin-top: -30px;">
<el-form-item label="商品ID">
<el-input v-model="queryParams.params.goodsId" placeholder="" clearable />
</el-form-item>
<el-form-item label="商品名称">
<el-input v-model="queryParams.params.goodsName" placeholder="" clearable />
</el-form-item>
<el-form-item label="商品编码">
<el-input v-model="queryParams.params.goodsSkuCode" placeholder="" clearable />
</el-form-item>
<!-- <el-form-item label="仓库">
<el-input v-model="queryParams.params.warehouseName" placeholder="" clearable />
</el-form-item>
<el-form-item label="库位">
<el-input v-model="queryParams.params.warehouseRackCode" placeholder="" clearable />
</el-form-item>
<el-form-item label="供应商">
<el-input v-model="queryParams.params.supplierName" placeholder="" clearable />
</el-form-item> -->
<el-form-item label="厂家">
<el-input v-model="queryParams.params.manufacturerName" placeholder="" clearable />
</el-form-item>
</el-form>
<div class="btn" style="text-align: center; margin-top: 20px;">
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</div>
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%;margin-top: 20px;"
@selection-change="selectionLineChangeHandle">
<el-table-column fixed width="50" type="selection" align="center" />
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column prop="goodsID" label="商品ID" align="center" />
<el-table-column prop="goodsSpuName" label="商品名称" align="center" />
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" />
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" />
<el-table-column prop="unit" label="单位" align="center" />
<el-table-column prop="manufacturerName" label="厂家" align="center" />
<el-table-column prop="vinNo" label="车架号" align="center" />
<el-table-column prop="sourceBillNo" label="维修单号" align="center" />
<!-- <el-table-column prop="warehouseName" label="仓库" align="center" />
<el-table-column prop="warehouseRackCode" label="库位" align="center" />
<el-table-column prop="supplierName" label="供应商" align="center" /> -->
<!-- <el-table-column prop="price" label="单价" align="center" /> -->
<el-table-column prop="count" label="库存数量" align="center" />
</el-table>
<div class="pages">
<div class="tit" />
<!-- 翻页 -->
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current"
:limit.sync="queryParams.size" class="pagination" @pagination="importDetail" />
</div>
<div class="btn" style="text-align: center; margin-top: 20px;">
<el-button type="primary" size="mini" @click="addDialogList()">确认</el-button>
<el-button type="primary" size="mini" @click="handleClose()">关闭</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import req from '@/api/storage/oldPartsCope.js'
import uploadImg from '@/components/uploadFile/uploadImg'
import {
getOrgSidByPath
} from '@/api/Common/dictcommons'
import {
getCurrentDate
} from '@/utils/index.js'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
export default {
components: {
Pagination,
pageye,
uploadImg
},
data() {
return {
dialogVisible: false,
title: '【新增】',
orderInfo: {},
tableLoading: false,
loadList: false,
listLoading: false,
submitdisabled: false,
formobj: {
"sid": "",
"remarks": "",
"createBySid": '',
"createByName": '',
"deptSid": '',
"deptName": '',
"createTime": getCurrentDate(),
"billNo": "",
"filePaths": [],
"useOrgSid": '',
"useOrgName": '',
"procDefId": "",
"nodeId": "",
"procInstId": "",
"nodeState": "",
"taskId": "",
"finishTime": "",
"totalProfit": "",
"asOldparthandleList": [
]
},
hideUploadBtn: false,
imgList: [],
handleModeList: [{
name: '处理方式1',
sid: "1"
},
{
name: '处理方式2',
sid: "2"
}
],
handleReasonList: [{
name: '处理原因1',
sid: "1"
},
{
name: '处理原因2',
sid: "2"
}
],
selectionList: [],
queryParams: {
current: 1,
size: 10,
total: 0,
params: {
"goodsName": "",
"goodsSkuCode": "",
"warehouseName": "",
"warehouseRackCode": "",
"supplierName": "",
}
},
dataList: [],
rules: {
// createTime: [{
// required: true,
// message: '',
// trigger: 'change'
// }],
handleReasonValue: [{
required: true,
message: '处理原因不能为空',
trigger: 'change'
}],
handleModeValue: [{
required: true,
message: '处理方式不能为空',
trigger: 'change'
}],
filePaths: [{
required: true,
message: '附件不能为空',
trigger: 'blur'
}],
},
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
}
}, '*')
},
computed: {
//
totalQuantity() {
let quantity = 0
if (this.formobj.asOldparthandleList.length > 0) {
this.formobj.asOldparthandleList.forEach((e) => {
quantity += Number(e.profit)
})
}
this.formobj.totalProfit = quantity
return quantity
},
},
methods: {
selectHandleReason(val) {
console.log('>>>>>>>>>selectHandleReason', val)
const choose = this.handleReasonList.filter((item) => item.sid == val)
console.log('>>>>>>>>>selectHandleReason', choose)
this.formobj.handleReasonValue = choose[0].name
this.formobj.handleReasonKey = choose[0].sid
},
selectHandleMode(val) {
const choose = this.handleModeList.filter((item) => item.sid == val)
console.log('>>>>>>>>>selectHandleMode', choose)
this.formobj.handleModeValue = choose[0].name
this.formobj.handleModeKey = choose[0].sid
},
indexMethod(index) {
return Number(index) + 1
},
dosearch() {
this.queryParams.current = 1
this.importDetail()
},
resetQuery() {
this.queryParams = {
current: 1,
size: 10,
total: 0,
params: {
"goodsName": "",
"goodsSkuCode": "",
"warehouseName": "",
"warehouseRackCode": "",
"supplierName": "",
}
}
this.importDetail()
},
importDetail() {
this.tableLoading = true
this.queryParams.params.userSid = window.sessionStorage.getItem('userSid')
this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
this.queryParams.params.menuUrl = this.$route.path
req.handleGoodsListPage(this.queryParams).then((resp) => {
this.tableLoading = false
this.dialogVisible = true
if (resp.success) {
const data = resp.data
this.queryParams.total = data.total
this.dataList = data.records
} else {
// resp.code
this.dataList = []
this.queryParams.total = 0
}
}).catch(() => {
this.tableLoading = false
})
},
selectionLineChangeHandle(val) {
this.selectionList = val
},
addDialogList() {
for (var i = 0; i < this.selectionList.length; i++) {
var item = {
count: this.selectionList[i].count,
goodsSkuCode: this.selectionList[i].goodsSkuCode,
goodsID: this.selectionList[i].goodsID,
goodsSpuSid: this.selectionList[i].goodsSpuSid,
goodsSkuSid: this.selectionList[i].goodsSkuSid,
goodsSpuName: this.selectionList[i].goodsSpuName,
goodsSkuTitle: this.selectionList[i].goodsSkuTitle,
goodsSkuOwnSpec: this.selectionList[i].goodsSkuOwnSpec,
mainSid: '',
sid: '',
supplierName: this.selectionList[i].supplierName,
unit: this.selectionList[i].unit,
vinNo: this.selectionList[i].vinNo,
warehouseName: this.selectionList[i].warehouseName,
warehouseRackCode: this.selectionList[i].warehouseRackCode,
warehouseRackSid: this.selectionList[i].warehouseRackSid,
warehouseSid: this.selectionList[i].warehouseSid,
price: this.selectionList[i].price,
sourceBillNo: this.selectionList[i].sourceBillNo,
manufacturerSid: this.selectionList[i].manufacturerSid,
manufacturerName: this.selectionList[i].manufacturerName,
supplierSid: this.selectionList[i].supplierSid,
supplierName: this.selectionList[i].supplierName,
profit: (Number(this.selectionList[i].count) * Number(this.selectionList[i].price)).toFixed(2)
}
this.formobj.asOldparthandleList.push(item)
}
this.dialogVisible = false
},
handleClose() {
this.dialogVisible = false
},
deleteAsOldparthandle(row) {
const index = this.formobj.asOldparthandleList.findIndex((item) => item === row)
console.log("index》》》》", index)
this.formobj.asOldparthandleList.splice(index, 1)
},
saveOrUpdate() {
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.save(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '保存成功'
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
},
submit() {
if (this.formobj.asOldparthandleList.length == 0) {
this.$message({
showClose: true,
type: 'warning',
message: '旧件申请列表不能为空'
})
return
}
for (var i = 0; i < this.formobj.asOldparthandleList.length; i++) {
if (Number(this.formobj.asOldparthandleList[i].count) == 0) {
this.$message({
showClose: true,
type: 'warning',
message: '旧件数量不能为空'
})
return
}
}
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.submit(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '保存成功'
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
},
showAdd() {
this.title = "【新增】"
this.isUpdata = false
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
},
showInfo(sid) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.title = "【修改】"
this.isUpdata = true
req.init(sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
for (var i = 0; i < resp.data.filePaths.length; i++) {
this.imgList.push({
url: resp.data.filePaths[i].url
})
}
}
})
.catch(e => {
this.formobj = {}
})
},
backData(value) {
console.log('backData》》》》', value)
console.log('imgList', this.imgList)
for (var i = 0; i < this.imgList.length; i++) {
this.formobj.filePaths.push(this.imgList[i].url)
}
},
commodityComputeYHAndXSJE(row) {
console.log('commodityComputeYHAndXSJE》》》》', row)
row.profit = (Number(row.count) * Number(row.price)).toFixed(2)
}
}
}
</script>
<style scoped>
/deep/ .el-form-item__error {
margin-left: 120px !important;
}
.must {
color: #f00;
}
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 120px !important;
width: calc(100% - 115px);
}
.first_row {
border-top: 1px solid #E0E3EB;
}
.titleOne {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
</style>

302
yxt-as-ui/src/views/workFlow/oldPartsCopeFlow/oldPartsCopeYiBan.vue

@ -0,0 +1,302 @@
<template>
<div>
<div class="tab-header webtop">
<!-- 标题 -->
<div>旧件处理申请</div>
<!-- start 添加修改按钮 -->
<div>
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button>
</div>
<!-- end 添加修改按钮 -->
<!-- end 详情按钮 -->
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" class="formaddcopy02">
<div class="title">
<div>基础信息</div>
</div>
<el-row class="first_row">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<!-- <el-col :span="12">
<div class="span-sty">单据编号</div>
<el-form-item><span class="addinputInfo">{{ formobj.billNo }}</span></el-form-item>
</el-col> -->
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">处理原因</div>
<el-form-item><span class="addinputInfo">{{ formobj.handleReasonValue }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">处理方式</div>
<el-form-item><span class="addinputInfo">{{ formobj.handleModeValue }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">收益总额</div>
<el-form-item><span class="addinputInfo">{{ totalQuantity }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">附件</div>
<el-form-item class="trightb_item">
<el-image style="width: 120px;height: 120px; margin: 10px;" class="addinputInfo"
v-for="(item,index) in formobj.filePaths" :src="item" :preview-src-list="[item]">
</el-image>
</el-form-item>
</el-col>
</el-row>
<div class="title">
<div>待处理旧件列表</div>
</div>
<el-table v-loading="listLoading" :data="formobj.asOldparthandleList" border>
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
<!-- <el-table-column prop="vinNo" label="车架号" align="center" /> -->
<el-table-column prop="goodsID" label="商品ID" align="center" />
<el-table-column prop="goodsSpuName" label="商品名称" align="center" />
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" />
<!-- <el-table-column prop="supplierName" label="供应商" align="center" /> -->
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" />
<el-table-column prop="unit" label="单位" align="center" />
<el-table-column prop="manufacturerName" label="厂家" align="center" />
<!-- <el-table-column prop="vinNo" label="车架号" align="center" /> -->
<!-- <el-table-column prop="sourceBillNo" label="维修单号" align="center" /> -->
<!-- <el-table-column prop="warehouseName" label="仓库" align="center" />
<el-table-column prop="warehouseRackCode" label="库位" align="center" />
<el-table-column prop="supplierName" label="供应商" align="center" /> -->
<!-- <el-table-column prop="price" label="单价" align="center" /> -->
<el-table-column prop="count" label="库存数量" align="center" />
<el-table-column prop="profit" label="收益金额" align="center" />
</el-table>
</el-form>
</div>
</div>
</template>
<script>
import req from '@/api/storage/oldPartsCope.js'
export default {
data() {
return {
listLoading: false,
submitdisabled: false,
formobj: {
"sid": "",
"remarks": "",
"createBySid": "",
"createByName": "",
"createDeptSid": "",
"createDeptName": "",
"createTime": "",
"billNo": "",
"filePaths": [],
"useOrgSid": "",
"useOrgName": "",
"orgSidPath": "",
"procDefId": "",
"nodeId": "",
"procInstId": "",
"nodeState": "",
"taskId": "",
"finishTime": "",
"totalProfit": "",
"asOldparthandleList": [
]
},
hideUploadBtn: false,
imgList: [],
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
}
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
}
}, '*')
},
computed: {
//
totalQuantity() {
let quantity = 0
if (this.formobj.asOldparthandleList.length > 0) {
this.formobj.asOldparthandleList.forEach((e) => {
quantity += Number(e.profit)
})
}
this.formobj.totalProfit = quantity
return quantity
},
},
methods: {
indexMethod(index) {
return Number(index) + 1
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.imgList = []
this.formobj = {
"sid": "",
"remarks": "",
"createBySid": "",
"createByName": "",
"createDeptSid": "",
"createDeptName": "",
"createTime": "",
"billNo": "",
"filePaths": [],
"useOrgSid": "",
"useOrgName": "",
"orgSidPath": "",
"procDefId": "",
"nodeId": "",
"procInstId": "",
"nodeState": "",
"taskId": "",
"finishTime": "",
"totalProfit": "",
"asOldparthandleList": []
}
this.$emit('doback')
},
showAdd() {},
showInfo(sid) {
var params = {
sid: row.sid
}
req.init(sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
for (var i = 0; i < resp.data.filePaths.length; i++) {
this.imgList.push({
url: resp.data.filePaths[i].url
})
}
}
})
.catch(e => {
this.formobj = {}
})
},
/** 确认撤回任务 */
openRevoke() {
this.$confirm('是否确认执行撤回操作', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.handleRevoke()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消撤回'
})
})
},
/** 撤回任务 */
handleRevoke() {
req.revokeProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
</style>

686
yxt-as-ui/src/views/workFlow/oldPartsFactoryFlow/oldPartsFactoryDaiBan.vue

@ -13,18 +13,18 @@
<div class="">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.createDeptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.createDeptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
@ -34,38 +34,38 @@
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">附件</div>
<el-form-item class="trightb_item">
<el-image style="width: 120px;height: 120px; margin: 10px;" class="addinputInfo"
v-for="(item,index) in formobj.filePaths" :src="item" :preview-src-list="[item]">
</el-image>
</el-form-item>
</el-col>
<el-col :span="24">
<div class="span-sty">附件</div>
<el-form-item class="trightb_item">
<el-image style="width: 120px;height: 120px; margin: 10px;" class="addinputInfo"
v-for="(item,index) in formobj.filePaths" :src="item" :preview-src-list="[item]">
</el-image>
</el-form-item>
</el-col>
</el-row>
<div class="title"
style="display: flex;align-items: center;justify-content: space-between;height:40px;margin-top: 10px;">
<div>商品列表</div>
</div>
<el-table v-loading="listLoading" :data="formobj.asOldpartreturnList" border style="width: 100%;"
:row-style="{height: '40px'}">
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column label="商品名称" prop="goodsSkuName" align="center" />
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" />
<el-table-column label="厂家" prop="manufacturerName" align="center" />
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" />
<el-table-column label="单位" prop="unit" align="center" />
<el-table-column label="需返厂数量" prop="needReturnCount" align="center" />
<el-table-column label="实际返厂数量" prop="actualReturnCount" align="center" />
<el-table-column label="差异说明" prop="remarks" align="center" />
</el-table>
<div class="title"
style="display: flex;align-items: center;justify-content: space-between;height:40px;margin-top: 10px;">
<div>商品列表</div>
</div>
<el-table v-loading="listLoading" :data="formobj.asOldpartreturnList" border style="width: 100%;"
:row-style="{height: '40px'}">
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column label="商品名称" prop="goodsSkuName" align="center" />
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" />
<el-table-column label="厂家" prop="manufacturerName" align="center" />
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" />
<el-table-column label="单位" prop="unit" align="center" />
<el-table-column label="需返厂数量" prop="needReturnCount" align="center" />
<el-table-column label="实际返厂数量" prop="actualReturnCount" align="center" />
<el-table-column label="差异说明" prop="remarks" align="center" />
</el-table>
</el-form>
</div>
</div>
<!-- 选择待办人 的弹出框-->
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%">
<el-form class="formadd" >
<el-form class="formadd">
<el-row v-show="countersignLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="4" class="tleftb">
<span class="icon">*</span>加签人员:
@ -92,7 +92,8 @@
<span>意见:</span>
</el-col>
<el-col :span="20">
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw" type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable ></el-input></el-form-item>
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw"
type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable></el-input></el-form-item>
</el-col>
</el-row>
<div style="text-align:center;margin-top: 20px;">
@ -105,312 +106,339 @@
</template>
<script>
import req from '@/api/storage/oldPartsFactory'
import { selectStaffListss } from '@/api/Common/dictcommons'
export default {
name: 'WorkSLRSettlementDaiBan',
data() {
return {
viewTitle: '',
viewState: 1,
submitdisabled: false,
tableKey: 0,
index: 0,
formobj: {
"sid": "",
"remarks": "",
"createBySid": window.sessionStorage.getItem('userSid'),
"createByName": window.sessionStorage.getItem('name'),
"deptSid": window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage
.getItem('defaultOrgPath').lastIndexOf('/') + 1),
"deptName": window.sessionStorage.getItem('defaultOrgPathName').substring(window
.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1),
"createTime": "",
"billNo": "",
"filePaths": [],
"useOrgSid": '',
"useOrgName": '',
"orgSidPath": window.sessionStorage.getItem('orgSidPath'),
"procDefId": "",
"nodeId": "",
"procInstId": "",
"nodeState": "",
"taskId": "",
"finishTime": "",
"asOldpartreturnList": [
import req from '@/api/storage/oldPartsFactory'
import {
selectStaffListss
} from '@/api/Common/dictcommons'
]
},
rules: {},
options: [],
operation: '', //
dialogList: {
comment: ''
},
startTask: true,
current: {
taskDefKey: '',
taskName: '' //
},
nextNode: {}, //
nodeDialogVisible: false,
currentLink: true,
countersignLink: false,
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
},
//
countersign: {
taskId: '',
assignee: '',
userSid: '',
instanceId: '',
views: ''
}
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
// this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath')
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
this.current.taskDefKey = obj.taskDefKey
this.current.taskName = obj.taskName
//
this.countersign.taskId = obj.taskId
this.countersign.userSid = window.sessionStorage.getItem('userSid')
this.countersign.instanceId = obj.instanceId
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
}
}, '*')
},
export default {
name: 'WorkSLRSettlementDaiBan',
data() {
return {
viewTitle: '',
viewState: 1,
submitdisabled: false,
tableKey: 0,
index: 0,
formobj: {
"sid": "",
"remarks": "",
"createBySid": '',
"createByName": '',
"deptSid": '',
"deptName": '',
"createTime": "",
"billNo": "",
"filePaths": [],
"useOrgSid": '',
"useOrgName": '',
"orgSidPath": '',
"procDefId": "",
"nodeId": "",
"procInstId": "",
"nodeState": "",
"taskId": "",
"finishTime": "",
"asOldpartreturnList": [
methods: {
showInfo(sid) {
this.viewTitle = '旧件返厂申请详情'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.fetchBySid(sid).then((res) => {
if (res.success) {
this.formobj = res.data
}
})
selectStaffListss().then((res) => {
if (res.success) {
this.options = res.data
}
})
},
//
openCountersign(val) {
this.operation = val
this.currentLink = true
this.countersignLink = true
this.dialogList.comment = ''
req.getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey, businessSid: this.linkByParameter.businessSid }).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
]
},
rules: {},
options: [],
operation: '', //
dialogList: {
comment: ''
},
startTask: true,
current: {
taskDefKey: '',
taskName: '' //
},
nextNode: {}, //
nodeDialogVisible: false,
currentLink: true,
countersignLink: false,
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
},
//
countersign: {
taskId: '',
assignee: '',
userSid: '',
instanceId: '',
views: ''
}
this.submitdisabled = false
})
},
//
openAgree(val) {
this.operation = val
this.currentLink = true
this.countersignLink = false
this.dialogList.comment = '同意'
req.getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey, businessSid: this.linkByParameter.businessSid }).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openReject(val) {
this.operation = val
this.currentLink = true
this.countersignLink = false
this.dialogList.comment = ''
req.getPreviousNodesForReject({ taskDefKey: this.current.taskDefKey, businessSid: this.linkByParameter.businessSid }).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openStop(val) {
this.operation = val
this.currentLink = false
this.countersignLink = false
this.dialogList.comment = ''
this.nodeDialogVisible = true
},
reject() {
if (this.operation === '同意') {
this.handleAgree()
} else if (this.operation === '驳回') {
if (this.dialogList.comment === '') {
this.$message({ showClose: true, type: 'error', message: '请填写审批意见' })
} else {
this.handleReject()
}
} else if (this.operation === '终止') {
if (this.dialogList.comment === '') {
this.$message({ showClose: true, type: 'error', message: '请填写审批意见' })
} else {
this.handleStop()
}
} else if (this.operation === '加签') {
this.handleCountersign()
}
},
/** 加签 */
handleCountersign() {
if (this.countersign.assignee === '') {
this.$message({ showClose: true, type: 'error', message: '请选择加签人员' })
return
}
if (this.dialogList.comment === '') {
this.$message({ showClose: true, type: 'error', message: '请填写审批意见' })
return
}
this.countersign.views = this.dialogList.comment
req.delegate(this.countersign).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
// this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath')
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
this.current.taskDefKey = obj.taskDefKey
this.current.taskName = obj.taskName
//
this.countersign.taskId = obj.taskId
this.countersign.userSid = window.sessionStorage.getItem('userSid')
this.countersign.instanceId = obj.instanceId
//
this.showInfo(obj.businessSid)
},
/** 同意任务 */
handleAgree() {
this.linkByParameter.comment = this.dialogList.comment
req.complete(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
}
})
}, '*')
},
/** 驳回任务 */
handleReject() {
this.linkByParameter.comment = this.dialogList.comment
req.reject(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
methods: {
showInfo(sid) {
this.viewTitle = '旧件返厂申请详情'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.fetchBySid(sid).then((res) => {
if (res.success) {
this.formobj = res.data
}
})
selectStaffListss().then((res) => {
if (res.success) {
this.options = res.data
}
})
},
//
openCountersign(val) {
this.operation = val
this.currentLink = true
this.countersignLink = true
this.dialogList.comment = ''
req.getNextNodesForSubmit({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openAgree(val) {
this.operation = val
this.currentLink = true
this.countersignLink = false
this.dialogList.comment = '同意'
req.getNextNodesForSubmit({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openReject(val) {
this.operation = val
this.currentLink = true
this.countersignLink = false
this.dialogList.comment = ''
req.getPreviousNodesForReject({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openStop(val) {
this.operation = val
this.currentLink = false
this.countersignLink = false
this.dialogList.comment = ''
this.nodeDialogVisible = true
},
reject() {
if (this.operation === '同意') {
this.handleAgree()
} else if (this.operation === '驳回') {
if (this.dialogList.comment === '') {
this.$message({
showClose: true,
type: 'error',
message: '请填写审批意见'
})
} else {
this.handleReject()
}
} else if (this.operation === '终止') {
if (this.dialogList.comment === '') {
this.$message({
showClose: true,
type: 'error',
message: '请填写审批意见'
})
} else {
this.handleStop()
}
} else if (this.operation === '加签') {
this.handleCountersign()
}
},
/** 加签 */
handleCountersign() {
if (this.countersign.assignee === '') {
this.$message({
showClose: true,
type: 'error',
message: '请选择加签人员'
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
return
}
})
},
/** 终止任务 */
handleStop() {
this.linkByParameter.comment = this.dialogList.comment
req.breakProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
if (this.dialogList.comment === '') {
this.$message({
showClose: true,
type: 'error',
message: '请填写审批意见'
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
return
}
})
this.countersign.views = this.dialogList.comment
req.delegate(this.countersign).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 同意任务 */
handleAgree() {
this.linkByParameter.comment = this.dialogList.comment
req.complete(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 驳回任务 */
handleReject() {
this.linkByParameter.comment = this.dialogList.comment
req.reject(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 终止任务 */
handleStop() {
this.linkByParameter.comment = this.dialogList.comment
req.breakProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
}
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
.rowClass{
border-top: 1px solid #E0E3EB;
}
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
.rowClass {
border-top: 1px solid #E0E3EB;
}
</style>

14
yxt-as-ui/src/views/workFlow/oldPartsFactoryFlow/oldPartsFactoryEdit.vue

@ -65,7 +65,7 @@
</template>
<script>
import req from '@/api/storage/oldPartsFactory'
import req from '@/api/storage/oldPartsFactory'
export default {
name: 'WorkSLRSettlementEdit',
@ -83,18 +83,16 @@ import req from '@/api/storage/oldPartsFactory'
formobj: {
"sid": "",
"remarks": "",
"createBySid": window.sessionStorage.getItem('userSid'),
"createByName": window.sessionStorage.getItem('name'),
"deptSid": window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage
.getItem('defaultOrgPath').lastIndexOf('/') + 1),
"deptName": window.sessionStorage.getItem('defaultOrgPathName').substring(window
.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1),
"createBySid": '',
"createByName": '',
"deptSid": '',
"deptName": '',
"createTime": "",
"billNo": "",
"filePaths": [],
"useOrgSid": '',
"useOrgName": '',
"orgSidPath": window.sessionStorage.getItem('orgSidPath'),
"orgSidPath": '',
"procDefId": "",
"nodeId": "",
"procInstId": "",

367
yxt-as-ui/src/views/workFlow/oldPartsFactoryFlow/oldPartsFactoryYiBan.vue

@ -8,208 +8,207 @@
</div>
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.createDeptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col>
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputInfo">{{ formobj.createDeptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">附件</div>
<el-form-item class="trightb_item">
<el-image style="width: 120px;height: 120px; margin: 10px;" class="addinputInfo"
v-for="(item,index) in formobj.filePaths" :src="item" :preview-src-list="[item]">
</el-image>
</el-form-item>
</el-col>
</el-row>
<div class="title"
style="display: flex;align-items: center;justify-content: space-between;height:40px;margin-top: 10px;">
<div>商品列表</div>
</div>
<el-table v-loading="listLoading" :data="formobj.asOldpartreturnList" border style="width: 100%;"
:row-style="{height: '40px'}">
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column label="商品名称" prop="goodsSkuName" align="center" />
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" />
<el-table-column label="厂家" prop="manufacturerName" align="center" />
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" />
<el-table-column label="单位" prop="unit" align="center" />
<el-table-column label="需返厂数量" prop="needReturnCount" align="center" />
<el-table-column label="实际返厂数量" prop="actualReturnCount" align="center" />
<el-table-column label="差异说明" prop="remarks" align="center" />
</el-table>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">附件</div>
<el-form-item class="trightb_item">
<el-image style="width: 120px;height: 120px; margin: 10px;" class="addinputInfo"
v-for="(item,index) in formobj.filePaths" :src="item" :preview-src-list="[item]">
</el-image>
</el-form-item>
</el-col>
</el-row>
<div class="title"
style="display: flex;align-items: center;justify-content: space-between;height:40px;margin-top: 10px;">
<div>商品列表</div>
</div>
<el-table v-loading="listLoading" :data="formobj.asOldpartreturnList" border style="width: 100%;"
:row-style="{height: '40px'}">
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column label="商品名称" prop="goodsSkuName" align="center" />
<el-table-column label="商品编码" prop="goodsSkuCode" align="center" />
<el-table-column label="厂家" prop="manufacturerName" align="center" />
<el-table-column label="规格" prop="goodsSkuOwnSpec" align="center" />
<el-table-column label="单位" prop="unit" align="center" />
<el-table-column label="需返厂数量" prop="needReturnCount" align="center" />
<el-table-column label="实际返厂数量" prop="actualReturnCount" align="center" />
<el-table-column label="差异说明" prop="remarks" align="center" />
</el-table>
</el-form>
</el-form>
</div>
</div>
</div>
</template>
<script>
import req from '@/api/storage/oldPartsFactory'
import req from '@/api/storage/oldPartsFactory'
export default {
name: 'WorkSLRSettlementYiBan',
data() {
return {
viewTitle: '',
viewState: 1,
submitdisabled: false,
tableKey: 0,
index: 0,
// service
serviceKey: 1,
// subjoin
subjoinKey: 2,
formobj: {
"sid": "",
"remarks": "",
"createBySid": window.sessionStorage.getItem('userSid'),
"createByName": window.sessionStorage.getItem('name'),
"deptSid": window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage
.getItem('defaultOrgPath').lastIndexOf('/') + 1),
"deptName": window.sessionStorage.getItem('defaultOrgPathName').substring(window
.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1),
"createTime": "",
"billNo": "",
"filePaths": [],
"useOrgSid": '',
"useOrgName": '',
"orgSidPath": window.sessionStorage.getItem('orgSidPath'),
"procDefId": "",
"nodeId": "",
"procInstId": "",
"nodeState": "",
"taskId": "",
"finishTime": "",
"asOldpartreturnList": [
export default {
name: 'WorkSLRSettlementYiBan',
data() {
return {
viewTitle: '',
viewState: 1,
submitdisabled: false,
tableKey: 0,
index: 0,
// service
serviceKey: 1,
// subjoin
subjoinKey: 2,
formobj: {
"sid": "",
"remarks": "",
"createBySid": '',
"createByName": '',
"deptSid": '',
"deptName": '',
"createTime": "",
"billNo": "",
"filePaths": [],
"useOrgSid": '',
"useOrgName": '',
"orgSidPath": '',
"procDefId": "",
"nodeId": "",
"procInstId": "",
"nodeState": "",
"taskId": "",
"finishTime": "",
"asOldpartreturnList": [
]
},
rules: {},
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
}
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
]
},
rules: {},
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
}
}
}, '*')
},
computed: {
},
methods: {
showInfo(sid) {
this.viewTitle = '旧件返厂申请详情'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.fetchBySid(sid).then((res) => {
if (res.success) {
this.formobj = res.data
if (this.formobj.sitemVos.length > 0) {
this.formobj.sitemVos.forEach((e) => {
if (e.staffNameList.length > 0) {
e.repairerName = e.staffNameList.join(',')
}
})
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
}
})
}, '*')
},
/** 确认撤回任务 */
openRevoke() {
this.$confirm('是否确认执行撤回操作', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.handleRevoke()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消撤回'
})
})
computed: {
},
/** 撤回任务 */
handleRevoke() {
req.revokeProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
methods: {
showInfo(sid) {
this.viewTitle = '旧件返厂申请详情'
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.fetchBySid(sid).then((res) => {
if (res.success) {
this.formobj = res.data
if (this.formobj.sitemVos.length > 0) {
this.formobj.sitemVos.forEach((e) => {
if (e.staffNameList.length > 0) {
e.repairerName = e.staffNameList.join(',')
}
})
}
}, '*')
}
})
}
})
},
/** 确认撤回任务 */
openRevoke() {
this.$confirm('是否确认执行撤回操作', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.handleRevoke()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消撤回'
})
})
},
/** 撤回任务 */
handleRevoke() {
req.revokeProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
}
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
</style>

448
yxt-as-ui/src/views/workFlow/oldpPartStocktakingLossFlow/oldpPartStocktakingLossDaiBan.vue

@ -0,0 +1,448 @@
<template>
<div>
<div class="tab-header webtop">
<!-- 标题 -->
<div>旧件盘亏出库申请单详情</div>
<!-- start 添加修改按钮 -->
<div>
<el-button type="primary" size="small" @click="openCountersign('加签')"> </el-button>
<el-button type="primary" size="small" @click="openAgree('同意')"> </el-button>
<el-button type="danger" size="small" @click="openReject('驳回')"> </el-button>
<el-button type="danger" size="small" @click="openStop('终止')"> </el-button>
</div>
<!-- end 添加修改按钮 -->
<!-- end 详情按钮 -->
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">盘点单号</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.sourceBillNo }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">业务类型</div>
<el-form-item><span class="addinputInfo">{{ formobj.businessValue }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<div class="title">
<div>旧件列表</div>
</div>
<el-table v-loading="listLoading" :data="formobj.goodsList" border>
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column label="商品名称" prop="goodsName" align="center" />
<el-table-column label="商品编码" prop="goodsCode" align="center" />
<el-table-column label="规格" prop="goodsSpec" align="center" />
<el-table-column label="单位" prop="unit" align="center" />
<el-table-column label="仓库" prop="warehouseName" align="center" />
<el-table-column label="库位" prop="warehouseRackName" align="center" />
<el-table-column label="入库单价" prop="inStoragePrice" align="center" />
<el-table-column label="盘亏数量" prop="pkNum" align="center" />
<el-table-column label="出库数量" prop="outStorageNum" align="center" />
<el-table-column label="金额" align="center">
<template #default="scope">
{{ totalQuantity(scope.row) }}
</template>
</el-table-column>
</el-table>
</el-form>
</div>
<!-- 选择待办人 的弹出框-->
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%">
<el-form class="formadd">
<el-row v-show="countersignLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="4" class="tleftb">
<span class="icon">*</span>加签人员:
</el-col>
<el-col :span="20">
<el-form-item>
<el-select v-model="countersign.assignee" placeholder="请选择" filterable>
<el-option v-for="item in options" :key="item.userSid" :label="item.staffName" :value="item.userSid">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="4" class="tleftb">
<span>当前环节:</span>
</el-col>
<el-col :span="20">
<el-form-item><span>{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item>
</el-col>
</el-row>
<el-row :class="{rowClass:!currentLink}">
<el-col :span="4" class="tleftb">
<span>意见:</span>
</el-col>
<el-col :span="20">
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw"
type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable></el-input></el-form-item>
</el-col>
</el-row>
<div style="text-align:center;margin-top: 20px;">
<el-button type="primary" size="mini" @click="reject"> </el-button>
<el-button type="info " size="mini" @click="nodeDialogVisible = false"> </el-button>
</div>
</el-form>
</el-dialog>
</div>
</template>
<script>
import req from '@/api/storage/oldpPartStocktakingLoss.js'
import {
selectStaffListss
} from '@/api/Common/dictcommons'
export default {
components: {},
data() {
return {
listLoading: false,
formobj: {},
options: [],
operation: '', //
dialogList: {
comment: ''
},
startTask: true,
current: {
taskDefKey: '',
taskName: '' //
},
nextNode: {}, //
nodeDialogVisible: false,
currentLink: true,
countersignLink: false,
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
},
//
countersign: {
taskId: '',
assignee: '',
userSid: '',
instanceId: '',
views: ''
}
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
// this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath')
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
this.current.taskDefKey = obj.taskDefKey
this.current.taskName = obj.taskName
//
this.countersign.taskId = obj.taskId
this.countersign.userSid = window.sessionStorage.getItem('userSid')
this.countersign.instanceId = obj.instanceId
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
}
}, '*')
},
computed: {
//
totalQuantity() {
return function(row) {
row.money = (Number(row.inStoragePrice) * Number(row.outStorageNum)).toFixed(2)
return (Number(row.inStoragePrice) * Number(row.outStorageNum)).toFixed(2)
}
},
},
methods: {
showInfo(sid) {
req.fetchDetailsBySid(sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
}
})
.catch(e => {
this.formobj = {}
})
selectStaffListss().then((res) => {
if (res.success) {
this.options = res.data
}
})
},
//
indexMethod(index) {
return index + 1
},
//
openCountersign(val) {
this.operation = val
this.currentLink = true
this.countersignLink = true
this.dialogList.comment = ''
req.getNextNodesForSubmit({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openAgree(val) {
this.operation = val
this.currentLink = true
this.countersignLink = false
this.dialogList.comment = '同意'
req.getNextNodesForSubmit({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openReject(val) {
this.operation = val
this.currentLink = true
this.countersignLink = false
this.dialogList.comment = ''
req.getPreviousNodesForReject({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openStop(val) {
this.operation = val
this.currentLink = false
this.countersignLink = false
this.dialogList.comment = ''
this.nodeDialogVisible = true
},
reject() {
if (this.operation === '同意') {
this.handleAgree()
} else if (this.operation === '驳回') {
if (this.dialogList.comment === '') {
this.$message({
showClose: true,
type: 'error',
message: '请填写审批意见'
})
} else {
this.handleReject()
}
} else if (this.operation === '终止') {
if (this.dialogList.comment === '') {
this.$message({
showClose: true,
type: 'error',
message: '请填写审批意见'
})
} else {
this.handleStop()
}
} else if (this.operation === '加签') {
this.handleCountersign()
}
},
/** 加签 */
handleCountersign() {
if (this.countersign.assignee === '') {
this.$message({
showClose: true,
type: 'error',
message: '请选择加签人员'
})
return
}
if (this.dialogList.comment === '') {
this.$message({
showClose: true,
type: 'error',
message: '请填写审批意见'
})
return
}
this.countersign.views = this.dialogList.comment
req.delegate(this.countersign).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 同意任务 */
handleAgree() {
this.linkByParameter.comment = this.dialogList.comment
req.complete(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 驳回任务 */
handleReject() {
this.linkByParameter.comment = this.dialogList.comment
req.reject(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 终止任务 */
handleStop() {
this.linkByParameter.comment = this.dialogList.comment
req.breakProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
.rowClass {
border-top: 1px solid #E0E3EB;
}
</style>

374
yxt-as-ui/src/views/workFlow/oldpPartStocktakingLossFlow/oldpPartStocktakingLossEdit.vue

@ -0,0 +1,374 @@
<template>
<div>
<div class="tab-header webtop">
<!-- 标题 -->
<div>{{title}}旧件盘亏出库申请单</div>
<!-- start 添加修改按钮 -->
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">提交</el-button>
</div>
<!-- end 添加修改按钮 -->
<!-- end 详情按钮 -->
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 申请日期</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 盘点单号</div>
<el-form-item prop="sourceBillNo">
<el-select v-model="formobj.sourceBillNo" filterable clearable placeholder="请选择"
class="addinputw addinputInfo" @change="selectSourceBillNo">
<el-option v-for="item in sourceBillNoList" :key="item.billSid" :label="item.billNo"
:value="item.billSid">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">业务类型</div>
<el-form-item><span class="addinputInfo">{{ formobj.businessValue }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">备注</div>
<el-form-item><el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo"
clearable /></el-form-item>
</el-col>
</el-row>
<div class="title">
<div>旧件列表</div>
</div>
<el-table v-loading="listLoading" :data="formobj.goodsList" border>
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column fixed label="操作" wid align="center" width="120">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="doDelGoods(scope.row)">删除</el-button>
</template>
</el-table-column>
<el-table-column label="商品ID" prop="goodsID" align="center" />
<el-table-column label="商品名称" prop="goodsName" align="center" />
<el-table-column label="商品编码" prop="goodsCode" align="center" />
<el-table-column label="规格" prop="goodsSpec" align="center" />
<el-table-column label="单位" prop="unit" align="center" />
<el-table-column label="仓库" prop="warehouseName" align="center" />
<el-table-column label="库位" prop="warehouseRackName" align="center" />
<el-table-column label="入库单价" prop="inStoragePrice" align="center" />
<el-table-column label="盘亏数量" prop="pkNum" align="center" />
<el-table-column label="出库数量" align="center">
<template slot-scope="scope">
<el-input ref="focusAssumptionInput" v-model="scope.row.outStorageNum"
@input="commodityComputeYHAndXSJE3(scope.row)" clearable placeholder=""
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
</template>
</el-table-column>
<el-table-column label="金额" align="center">
<template #default="scope">
{{ totalQuantity(scope.row) }}
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
</template>
<script>
import req from '@/api/storage/oldpPartStocktakingLoss.js'
import {
getCurrentDate
} from '@/utils/index.js'
import {
getOrgSidByPath,
} from '@/api/Common/dictcommons'
export default {
components: {},
data() {
return {
title: "【新增】",
listLoading: false,
submitdisabled: false,
formobj: {
"sid": "",
"createBySid": '',
"createByName": '',
"deptName": '',
"deptSid": '',
"createTime": getCurrentDate(),
"sourceBillNo": "",
"sourceBillSid": "",
"businessKey": "14",
"businessValue": "盘亏出库",
"remarks": "",
"warehouseTypeKey": "02",
"warehouseTypeValue": "旧件库",
"goodsList": [],
},
hideUploadBtn: false,
sourceBillNoList: [],
rules: {
sourceBillNo: [{
required: true,
message: '请选择盘点单号',
trigger: 'change'
}],
}
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
}
}, '*')
},
computed: {
//
totalQuantity() {
return function(row) {
row.money = (Number(row.inStoragePrice) * Number(row.outStorageNum)).toFixed(2)
return (Number(row.inStoragePrice) * Number(row.outStorageNum)).toFixed(2)
}
},
},
methods: {
indexMethod(index) {
return index + 1
},
saveOrUpdate() {
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
// this.$refs['form_obj'].validate((valid) => {
// if (valid) {
this.submitdisabled = true
req.save(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '保存成功'
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
// }
// })
},
submit() {
this.$refs['form_obj'].validate((valid) => {
if (valid) {
if (this.formobj.goodsList.length == 0) {
this.$message({
showClose: true,
type: 'error',
message: '请添加商品'
})
return
}
for (var i = 0; i < this.formobj.goodsList.length; i++) {
var item = this.formobj.goodsList[i]
if (Number(item.outStorageNum) == 0) {
this.$message({
showClose: true,
type: 'error',
message: '商品出库数量不能为空'
})
return
}
}
this.submitdisabled = true
req.submit(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '保存成功'
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
},
showAdd() {
this.title = "【新增】"
this.init()
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
},
showInfo(sid) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.title = "【修改】"
req.fetchDetailsBySid(sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
this.formobj.warehouseTypeKey = "02"
this.formobj.warehouswarehouseTypeValueeTypeKey = "旧件库"
req.getSourceBillNoBySid({
deptSid: this.formobj.deptSid,
warehouseTypeKey: "02"
}).then((resp) => {
if (resp.success) {
this.sourceBillNoList = resp.data
}
})
}
})
.catch(e => {
this.formobj = {}
})
},
selectSourceBillNo(val) {
console.log("selectSourceBillNo", val);
const choose = this.sourceBillNoList.filter((item) => item.billSid == val)
console.log('>>>>>>>>>selectSourceBillNo', choose)
this.formobj.sourceBillNo = choose[0].billNo
this.formobj.sourceBillSid = choose[0].billSid
this.getSourceBillGoods(this.formobj.sourceBillSid)
},
getSourceBillGoods(sid) {
req.sourceBillBySid(sid).then((resp) => {
if (resp.success) {
this.formobj.goodsList = resp.data
}
})
},
doDelGoods(row) {
console.log("doDelGoods", row);
const index = this.formobj.goodsList.findIndex((item) => item == row)
this.formobj.goodsList.splice(index, 1)
},
commodityComputeYHAndXSJE3(row) {
console.log("commodityComputeYHAndXSJE3", row);
if (Number(row.outStorageNum) > Number(row.pkNum)) {
row.outStorageNum = Number(row.pkNum)
}
row.money = (Number(row.inStoragePrice) * Number(row.outStorageNum)).toFixed(2)
}
}
}
</script>
<style scoped>
/deep/ .el-form-item__error {
margin-left: 120px !important;
}
.must {
color: #f00;
}
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 120px !important;
width: calc(100% - 115px);
}
.first_row {
border-top: 1px solid #E0E3EB;
}
.titleOne {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
</style>

203
yxt-as-ui/src/views/workFlow/oldpPartStocktakingLossFlow/oldpPartStocktakingLossYiBan.vue

@ -0,0 +1,203 @@
<template>
<div>
<div class="tab-header webtop">
<!-- 标题 -->
<div>旧件盘亏出库申请单详情</div>
<!-- start 添加修改按钮 -->
<div>
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button>
</div>
<!-- end 添加修改按钮 -->
<!-- end 详情按钮 -->
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">盘点单号</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.sourceBillNo }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">业务类型</div>
<el-form-item><span class="addinputInfo">{{ formobj.businessValue }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<div class="title">
<div>旧件列表</div>
</div>
<el-table v-loading="listLoading" :data="formobj.goodsList" border>
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column label="商品名称" prop="goodsName" align="center" />
<el-table-column label="商品编码" prop="goodsCode" align="center" />
<el-table-column label="规格" prop="goodsSpec" align="center" />
<el-table-column label="单位" prop="unit" align="center" />
<el-table-column label="仓库" prop="warehouseName" align="center" />
<el-table-column label="库位" prop="warehouseRackName" align="center" />
<el-table-column label="入库单价" prop="inStoragePrice" align="center" />
<el-table-column label="盘亏数量" prop="pkNum" align="center" />
<el-table-column label="出库数量" prop="outStorageNum" align="center" />
<el-table-column label="金额" align="center">
<template #default="scope">
{{ totalQuantity(scope.row) }}
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
</template>
<script>
import req from '@/api/storage/oldpPartStocktakingLoss.js'
export default {
components: {},
data() {
return {
listLoading: false,
formobj: {},
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
},
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
}
}, '*')
},
computed: {
//
totalQuantity() {
return function(row) {
row.money = (Number(row.inStoragePrice) * Number(row.outStorageNum)).toFixed(2)
return (Number(row.inStoragePrice) * Number(row.outStorageNum)).toFixed(2)
}
},
},
methods: {
showInfo(sid) {
req.fetchDetailsBySid(sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
}
})
.catch(e => {
this.formobj = {}
})
},
//
indexMethod(index) {
return index + 1
},
/** 确认撤回任务 */
openRevoke() {
this.$confirm('是否确认执行撤回操作', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.handleRevoke()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消撤回'
})
})
},
/** 撤回任务 */
handleRevoke() {
req.revokeProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
</style>

446
yxt-as-ui/src/views/workFlow/oldpPartStocktakingSurplusFlow/oldpPartStocktakingSurplusDaiBan.vue

@ -0,0 +1,446 @@
<template>
<div>
<div class="tab-header webtop">
<!-- 标题 -->
<div>旧件盘盈入库申请单详情</div>
<!-- start 添加修改按钮 -->
<div>
<el-button type="primary" size="small" @click="openCountersign('加签')"> </el-button>
<el-button type="primary" size="small" @click="openAgree('同意')"> </el-button>
<el-button type="danger" size="small" @click="openReject('驳回')"> </el-button>
<el-button type="danger" size="small" @click="openStop('终止')"> </el-button>
</div>
<!-- end 添加修改按钮 -->
<!-- end 详情按钮 -->
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">盘点单号</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.sourceBillNo }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">业务类型</div>
<el-form-item><span class="addinputInfo">{{ formobj.businessValue }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<div class="title">
<div>旧件列表</div>
</div>
<el-table v-loading="listLoading" :data="formobj.goodsList" border>
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column label="商品名称" prop="goodsName" align="center" />
<el-table-column label="商品编码" prop="goodsCode" align="center" />
<el-table-column label="规格" prop="goodsSpec" align="center" />
<el-table-column label="单位" prop="unit" align="center" />
<el-table-column label="盘盈数量" prop="pyNum" align="center" />
<el-table-column label="供应商" prop="supplierName" align="center" />
<el-table-column label="入库单价" prop="inStoragePrice" align="center" />
<el-table-column label="入库数量" prop="inStorageNum" align="center" />
<el-table-column label="金额" align="center">
<template #default="scope">
{{ totalQuantity(scope.row) }}
</template>
</el-table-column>
</el-table>
</el-form>
</div>
<!-- 选择待办人 的弹出框-->
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%">
<el-form class="formadd">
<el-row v-show="countersignLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="4" class="tleftb">
<span class="icon">*</span>加签人员:
</el-col>
<el-col :span="20">
<el-form-item>
<el-select v-model="countersign.assignee" placeholder="请选择" filterable>
<el-option v-for="item in options" :key="item.userSid" :label="item.staffName" :value="item.userSid">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="4" class="tleftb">
<span>当前环节:</span>
</el-col>
<el-col :span="20">
<el-form-item><span>{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item>
</el-col>
</el-row>
<el-row :class="{rowClass:!currentLink}">
<el-col :span="4" class="tleftb">
<span>意见:</span>
</el-col>
<el-col :span="20">
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw"
type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable></el-input></el-form-item>
</el-col>
</el-row>
<div style="text-align:center;margin-top: 20px;">
<el-button type="primary" size="mini" @click="reject"> </el-button>
<el-button type="info " size="mini" @click="nodeDialogVisible = false"> </el-button>
</div>
</el-form>
</el-dialog>
</div>
</template>
<script>
import req from '@/api/storage/oldpPartStocktakingSurplus.js'
import {
selectStaffListss
} from '@/api/Common/dictcommons'
export default {
components: {},
data() {
return {
listLoading: false,
formobj: {},
options: [],
operation: '', //
dialogList: {
comment: ''
},
startTask: true,
current: {
taskDefKey: '',
taskName: '' //
},
nextNode: {}, //
nodeDialogVisible: false,
currentLink: true,
countersignLink: false,
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
},
//
countersign: {
taskId: '',
assignee: '',
userSid: '',
instanceId: '',
views: ''
}
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
// this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath')
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
this.current.taskDefKey = obj.taskDefKey
this.current.taskName = obj.taskName
//
this.countersign.taskId = obj.taskId
this.countersign.userSid = window.sessionStorage.getItem('userSid')
this.countersign.instanceId = obj.instanceId
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
}
}, '*')
},
computed: {
//
totalQuantity() {
return function(row) {
row.money = (Number(row.inStoragePrice) * Number(row.inStorageNum)).toFixed(2)
return (Number(row.inStoragePrice) * Number(row.inStorageNum)).toFixed(2)
}
},
},
methods: {
showInfo(sid) {
req.fetchDetailsBySid(sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
}
})
.catch(e => {
this.formobj = {}
})
selectStaffListss().then((res) => {
if (res.success) {
this.options = res.data
}
})
},
//
indexMethod(index) {
return index + 1
},
//
openCountersign(val) {
this.operation = val
this.currentLink = true
this.countersignLink = true
this.dialogList.comment = ''
req.getNextNodesForSubmit({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openAgree(val) {
this.operation = val
this.currentLink = true
this.countersignLink = false
this.dialogList.comment = '同意'
req.getNextNodesForSubmit({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openReject(val) {
this.operation = val
this.currentLink = true
this.countersignLink = false
this.dialogList.comment = ''
req.getPreviousNodesForReject({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openStop(val) {
this.operation = val
this.currentLink = false
this.countersignLink = false
this.dialogList.comment = ''
this.nodeDialogVisible = true
},
reject() {
if (this.operation === '同意') {
this.handleAgree()
} else if (this.operation === '驳回') {
if (this.dialogList.comment === '') {
this.$message({
showClose: true,
type: 'error',
message: '请填写审批意见'
})
} else {
this.handleReject()
}
} else if (this.operation === '终止') {
if (this.dialogList.comment === '') {
this.$message({
showClose: true,
type: 'error',
message: '请填写审批意见'
})
} else {
this.handleStop()
}
} else if (this.operation === '加签') {
this.handleCountersign()
}
},
/** 加签 */
handleCountersign() {
if (this.countersign.assignee === '') {
this.$message({
showClose: true,
type: 'error',
message: '请选择加签人员'
})
return
}
if (this.dialogList.comment === '') {
this.$message({
showClose: true,
type: 'error',
message: '请填写审批意见'
})
return
}
this.countersign.views = this.dialogList.comment
req.delegate(this.countersign).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 同意任务 */
handleAgree() {
this.linkByParameter.comment = this.dialogList.comment
req.complete(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 驳回任务 */
handleReject() {
this.linkByParameter.comment = this.dialogList.comment
req.reject(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 终止任务 */
handleStop() {
this.linkByParameter.comment = this.dialogList.comment
req.breakProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
.rowClass {
border-top: 1px solid #E0E3EB;
}
</style>

426
yxt-as-ui/src/views/workFlow/oldpPartStocktakingSurplusFlow/oldpPartStocktakingSurplusEdit.vue

@ -0,0 +1,426 @@
<template>
<div>
<div class="tab-header webtop">
<!-- 标题 -->
<div>{{title}}旧件盘盈入库申请单</div>
<!-- start 添加修改按钮 -->
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">提交</el-button>
</div>
<!-- end 添加修改按钮 -->
<!-- end 详情按钮 -->
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 申请日期</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 盘点单号</div>
<el-form-item prop="sourceBillNo">
<el-select v-model="formobj.sourceBillNo" filterable clearable placeholder="请选择"
class="addinputw addinputInfo" @change="selectSourceBillNo">
<el-option v-for="item in sourceBillNoList" :key="item.billSid" :label="item.billNo"
:value="item.billSid">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">业务类型</div>
<el-form-item><span class="addinputInfo">{{ formobj.businessValue }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">备注</div>
<el-form-item><el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo"
clearable /></el-form-item>
</el-col>
</el-row>
<div class="title">
<div>旧件列表</div>
</div>
<el-table v-loading="listLoading" :data="formobj.goodsList" border>
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column fixed label="操作" wid align="center" width="120">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="doDelGoods(scope.row)">删除</el-button>
</template>
</el-table-column>
<el-table-column label="商品名称" prop="goodsName" align="center" />
<el-table-column label="商品编码" prop="goodsCode" align="center" />
<el-table-column label="规格" prop="goodsSpec" align="center" />
<el-table-column label="单位" prop="unit" align="center" />
<el-table-column label="盘盈数量" prop="pyNum" align="center" />
<el-table-column label="供应商" align="center">
<template slot-scope="scope">
<el-select v-model="scope.row.supplierName" clearable placeholder="请选择"
@change="selectSupplierName(scope.row,$event)">
<el-option v-for="(item,i) in supplierList" :key="i" :label="item.supplierName" :value="item.sid">
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="入库单价" align="center">
<template slot-scope="scope">
<el-input ref="focusAssumptionInput" @input="commodityComputeYHAndXSJE3(scope.row)"
v-model="scope.row.inStoragePrice" clearable placeholder=""
oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" />
</template>
</el-table-column>
<el-table-column label="入库数量" align="center">
<template slot-scope="scope">
<el-input ref="focusAssumptionInput" v-model="scope.row.inStorageNum"
@input="commodityComputeYHAndXSJE3(scope.row)" clearable placeholder=""
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
</template>
</el-table-column>
<el-table-column label="金额" align="center">
<template #default="scope">
{{ totalQuantity(scope.row) }}
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
</template>
<script>
import req from '@/api/storage/oldpPartStocktakingSurplus.js'
import {
getCurrentDate
} from '@/utils/index.js'
import {
getOrgSidByPath,
choiceSupplierInfo
} from '@/api/Common/dictcommons'
export default {
components: {},
data() {
return {
title: "【新增】",
listLoading: false,
submitdisabled: false,
formobj: {
"sid": "",
"createBySid": '',
"createByName": '',
"deptName": '',
"deptSid": '',
"createTime": getCurrentDate(),
"sourceBillNo": "",
"sourceBillSid": "",
"businessKey": "04",
"businessValue": "盘盈入库",
"remarks": "",
"warehouseTypeKey": "02",
"warehouseTypeValue": "旧件库",
"goodsList": []
},
hideUploadBtn: false,
supplierList: [],
sourceBillNoList: [],
rules: {
sourceBillNo: [{
required: true,
message: '请选择盘点单号',
trigger: 'change'
}],
}
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
}
}, '*')
},
computed: {
//
totalQuantity() {
return function(row) {
row.money = (Number(row.inStoragePrice) * Number(row.inStorageNum)).toFixed(2)
return (Number(row.inStoragePrice) * Number(row.inStorageNum)).toFixed(2)
}
},
},
methods: {
indexMethod(index) {
return index + 1
},
saveOrUpdate() {
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
// this.$refs['form_obj'].validate((valid) => {
// if (valid) {
this.submitdisabled = true
req.save(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '保存成功'
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
// }
// })
},
submit() {
this.$refs['form_obj'].validate((valid) => {
if (valid) {
if (this.formobj.goodsList.length == 0) {
this.$message({
showClose: true,
type: 'error',
message: '请添加商品'
})
return
}
for (var i = 0; i < this.formobj.goodsList.length; i++) {
var item = this.formobj.goodsList[i]
if (item.supplierName == '' || item.supplierSid == '') {
this.$message({
showClose: true,
type: 'error',
message: '供应商不能为空'
})
return
}
if (Number(item.inStoragePrice) == 0) {
this.$message({
showClose: true,
type: 'error',
message: '商品入库单价不能为空'
})
return
}
if (Number(item.inStorageNum) == 0) {
this.$message({
showClose: true,
type: 'error',
message: '商品入库数量不能为空'
})
return
}
}
this.submitdisabled = true
req.submit(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '保存成功'
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
},
showAdd() {
this.title = "【新增】"
this.init()
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
},
showInfo(sid) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.title = "【修改】"
req.fetchDetailsBySid(sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
this.formobj.warehouseTypeKey = "02"
this.formobj.warehouswarehouseTypeValueeTypeKey = "旧件库"
choiceSupplierInfo({
deptSid: this.formobj.deptSid
}).then((resp) => {
if (resp.success) {
this.supplierList = resp.data
}
})
req.getSourceBillNoBySid({
deptSid: this.formobj.deptSid,
warehouseTypeKey: "02"
}).then((resp) => {
if (resp.success) {
this.sourceBillNoList = resp.data
}
})
}
})
.catch(e => {
this.formobj = {}
})
},
selectSourceBillNo(val) {
console.log("selectSourceBillNo", val);
const choose = this.sourceBillNoList.filter((item) => item.billSid == val)
console.log('>>>>>>>>>selectSourceBillNo', choose)
this.formobj.sourceBillNo = choose[0].billNo
this.formobj.sourceBillSid = choose[0].billSid
this.getSourceBillGoods(this.formobj.sourceBillSid)
},
getSourceBillGoods(sid) {
req.sourceBillBySid(sid).then((resp) => {
if (resp.success) {
this.formobj.goodsList = resp.data
}
})
},
doDelGoods(row) {
console.log("doDelGoods", row);
const index = this.formobj.goodsList.findIndex((item) => item == row)
this.formobj.goodsList.splice(index, 1)
},
selectSupplierName(row, val) {
console.log("selectSupplierName", row);
console.log("selectSupplierName", val);
const choose = this.supplierList.filter((item) => item.sid == val)
console.log('>>>>>>>>>selectWarehouseAreaCode', choose)
row.supplierName = choose[0].supplierName
row.supplierSid = choose[0].sid
},
commodityComputeYHAndXSJE3(row) {
console.log("commodityComputeYHAndXSJE3", row);
if (Number(row.inStorageNum) > Number(row.pyNum)) {
row.inStorageNum = Number(row.pyNum)
}
row.money = (Number(row.inStoragePrice) * Number(row.inStorageNum)).toFixed(2)
}
}
}
</script>
<style scoped>
/deep/ .el-form-item__error {
margin-left: 120px !important;
}
.must {
color: #f00;
}
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 120px !important;
width: calc(100% - 115px);
}
.first_row {
border-top: 1px solid #E0E3EB;
}
.titleOne {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
</style>

202
yxt-as-ui/src/views/workFlow/oldpPartStocktakingSurplusFlow/oldpPartStocktakingSurplusYiBan.vue

@ -0,0 +1,202 @@
<template>
<div>
<div class="tab-header webtop">
<!-- 标题 -->
<div>旧件盘盈入库申请单详情</div>
<!-- start 添加修改按钮 -->
<div>
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button>
</div>
<!-- end 添加修改按钮 -->
<!-- end 详情按钮 -->
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">盘点单号</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.sourceBillNo }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">业务类型</div>
<el-form-item><span class="addinputInfo">{{ formobj.businessValue }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<div class="title">
<div>旧件列表</div>
</div>
<el-table v-loading="listLoading" :data="formobj.goodsList" border>
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column label="商品名称" prop="goodsName" align="center" />
<el-table-column label="商品编码" prop="goodsCode" align="center" />
<el-table-column label="规格" prop="goodsSpec" align="center" />
<el-table-column label="单位" prop="unit" align="center" />
<el-table-column label="盘盈数量" prop="pyNum" align="center" />
<el-table-column label="供应商" prop="supplierName" align="center" />
<el-table-column label="入库单价" prop="inStoragePrice" align="center" />
<el-table-column label="入库数量" prop="inStorageNum" align="center" />
<el-table-column label="金额" align="center">
<template #default="scope">
{{ totalQuantity(scope.row) }}
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
</template>
<script>
import req from '@/api/storage/oldpPartStocktakingSurplus.js'
export default {
components: {},
data() {
return {
listLoading: false,
formobj: {},
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
},
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
}
}, '*')
},
computed: {
//
totalQuantity() {
return function(row) {
row.money = (Number(row.inStoragePrice) * Number(row.inStorageNum)).toFixed(2)
return (Number(row.inStoragePrice) * Number(row.inStorageNum)).toFixed(2)
}
},
},
methods: {
showInfo(sid) {
req.fetchDetailsBySid(sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
}
})
.catch(e => {
this.formobj = {}
})
},
//
indexMethod(index) {
return index + 1
},
/** 确认撤回任务 */
openRevoke() {
this.$confirm('是否确认执行撤回操作', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.handleRevoke()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消撤回'
})
})
},
/** 撤回任务 */
handleRevoke() {
req.revokeProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
</style>

447
yxt-as-ui/src/views/workFlow/stocktakingLossFlow/stocktakingLossDaiBan.vue

@ -0,0 +1,447 @@
<template>
<div>
<div class="tab-header webtop">
<!-- 标题 -->
<div>盘亏出库申请单详情</div>
<!-- start 添加修改按钮 -->
<div>
<el-button type="primary" size="small" @click="openCountersign('加签')"> </el-button>
<el-button type="primary" size="small" @click="openAgree('同意')"> </el-button>
<el-button type="danger" size="small" @click="openReject('驳回')"> </el-button>
<el-button type="danger" size="small" @click="openStop('终止')"> </el-button>
</div>
<!-- end 添加修改按钮 -->
<!-- end 详情按钮 -->
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">盘点单号</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.sourceBillNo }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">业务类型</div>
<el-form-item><span class="addinputInfo">{{ formobj.businessValue }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<div class="title">
<div>商品列表</div>
</div>
<el-table v-loading="listLoading" :data="formobj.goodsList" border>
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column label="商品名称" prop="goodsName" align="center" />
<el-table-column label="商品编码" prop="goodsCode" align="center" />
<el-table-column label="规格" prop="goodsSpec" align="center" />
<el-table-column label="单位" prop="unit" align="center" />
<el-table-column label="仓库" prop="warehouseName" align="center" />
<el-table-column label="库位" prop="warehouseRackName" align="center" />
<el-table-column label="入库单价" prop="inStoragePrice" align="center" />
<el-table-column label="盘亏数量" prop="pkNum" align="center" />
<el-table-column label="出库数量" prop="outStorageNum" align="center" />
<el-table-column label="金额" align="center">
<template #default="scope">
{{ totalQuantity(scope.row) }}
</template>
</el-table-column>
</el-table>
</el-form>
</div>
<!-- 选择待办人 的弹出框-->
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%">
<el-form class="formadd">
<el-row v-show="countersignLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="4" class="tleftb">
<span class="icon">*</span>加签人员:
</el-col>
<el-col :span="20">
<el-form-item>
<el-select v-model="countersign.assignee" placeholder="请选择" filterable>
<el-option v-for="item in options" :key="item.userSid" :label="item.staffName" :value="item.userSid">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="4" class="tleftb">
<span>当前环节:</span>
</el-col>
<el-col :span="20">
<el-form-item><span>{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item>
</el-col>
</el-row>
<el-row :class="{rowClass:!currentLink}">
<el-col :span="4" class="tleftb">
<span>意见:</span>
</el-col>
<el-col :span="20">
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw"
type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable></el-input></el-form-item>
</el-col>
</el-row>
<div style="text-align:center;margin-top: 20px;">
<el-button type="primary" size="mini" @click="reject"> </el-button>
<el-button type="info " size="mini" @click="nodeDialogVisible = false"> </el-button>
</div>
</el-form>
</el-dialog>
</div>
</template>
<script>
import req from '@/api/storage/stocktakingLoss.js'
import {
selectStaffListss
} from '@/api/Common/dictcommons'
export default {
components: {},
data() {
return {
listLoading: false,
formobj: {},
options: [],
operation: '', //
dialogList: {
comment: ''
},
startTask: true,
current: {
taskDefKey: '',
taskName: '' //
},
nextNode: {}, //
nodeDialogVisible: false,
currentLink: true,
countersignLink: false,
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
},
//
countersign: {
taskId: '',
assignee: '',
userSid: '',
instanceId: '',
views: ''
}
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
// this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath')
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
this.current.taskDefKey = obj.taskDefKey
this.current.taskName = obj.taskName
//
this.countersign.taskId = obj.taskId
this.countersign.userSid = window.sessionStorage.getItem('userSid')
this.countersign.instanceId = obj.instanceId
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
}
}, '*')
},
computed: {
//
totalQuantity() {
return function(row) {
row.money = (Number(row.inStoragePrice) * Number(row.outStorageNum)).toFixed(2)
return (Number(row.inStoragePrice) * Number(row.outStorageNum)).toFixed(2)
}
},
},
methods: {
showInfo(sid) {
req.fetchDetailsBySid(sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
}
})
.catch(e => {
this.formobj = {}
})
selectStaffListss().then((res) => {
if (res.success) {
this.options = res.data
}
})
},
//
indexMethod(index) {
return index + 1
},
//
openCountersign(val) {
this.operation = val
this.currentLink = true
this.countersignLink = true
this.dialogList.comment = ''
req.getNextNodesForSubmit({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openAgree(val) {
this.operation = val
this.currentLink = true
this.countersignLink = false
this.dialogList.comment = '同意'
req.getNextNodesForSubmit({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openReject(val) {
this.operation = val
this.currentLink = true
this.countersignLink = false
this.dialogList.comment = ''
req.getPreviousNodesForReject({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openStop(val) {
this.operation = val
this.currentLink = false
this.countersignLink = false
this.dialogList.comment = ''
this.nodeDialogVisible = true
},
reject() {
if (this.operation === '同意') {
this.handleAgree()
} else if (this.operation === '驳回') {
if (this.dialogList.comment === '') {
this.$message({
showClose: true,
type: 'error',
message: '请填写审批意见'
})
} else {
this.handleReject()
}
} else if (this.operation === '终止') {
if (this.dialogList.comment === '') {
this.$message({
showClose: true,
type: 'error',
message: '请填写审批意见'
})
} else {
this.handleStop()
}
} else if (this.operation === '加签') {
this.handleCountersign()
}
},
/** 加签 */
handleCountersign() {
if (this.countersign.assignee === '') {
this.$message({
showClose: true,
type: 'error',
message: '请选择加签人员'
})
return
}
if (this.dialogList.comment === '') {
this.$message({
showClose: true,
type: 'error',
message: '请填写审批意见'
})
return
}
this.countersign.views = this.dialogList.comment
req.delegate(this.countersign).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 同意任务 */
handleAgree() {
this.linkByParameter.comment = this.dialogList.comment
req.complete(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 驳回任务 */
handleReject() {
this.linkByParameter.comment = this.dialogList.comment
req.reject(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 终止任务 */
handleStop() {
this.linkByParameter.comment = this.dialogList.comment
req.breakProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
.rowClass {
border-top: 1px solid #E0E3EB;
}
</style>

396
yxt-as-ui/src/views/workFlow/stocktakingLossFlow/stocktakingLossEdit.vue

@ -0,0 +1,396 @@
<template>
<div>
<div class="tab-header webtop">
<!-- 标题 -->
<div>{{title}}盘亏出库申请单</div>
<!-- start 添加修改按钮 -->
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">提交</el-button>
</div>
<!-- end 添加修改按钮 -->
<!-- end 详情按钮 -->
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 申请日期</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 盘点单号</div>
<el-form-item prop="sourceBillNo">
<el-select v-model="formobj.sourceBillNo" filterable clearable placeholder="请选择"
class="addinputw addinputInfo" @change="selectSourceBillNo">
<el-option v-for="item in sourceBillNoList" :key="item.billSid" :label="item.billNo"
:value="item.billSid">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">业务类型</div>
<el-form-item><span class="addinputInfo">{{ formobj.businessValue }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">备注</div>
<el-form-item><el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo"
clearable /></el-form-item>
</el-col>
</el-row>
<div class="title">
<div>商品列表</div>
</div>
<el-table v-loading="listLoading" :data="formobj.goodsList" border>
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column fixed label="操作" wid align="center" width="120">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="doDelGoods(scope.row)">删除</el-button>
</template>
</el-table-column>
<el-table-column label="商品ID" prop="goodsID" align="center" />
<el-table-column label="商品名称" prop="goodsName" align="center" />
<el-table-column label="商品编码" prop="goodsCode" align="center" />
<el-table-column label="规格" prop="goodsSpec" align="center" />
<el-table-column label="单位" prop="unit" align="center" />
<el-table-column label="仓库" prop="warehouseName" align="center" />
<el-table-column label="库位" prop="warehouseRackName" align="center" />
<el-table-column label="入库单价" prop="inStoragePrice" align="center" />
<el-table-column label="盘亏数量" prop="pkNum" align="center" />
<el-table-column label="出库数量" align="center">
<template slot-scope="scope">
<el-input ref="focusAssumptionInput" v-model="scope.row.outStorageNum"
@input="commodityComputeYHAndXSJE3(scope.row)" clearable placeholder=""
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
</template>
</el-table-column>
<el-table-column label="金额" align="center">
<template #default="scope">
{{ totalQuantity(scope.row) }}
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
</template>
<script>
import req from '@/api/storage/stocktakingLoss.js'
import {
getCurrentDate
} from '@/utils/index.js'
import {
getOrgSidByPath,
} from '@/api/Common/dictcommons'
export default {
components: {},
data() {
return {
title: "【新增】",
listLoading: false,
submitdisabled: false,
formobj: {
"sid": "",
"createBySid": '',
"createByName": '',
"deptName": '',
"deptSid": '',
"createTime": getCurrentDate(),
"sourceBillNo": "",
"sourceBillSid": "",
"businessKey": "14",
"businessValue": "盘亏出库",
"remarks": "",
"warehouseTypeKey": "01",
"warehouseTypeValue": "配件库",
"goodsList": []
},
hideUploadBtn: false,
sourceBillNoList: [],
rules: {
sourceBillNo: [{
required: true,
message: '请选择盘点单号',
trigger: 'change'
}],
}
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
}
}, '*')
},
computed: {
//
totalQuantity() {
return function(row) {
row.money = (Number(row.inStoragePrice) * Number(row.outStorageNum)).toFixed(2)
return (Number(row.inStoragePrice) * Number(row.outStorageNum)).toFixed(2)
}
},
},
methods: {
init() {
getOrgSidByPath({
orgPath: window.sessionStorage.getItem('defaultOrgPath')
}).then((res) => {
if (res.success) {
this.formobj.createOrgSid = res.data
this.formobj.useOrgSid = res.data
}
})
req.getSourceBillNoBySid({
deptSid: window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage.getItem(
'defaultOrgPath').lastIndexOf('/') + 1),
warehouseTypeKey: "01"
}).then((resp) => {
if (resp.success) {
this.sourceBillNoList = resp.data
}
})
},
indexMethod(index) {
return index + 1
},
saveOrUpdate() {
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
// this.$refs['form_obj'].validate((valid) => {
// if (valid) {
this.submitdisabled = true
req.save(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '保存成功'
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
// }
// })
},
submit() {
this.$refs['form_obj'].validate((valid) => {
if (valid) {
if (this.formobj.goodsList.length == 0) {
this.$message({
showClose: true,
type: 'error',
message: '请添加商品'
})
return
}
for (var i = 0; i < this.formobj.goodsList.length; i++) {
var item = this.formobj.goodsList[i]
if (Number(item.outStorageNum) == 0) {
this.$message({
showClose: true,
type: 'error',
message: '商品出库数量不能为空'
})
return
}
}
this.submitdisabled = true
req.submit(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '保存成功'
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
},
showAdd() {
this.title = "【新增】"
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
},
showInfo(row) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.title = "【修改】"
req.fetchDetailsBySid(row.sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
this.formobj.warehouseTypeKey = "01"
this.formobj.warehouswarehouseTypeValueeTypeKey = "配件库"
req.getSourceBillNoBySid({
deptSid: this.formobj.deptSid,
warehouseTypeKey: "01"
}).then((resp) => {
if (resp.success) {
this.sourceBillNoList = resp.data
}
})
}
})
.catch(e => {
this.formobj = {}
})
},
selectSourceBillNo(val) {
console.log("selectSourceBillNo", val);
const choose = this.sourceBillNoList.filter((item) => item.billSid == val)
console.log('>>>>>>>>>selectSourceBillNo', choose)
this.formobj.sourceBillNo = choose[0].billNo
this.formobj.sourceBillSid = choose[0].billSid
this.getSourceBillGoods(this.formobj.sourceBillSid)
},
getSourceBillGoods(sid) {
req.sourceBillBySid(sid).then((resp) => {
if (resp.success) {
this.formobj.goodsList = resp.data
}
})
},
doDelGoods(row) {
console.log("doDelGoods", row);
const index = this.formobj.goodsList.findIndex((item) => item == row)
this.formobj.goodsList.splice(index, 1)
},
commodityComputeYHAndXSJE3(row) {
console.log("commodityComputeYHAndXSJE3", row);
if (Number(row.outStorageNum) > Number(row.pkNum)) {
row.outStorageNum = Number(row.pkNum)
}
row.money = (Number(row.inStoragePrice) * Number(row.outStorageNum)).toFixed(2)
}
}
}
</script>
<style scoped>
/deep/ .el-form-item__error {
margin-left: 120px !important;
}
.must {
color: #f00;
}
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 120px !important;
width: calc(100% - 115px);
}
.first_row {
border-top: 1px solid #E0E3EB;
}
.titleOne {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
</style>

203
yxt-as-ui/src/views/workFlow/stocktakingLossFlow/stocktakingLossYiBan.vue

@ -0,0 +1,203 @@
<template>
<div>
<div class="tab-header webtop">
<!-- 标题 -->
<div>盘亏出库申请单详情</div>
<!-- start 添加修改按钮 -->
<div>
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button>
</div>
<!-- end 添加修改按钮 -->
<!-- end 详情按钮 -->
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">盘点单号</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.sourceBillNo }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">业务类型</div>
<el-form-item><span class="addinputInfo">{{ formobj.businessValue }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<div class="title">
<div>商品列表</div>
</div>
<el-table v-loading="listLoading" :data="formobj.goodsList" border>
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column label="商品名称" prop="goodsName" align="center" />
<el-table-column label="商品编码" prop="goodsCode" align="center" />
<el-table-column label="规格" prop="goodsSpec" align="center" />
<el-table-column label="单位" prop="unit" align="center" />
<el-table-column label="仓库" prop="warehouseName" align="center" />
<el-table-column label="库位" prop="warehouseRackName" align="center" />
<el-table-column label="入库单价" prop="inStoragePrice" align="center" />
<el-table-column label="盘亏数量" prop="pkNum" align="center" />
<el-table-column label="出库数量" prop="outStorageNum" align="center" />
<el-table-column label="金额" align="center">
<template #default="scope">
{{ totalQuantity(scope.row) }}
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
</template>
<script>
import req from '@/api/storage/stocktakingLoss.js'
export default {
components: {},
data() {
return {
listLoading: false,
formobj: {},
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
},
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
}
}, '*')
},
computed: {
//
totalQuantity() {
return function(row) {
row.money = (Number(row.inStoragePrice) * Number(row.outStorageNum)).toFixed(2)
return (Number(row.inStoragePrice) * Number(row.outStorageNum)).toFixed(2)
}
},
},
methods: {
showInfo(sid) {
req.fetchDetailsBySid(sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
}
})
.catch(e => {
this.formobj = {}
})
},
//
indexMethod(index) {
return index + 1
},
/** 确认撤回任务 */
openRevoke() {
this.$confirm('是否确认执行撤回操作', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.handleRevoke()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消撤回'
})
})
},
/** 撤回任务 */
handleRevoke() {
req.revokeProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
</style>

447
yxt-as-ui/src/views/workFlow/stocktakingSurplusFlow/stocktakingSurplusDaiBan.vue

@ -0,0 +1,447 @@
<template>
<div>
<div class="tab-header webtop">
<!-- 标题 -->
<div>盘盈入库申请单详情</div>
<!-- start 添加修改按钮 -->
<div>
<el-button type="primary" size="small" @click="openCountersign('加签')"> </el-button>
<el-button type="primary" size="small" @click="openAgree('同意')"> </el-button>
<el-button type="danger" size="small" @click="openReject('驳回')"> </el-button>
<el-button type="danger" size="small" @click="openStop('终止')"> </el-button>
</div>
<!-- end 添加修改按钮 -->
<!-- end 详情按钮 -->
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">盘点单号</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.sourceBillNo }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">业务类型</div>
<el-form-item><span class="addinputInfo">{{ formobj.businessValue }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<div class="title">
<div>商品列表</div>
</div>
<el-table v-loading="listLoading" :data="formobj.goodsList" border>
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column label="商品名称" prop="goodsName" align="center" />
<el-table-column label="商品编码" prop="goodsCode" align="center" />
<el-table-column label="规格" prop="goodsSpec" align="center" />
<el-table-column label="单位" prop="unit" align="center" />
<el-table-column label="盘盈数量" prop="pyNum" align="center" />
<el-table-column label="供应商" prop="supplierName" align="center" />
<el-table-column label="入库单价" prop="inStoragePrice" align="center" />
<el-table-column label="入库数量" prop="inStorageNum" align="center" />
<el-table-column label="金额" align="center">
<template #default="scope">
{{ totalQuantity(scope.row) }}
</template>
</el-table-column>
</el-table>
</el-form>
</div>
<!-- 选择待办人 的弹出框-->
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%">
<el-form class="formadd">
<el-row v-show="countersignLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="4" class="tleftb">
<span class="icon">*</span>加签人员:
</el-col>
<el-col :span="20">
<el-form-item>
<el-select v-model="countersign.assignee" placeholder="请选择" filterable>
<el-option v-for="item in options" :key="item.userSid" :label="item.staffName" :value="item.userSid">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="4" class="tleftb">
<span>当前环节:</span>
</el-col>
<el-col :span="20">
<el-form-item><span>{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item>
</el-col>
</el-row>
<el-row :class="{rowClass:!currentLink}">
<el-col :span="4" class="tleftb">
<span>意见:</span>
</el-col>
<el-col :span="20">
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw"
type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable></el-input></el-form-item>
</el-col>
</el-row>
<div style="text-align:center;margin-top: 20px;">
<el-button type="primary" size="mini" @click="reject"> </el-button>
<el-button type="info " size="mini" @click="nodeDialogVisible = false"> </el-button>
</div>
</el-form>
</el-dialog>
</div>
</template>
<script>
import req from '@/api/storage/stocktakingSurplus.js'
import {
selectStaffListss
} from '@/api/Common/dictcommons'
export default {
components: {},
data() {
return {
listLoading: false,
formobj: {},
options: [],
operation: '', //
dialogList: {
comment: ''
},
startTask: true,
current: {
taskDefKey: '',
taskName: '' //
},
nextNode: {}, //
nodeDialogVisible: false,
currentLink: true,
countersignLink: false,
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
},
//
countersign: {
taskId: '',
assignee: '',
userSid: '',
instanceId: '',
views: ''
}
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
// this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath')
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
this.current.taskDefKey = obj.taskDefKey
this.current.taskName = obj.taskName
//
this.countersign.taskId = obj.taskId
this.countersign.userSid = window.sessionStorage.getItem('userSid')
this.countersign.instanceId = obj.instanceId
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
}
}, '*')
},
computed: {
//
totalQuantity() {
return function(row) {
row.money = (Number(row.inStoragePrice) * Number(row.inStorageNum)).toFixed(2)
return (Number(row.inStoragePrice) * Number(row.inStorageNum)).toFixed(2)
}
},
},
methods: {
showInfo(sid) {
req.fetchDetailsBySid(sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
}
})
.catch(e => {
this.formobj = {}
})
selectStaffListss().then((res) => {
if (res.success) {
this.options = res.data
}
})
},
//
indexMethod(index) {
return index + 1
},
//
openCountersign(val) {
this.operation = val
this.currentLink = true
this.countersignLink = true
this.dialogList.comment = ''
req.getNextNodesForSubmit({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openAgree(val) {
this.operation = val
this.currentLink = true
this.countersignLink = false
this.dialogList.comment = '同意'
req.getNextNodesForSubmit({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openReject(val) {
this.operation = val
this.currentLink = true
this.countersignLink = false
this.dialogList.comment = ''
req.getPreviousNodesForReject({
taskDefKey: this.current.taskDefKey,
businessSid: this.linkByParameter.businessSid
}).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openStop(val) {
this.operation = val
this.currentLink = false
this.countersignLink = false
this.dialogList.comment = ''
this.nodeDialogVisible = true
},
reject() {
if (this.operation === '同意') {
this.handleAgree()
} else if (this.operation === '驳回') {
if (this.dialogList.comment === '') {
this.$message({
showClose: true,
type: 'error',
message: '请填写审批意见'
})
} else {
this.handleReject()
}
} else if (this.operation === '终止') {
if (this.dialogList.comment === '') {
this.$message({
showClose: true,
type: 'error',
message: '请填写审批意见'
})
} else {
this.handleStop()
}
} else if (this.operation === '加签') {
this.handleCountersign()
}
},
/** 加签 */
handleCountersign() {
if (this.countersign.assignee === '') {
this.$message({
showClose: true,
type: 'error',
message: '请选择加签人员'
})
return
}
if (this.dialogList.comment === '') {
this.$message({
showClose: true,
type: 'error',
message: '请填写审批意见'
})
return
}
this.countersign.views = this.dialogList.comment
req.delegate(this.countersign).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 同意任务 */
handleAgree() {
this.linkByParameter.comment = this.dialogList.comment
req.complete(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 驳回任务 */
handleReject() {
this.linkByParameter.comment = this.dialogList.comment
req.reject(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 终止任务 */
handleStop() {
this.linkByParameter.comment = this.dialogList.comment
req.breakProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
.rowClass {
border-top: 1px solid #E0E3EB;
}
</style>

458
yxt-as-ui/src/views/workFlow/stocktakingSurplusFlow/stocktakingSurplusEdit.vue

@ -0,0 +1,458 @@
<template>
<div>
<div class="tab-header webtop">
<!-- 标题 -->
<div>{{title}}盘盈入库申请单</div>
<!-- start 添加修改按钮 -->
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">提交</el-button>
</div>
<!-- end 添加修改按钮 -->
<!-- end 详情按钮 -->
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 申请日期</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 盘点单号</div>
<el-form-item prop="sourceBillNo">
<el-select v-model="formobj.sourceBillNo" filterable clearable placeholder="请选择"
class="addinputw addinputInfo" @change="selectSourceBillNo">
<el-option v-for="item in sourceBillNoList" :key="item.billSid" :label="item.billNo"
:value="item.billSid">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">业务类型</div>
<el-form-item><span class="addinputInfo">{{ formobj.businessValue }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">备注</div>
<el-form-item><el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo"
clearable /></el-form-item>
</el-col>
</el-row>
<div class="title">
<div>商品列表</div>
</div>
<el-table v-loading="listLoading" :data="formobj.goodsList" border>
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column fixed label="操作" wid align="center" width="120">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="doDelGoods(scope.row)">删除</el-button>
</template>
</el-table-column>
<el-table-column label="商品名称" prop="goodsName" align="center" />
<el-table-column label="商品编码" prop="goodsCode" align="center" />
<el-table-column label="规格" prop="goodsSpec" align="center" />
<el-table-column label="单位" prop="unit" align="center" />
<el-table-column label="盘盈数量" prop="pyNum" align="center" />
<el-table-column label="供应商" align="center">
<template slot-scope="scope">
<el-select v-model="scope.row.supplierName" clearable placeholder="请选择"
@change="selectSupplierName(scope.row,$event)">
<el-option v-for="(item,i) in supplierList" :key="i" :label="item.supplierName" :value="item.sid">
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="入库单价" align="center">
<template slot-scope="scope">
<el-input ref="focusAssumptionInput" @input="commodityComputeYHAndXSJE3(scope.row)"
v-model="scope.row.inStoragePrice" clearable placeholder=""
oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" />
</template>
</el-table-column>
<el-table-column label="入库数量" align="center">
<template slot-scope="scope">
<el-input ref="focusAssumptionInput" v-model="scope.row.inStorageNum"
@input="commodityComputeYHAndXSJE3(scope.row)" clearable placeholder=""
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
</template>
</el-table-column>
<el-table-column label="金额" align="center">
<template #default="scope">
{{ totalQuantity(scope.row) }}
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
</template>
<script>
import req from '@/api/storage/stocktakingSurplus.js'
import {
getCurrentDate
} from '@/utils/index.js'
import {
getOrgSidByPath,
choiceSupplierInfo
} from '@/api/Common/dictcommons'
export default {
components: {},
data() {
return {
title: "【新增】",
listLoading: false,
submitdisabled: false,
formobj: {
"sid": "",
"createBySid": '',
"createByName": '',
"deptName": '',
"deptSid": '',
"createTime": getCurrentDate(),
"sourceBillNo": "",
"sourceBillSid": "",
"businessKey": "04",
"businessValue": "盘盈入库",
"remarks": "",
"warehouseTypeKey": "01",
"warehouseTypeValue": "配件库",
"goodsList": []
},
hideUploadBtn: false,
supplierList: [],
sourceBillNoList: [],
rules: {
sourceBillNo: [{
required: true,
message: '请选择盘点单号',
trigger: 'change'
}],
}
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
}
}, '*')
},
computed: {
//
totalQuantity() {
return function(row) {
row.money = (Number(row.inStoragePrice) * Number(row.inStorageNum)).toFixed(2)
return (Number(row.inStoragePrice) * Number(row.inStorageNum)).toFixed(2)
}
},
},
methods: {
init() {
getOrgSidByPath({
orgPath: window.sessionStorage.getItem('defaultOrgPath')
}).then((res) => {
if (res.success) {
this.formobj.createOrgSid = res.data
this.formobj.useOrgSid = res.data
}
})
choiceSupplierInfo({
deptSid: window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage.getItem(
'defaultOrgPath').lastIndexOf('/') + 1)
}).then((resp) => {
if (resp.success) {
this.supplierList = resp.data
}
})
req.getSourceBillNoBySid({
deptSid: window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage.getItem(
'defaultOrgPath').lastIndexOf('/') + 1),
warehouseTypeKey: "01"
}).then((resp) => {
if (resp.success) {
this.sourceBillNoList = resp.data
}
})
},
indexMethod(index) {
return index + 1
},
saveOrUpdate() {
console.log('>>>>>>>>>saveOrUpdate', this.formobj)
// this.$refs['form_obj'].validate((valid) => {
// if (valid) {
this.submitdisabled = true
req.save(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '保存成功'
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
// }
// })
},
submit() {
this.$refs['form_obj'].validate((valid) => {
if (valid) {
if (this.formobj.goodsList.length == 0) {
this.$message({
showClose: true,
type: 'error',
message: '请添加商品'
})
return
}
for (var i = 0; i < this.formobj.goodsList.length; i++) {
var item = this.formobj.goodsList[i]
if (item.supplierName == '' || item.supplierSid == '') {
this.$message({
showClose: true,
type: 'error',
message: '供应商不能为空'
})
return
}
if (Number(item.inStoragePrice) == 0) {
this.$message({
showClose: true,
type: 'error',
message: '商品入库单价不能为空'
})
return
}
if (Number(item.inStorageNum) == 0) {
this.$message({
showClose: true,
type: 'error',
message: '商品入库数量不能为空'
})
return
}
}
this.submitdisabled = true
req.submit(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '保存成功'
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
},
showAdd() {
this.title = "【新增】"
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
},
showInfo(sid) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.title = "【修改】"
req.fetchDetailsBySid(sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
this.formobj.warehouseTypeKey = "01"
this.formobj.warehouswarehouseTypeValueeTypeKey = "配件库"
choiceSupplierInfo({
deptSid: this.formobj.deptSid
}).then((resp) => {
if (resp.success) {
this.supplierList = resp.data
}
})
req.getSourceBillNoBySid({
deptSid: this.formobj.deptSid,
warehouseTypeKey: "01"
}).then((resp) => {
if (resp.success) {
this.sourceBillNoList = resp.data
}
})
}
})
.catch(e => {
this.formobj = {}
})
},
selectSourceBillNo(val) {
console.log("selectSourceBillNo", val);
const choose = this.sourceBillNoList.filter((item) => item.billSid == val)
console.log('>>>>>>>>>selectSourceBillNo', choose)
this.formobj.sourceBillNo = choose[0].billNo
this.formobj.sourceBillSid = choose[0].billSid
this.getSourceBillGoods(this.formobj.sourceBillSid)
},
getSourceBillGoods(sid) {
req.sourceBillBySid(sid).then((resp) => {
if (resp.success) {
this.formobj.goodsList = resp.data
}
})
},
doDelGoods(row) {
console.log("doDelGoods", row);
const index = this.formobj.goodsList.findIndex((item) => item == row)
this.formobj.goodsList.splice(index, 1)
},
selectSupplierName(row, val) {
console.log("selectSupplierName", row);
console.log("selectSupplierName", val);
const choose = this.supplierList.filter((item) => item.sid == val)
console.log('>>>>>>>>>selectWarehouseAreaCode', choose)
row.supplierName = choose[0].supplierName
row.supplierSid = choose[0].sid
},
commodityComputeYHAndXSJE3(row) {
console.log("commodityComputeYHAndXSJE3", row);
if (Number(row.inStorageNum) > Number(row.pyNum)) {
row.inStorageNum = Number(row.pyNum)
}
row.money = (Number(row.inStoragePrice) * Number(row.inStorageNum)).toFixed(2)
}
}
}
</script>
<style scoped>
/deep/ .el-form-item__error {
margin-left: 120px !important;
}
.must {
color: #f00;
}
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 120px !important;
width: calc(100% - 115px);
}
.first_row {
border-top: 1px solid #E0E3EB;
}
.titleOne {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
</style>

203
yxt-as-ui/src/views/workFlow/stocktakingSurplusFlow/stocktakingSurplusYiBan.vue

@ -0,0 +1,203 @@
<template>
<div>
<div class="tab-header webtop">
<!-- 标题 -->
<div>盘盈入库申请单详情</div>
<!-- start 添加修改按钮 -->
<div>
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button>
</div>
<!-- end 添加修改按钮 -->
<!-- end 详情按钮 -->
</div>
<div class="">
<el-form ref="form_obj" :model="formobj" class="formaddcopy02">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="8">
<div class="span-sty">申请人</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请部门</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.deptName }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">申请日期</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.createTime }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="span-sty">盘点单号</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.sourceBillNo }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">业务类型</div>
<el-form-item><span class="addinputInfo">{{ formobj.businessValue }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputw addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<div class="title">
<div>商品列表</div>
</div>
<el-table v-loading="listLoading" :data="formobj.goodsList" border>
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column label="商品名称" prop="goodsName" align="center" />
<el-table-column label="商品编码" prop="goodsCode" align="center" />
<el-table-column label="规格" prop="goodsSpec" align="center" />
<el-table-column label="单位" prop="unit" align="center" />
<el-table-column label="盘盈数量" prop="pyNum" align="center" />
<el-table-column label="供应商" prop="supplierName" align="center" />
<el-table-column label="入库单价" prop="inStoragePrice" align="center" />
<el-table-column label="入库数量" prop="inStorageNum" align="center" />
<el-table-column label="金额" align="center">
<template #default="scope">
{{ totalQuantity(scope.row) }}
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
</template>
<script>
import req from '@/api/storage/stocktakingSurplus.js'
export default {
components: {},
data() {
return {
listLoading: false,
formobj: {},
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
},
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 500 + 'px'
}
}, '*')
},
computed: {
//
totalQuantity() {
return function(row) {
row.money = (Number(row.inStoragePrice) * Number(row.inStorageNum)).toFixed(2)
return (Number(row.inStoragePrice) * Number(row.inStorageNum)).toFixed(2)
}
},
},
methods: {
showInfo(sid) {
req.fetchDetailsBySid(sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
}
})
.catch(e => {
this.formobj = {}
})
},
//
indexMethod(index) {
return index + 1
},
/** 确认撤回任务 */
openRevoke() {
this.$confirm('是否确认执行撤回操作', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.handleRevoke()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消撤回'
})
})
},
/** 撤回任务 */
handleRevoke() {
req.revokeProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
}
}
}
</script>
<style scoped>
.span-sty {
width: 130px !important;
}
.addinputInfo {
margin-left: 120px !important;
}
</style>
Loading…
Cancel
Save