ljlong_2630 2 weeks ago
parent
commit
09164b6949
  1. 2
      .env.wyf
  2. 1
      package.json
  3. 41
      src/api/wms/purchaseClaimRecordDetail/index.ts
  4. 69
      src/api/wms/purchaseClaimRecordMain/index.ts
  5. 1
      src/api/wms/purchaseClaimRequestDetail/index.ts
  6. 6
      src/api/wms/purchaseClaimRequestMain/index.ts
  7. 5
      src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts
  8. 13
      src/views/wms/basicDataManage/labelManage/purchasePackage/index.vue
  9. 16
      src/views/wms/basicDataManage/strategySetting/strategy/arrivalInspectionStrategy/AddForm.vue
  10. 4
      src/views/wms/basicDataManage/strategySetting/strategy/arrivalInspectionStrategy/index.vue
  11. 28
      src/views/wms/basicDataManage/strategySetting/strategy/batchStrategy/AddForm.vue
  12. 4
      src/views/wms/basicDataManage/strategySetting/strategy/batchStrategy/index.vue
  13. 1208
      src/views/wms/basicDataManage/strategySetting/strategy/deliverStrategy/AddForm.vue
  14. 170
      src/views/wms/basicDataManage/strategySetting/strategy/deliverStrategy/index.vue
  15. 550
      src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue
  16. 4
      src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/index.vue
  17. 20
      src/views/wms/basicDataManage/strategySetting/strategy/inspectStrategy/AddForm.vue
  18. 4
      src/views/wms/basicDataManage/strategySetting/strategy/inspectStrategy/index.vue
  19. 23
      src/views/wms/basicDataManage/strategySetting/strategy/manageAccuracyStrategy/AddForm.vue
  20. 4
      src/views/wms/basicDataManage/strategySetting/strategy/manageAccuracyStrategy/index.vue
  21. 2
      src/views/wms/basicDataManage/strategySetting/strategy/purchaseReceiptStrategy/AddForm.vue
  22. 4
      src/views/wms/basicDataManage/strategySetting/strategy/purchaseReceiptStrategy/index.vue
  23. 16
      src/views/wms/basicDataManage/strategySetting/strategy/repairMaterialStrategy/AddForm.vue
  24. 4
      src/views/wms/basicDataManage/strategySetting/strategy/repairMaterialStrategy/index.vue
  25. 28
      src/views/wms/basicDataManage/strategySetting/strategy/storageCapacityStrategy/AddForm.vue
  26. 4
      src/views/wms/basicDataManage/strategySetting/strategy/storageCapacityStrategy/index.vue
  27. 18
      src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/AddForm.vue
  28. 4
      src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/index.vue
  29. 305
      src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue
  30. 4
      src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/index.vue
  31. 2
      src/views/wms/basicDataManage/strategySetting/strategy/utensilCapacityStrategy/AddForm.vue
  32. 4
      src/views/wms/basicDataManage/strategySetting/strategy/utensilCapacityStrategy/index.vue
  33. 14
      src/views/wms/basicDataManage/strategySetting/strategy/warehouseStorageStrategy/AddForm.vue
  34. 4
      src/views/wms/basicDataManage/strategySetting/strategy/warehouseStorageStrategy/index.vue
  35. 82
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts
  36. 57
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts
  37. 9
      src/views/wms/purchasereceiptManage/amvpurchasereceipt/amvPurchasereceiptRecordMain/index.vue
  38. 23
      src/views/wms/purchasereceiptManage/amvpurchasereceipt/amvPurchasereceiptRecordMain/purchasereceiptRecordMain.data.ts
  39. 9
      src/views/wms/purchasereceiptManage/bspurchasereceipt/bsPurchasereceiptRecordMain/index.vue
  40. 23
      src/views/wms/purchasereceiptManage/bspurchasereceipt/bsPurchasereceiptRecordMain/purchasereceiptRecordMain.data.ts
  41. 6
      src/views/wms/purchasereceiptManage/developpurchasereceipt/developPurchasereceiptJobMain/index.vue
  42. 26
      src/views/wms/purchasereceiptManage/developpurchasereceipt/developPurchasereceiptJobMain/purchasereceiptJobMain.data.ts
  43. 9
      src/views/wms/purchasereceiptManage/developpurchasereceipt/developPurchasereceiptRecordMain/index.vue
  44. 23
      src/views/wms/purchasereceiptManage/developpurchasereceipt/developPurchasereceiptRecordMain/purchasereceiptRecordMain.data.ts
  45. 20
      src/views/wms/purchasereceiptManage/developpurchasereceipt/developPurchasereceiptRequestMain/index.vue
  46. 24
      src/views/wms/purchasereceiptManage/developpurchasereceipt/developPurchasereceiptRequestMain/purchasereceiptRequestMain.data.ts
  47. 9
      src/views/wms/purchasereceiptManage/jispurchasereceipt/jisPurchasereceiptRecordMain/index.vue
  48. 23
      src/views/wms/purchasereceiptManage/jispurchasereceipt/jisPurchasereceiptRecordMain/purchasereceiptRecordMain.data.ts
  49. 22
      src/views/wms/purchasereceiptManage/jispurchasereceipt/jisPurchasereceiptRequestMain/index.vue
  50. 24
      src/views/wms/purchasereceiptManage/jispurchasereceipt/jisPurchasereceiptRequestMain/purchasereceiptRequestMain.data.ts
  51. 26
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/purchasereceiptJobMain.data.ts
  52. 3
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue
  53. 23
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/purchasereceiptRecordMain.data.ts
  54. 4
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue
  55. 24
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts
  56. 2
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue
  57. 6
      src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptJobMain/index.vue
  58. 26
      src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptJobMain/purchasereceiptJobMain.data.ts
  59. 10
      src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptRecordMain/index.vue
  60. 23
      src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptRecordMain/purchasereceiptRecordMain.data.ts
  61. 20
      src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptRequestMain/index.vue
  62. 24
      src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptRequestMain/purchasereceiptRequestMain.data.ts
  63. 349
      src/views/wms/supplierManage/purchaseClaim/purchaseClaimRecord/PurchaseClaimRecordMain.data.ts
  64. 453
      src/views/wms/supplierManage/purchaseClaim/purchaseClaimRecord/index.vue
  65. 22
      src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/PurchaseClaimRequestMain.data.ts
  66. 56
      src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/index.vue

2
.env.wyf

@ -7,7 +7,7 @@ VITE_DEV=false
# SCP 28040
# WMS 28050
# # 请求路径
# 请求路径
VITE_BASE_URL='http://dev.ccwin-in.com:28050/api'
# 上传路径

1
package.json

@ -6,6 +6,7 @@
"private": false,
"scripts": {
"dev": "vite",
"wyf": "vite --mode wyf",
"test": "vite build --mode test",
"prod": "vite build --mode prod",
"preview": "vite preview",

41
src/api/wms/purchaseClaimRecordDetail/index.ts

@ -0,0 +1,41 @@
import request from '@/config/axios'
// 获得采购索赔子分页
export const getPurchaseClaimRecordDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/purchaseClaim-record-detail/senior', data })
} else {
return await request.get({ url: `/wms/purchaseClaim-record-detail/page`, params })
}
}
// 创建采购索赔子
export const createPurchaseClaimRecordDetail = async (data) => {
return await request.post({ url: `/wms/purchaseClaim-record-detail/create`, data })
}
// 修改采购索赔子
export const updatePurchaseClaimRecordDetail = async (data) => {
return await request.put({ url: `/wms/purchaseClaim-record-detail/update`, data })
}
// 删除采购索赔子
export const deletePurchaseClaimRecordDetail = async (id) => {
return await request.delete({ url: `/wms/purchaseClaim-record-detail/delete?id=` + id })
}
// 获得采购索赔子
export const getPurchaseClaimRecordDetail = async (id) => {
return await request.get({ url: `/wms/purchaseClaim-record-detail/get?id=` + id })
}
// 导出采购索赔子 Excel
export const exportPurchaseClaimRecordDetailExcel = async (params) => {
if (params.isSearch) {
const data = {...params}
return await request.downloadPost({url: `/wms/purchaseClaim-record-detail/export-excel-senior`, data})
} else {
return await request.download({ url: `/wms/purchaseClaim-record-detail/export-excel`, params })
}
}

69
src/api/wms/purchaseClaimRecordMain/index.ts

@ -0,0 +1,69 @@
import request from '@/config/axios'
export interface PurchaseClaimRecordMainVO {
id: number
number: string
supplierCode: string
claimTime: Date
status: string
supplierinvoiceNumber: string
remark: string
available: string
siteId: string
concurrencyStamp: string
}
// 查询采购索赔主列表
export const getPurchaseClaimRecordMainPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/purchaseClaim-record-main/senior', data })
} else {
return await request.get({ url: `/wms/purchaseClaim-record-main/page`, params })
}
}
// 查询采购索赔主详情
export const getPurchaseClaimRecordMain = async (id: number) => {
return await request.get({ url: `/wms/purchaseClaim-record-main/get?id=` + id })
}
// 新增采购索赔主
export const createPurchaseClaimRecordMain = async (data: PurchaseClaimRecordMainVO) => {
return await request.post({ url: `/wms/purchaseClaim-record-main/create`, data })
}
// 修改采购索赔主
export const updatePurchaseClaimRecordMain = async (data: PurchaseClaimRecordMainVO) => {
return await request.put({ url: `/wms/purchaseClaim-record-main/update`, data })
}
// 删除采购索赔主
export const deletePurchaseClaimRecordMain = async (id: number) => {
return await request.delete({ url: `/wms/purchaseClaim-record-main/delete?id=` + id })
}
// 提交审批采购索赔
export const subPurchaseClaimRecordMain = async (id: number) => {
return await request.delete({ url: `/wms/purchaseClaim-record-main/subPurchaseClaimRecordMain?id=` + id })
}
// 审批通过采购索赔
export const agreePurchaseClaimRecordMain = async (id: number) => {
return await request.delete({ url: `/wms/purchaseClaim-record-main/agreePurchaseClaimRecordMain?id=` + id })
}
// 审批驳回采购索赔
export const rejectPurchaseClaimRecordMain = async (id: number) => {
return await request.delete({ url: `/wms/purchaseClaim-record-main/rejectPurchaseClaimRecordMain?id=` + id })
}
// 导出采购索赔主 Excel
export const exportPurchaseClaimRecordMain = async (params) => {
return await request.download({ url: `/wms/purchaseClaim-record-main/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/purchaseClaim-record-main/get-import-template' })
}

1
src/api/wms/purchaseClaimRequestDetail/index.ts

@ -29,7 +29,6 @@ export const getPurchaseClaimRequestDetail = async (id) => {
return await request.get({ url: `/wms/purchase-claim-request-detail/get?id=` + id })
}
// 导出采购索赔子 Excel
export const exportPurchaseClaimRequestDetailExcel = async (params) => {
if (params.isSearch) {

6
src/api/wms/purchaseClaimRequestMain/index.ts

@ -46,17 +46,17 @@ export const deletePurchaseClaimRequestMain = async (id: number) => {
// 提交审批采购索赔
export const subPurchaseClaimRequestMain = async (id: number) => {
return await request.delete({ url: `/wms/purchaseClaim-request-main/subPurchaseClaimRequestMain?id=` + id })
return await request.post({ url: `/wms/purchaseClaim-request-main/sub?id=` + id })
}
// 审批通过采购索赔
export const agreePurchaseClaimRequestMain = async (id: number) => {
return await request.delete({ url: `/wms/purchaseClaim-request-main/agreePurchaseClaimRequestMain?id=` + id })
return await request.post({ url: `/wms/purchaseClaim-request-main/agree?id=` + id })
}
// 审批驳回采购索赔
export const rejectPurchaseClaimRequestMain = async (id: number) => {
return await request.delete({ url: `/wms/purchaseClaim-request-main/rejectPurchaseClaimRequestMain?id=` + id })
return await request.post({ url: `/wms/purchaseClaim-request-main/reject?id=` + id })
}
// 导出采购索赔主 Excel

5
src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts

@ -347,7 +347,10 @@ export const Itembasic = useCrudSchemas(reactive<CrudSchema[]>([
label: '备注',
field: 'remark',
sort: 'custom',
isTable: false
isTable: true,
table: {
width: 180
},
},
{
label: '创建者',

13
src/views/wms/basicDataManage/labelManage/purchasePackage/index.vue

@ -133,7 +133,10 @@ const searchTableSuccess = (formField, searchField, val, basicFormRef, type, row
}
if (formField == 'toDockCode') {
setV['receivedLocation'] = val[0]['name']
setV['defaultReceivingArea'] = val[0]['remark']
setV['defaultReceivingArea'] = val[0]['areaCode']
}
if (formField == 'packUnit') {
setV['packQty'] = val[0]['packQty']
}
basicFormRef.setValues(setV)
})
@ -229,7 +232,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'delete') { //
handleDelete(row.id)
} else if (val == 'point') { //
handlePoint(row)
handleDocumentPrint(row.id)
} else if (val == 'enable') {
handleEnable(row.id)
} else if (val == 'disable') {
@ -306,6 +309,12 @@ const handleExport = async () => {
}
const BASE_URL = getJmreportBaseUrl()
const documentSrc = ref(BASE_URL + '/jmreport/view/1016234988731322368?token=' + getAccessToken())
const handleDocumentPrint = async (id) => {
window.open(documentSrc.value + '&id=' + id)
}
const labelType = ref('') //
const handlePoint = async (row) => {
PackageApi.getBalanceToPackage(row.relateNumber).then(res => {

16
src/views/wms/basicDataManage/strategySetting/strategy/arrivalInspectionStrategy/AddForm.vue

@ -25,22 +25,22 @@
</el-col>
<el-col :span="24" key="名称col">
<el-form-item key="名称formItem" label="名称" prop="name">
<el-input key="名称input" v-model="formData.name" placeholder="请输入名称" clearable :disabled="formData.name=='默认规则'&&formType=='update'"/>
<el-input key="名称input" v-model="formData.name" placeholder="请输入名称" clearable :disabled="formData.priority==0&&formType=='update'"/>
</el-form-item>
</el-col>
<el-col :span="24" key="描述col">
<el-form-item key="描述formItem" label="描述" prop="description">
<el-input key="描述input" v-model="formData.description" placeholder="请输入描述" clearable :disabled="formData.name=='默认规则'&&formType=='update'"/>
<el-input key="描述input" v-model="formData.description" placeholder="请输入描述" clearable :disabled="formData.priority==0&&formType=='update'"/>
</el-form-item>
</el-col>
<el-col :span="12" key="优先级col">
<el-form-item key="优先级formItem" label="优先级" prop="priority">
<el-input-number key="优先级input" v-model="formData.priority" :min="1" :disabled="formData.name=='默认规则'&&formType=='update'"/>
<el-input-number key="优先级input" v-model="formData.priority" :min="formData.priority==0&&formType=='update'?0:1" :disabled="formData.priority==0&&formType=='update'"/>
</el-form-item>
</el-col>
<el-col :span="12" key="状态col">
<el-form-item key="状态formItem" label="状态" prop="status">
<el-switch key="状态switch" v-model="formData.status" :disabled="formData.name=='默认规则'&&formType=='update'"/>
<el-switch key="状态switch" v-model="formData.status" :disabled="formData.priority==0&&formType=='update'"/>
</el-form-item>
</el-col>
</el-row>
@ -60,7 +60,7 @@
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
@ -75,7 +75,7 @@
style="flex: 1"
clearable
@change="changeSupplierType"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.SUPPLIER_TYPE)"
@ -95,7 +95,7 @@
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
@ -111,7 +111,7 @@
clearable
multiple
collapse-tags
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
v-for="cur in options.supplierList"

4
src/views/wms/basicDataManage/strategySetting/strategy/arrivalInspectionStrategy/index.vue

@ -144,8 +144,8 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hasPermi: 'wms:itembasic:update' }), //
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,0), hasPermi: 'wms:itembasic:delete' }), //
defaultButtons.mainListEditBtn(null), //
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,0)}), //
]
}

28
src/views/wms/basicDataManage/strategySetting/strategy/batchStrategy/AddForm.vue

@ -25,22 +25,22 @@
</el-col>
<el-col :span="24" key="名称col">
<el-form-item label="名称" prop="name" key="名称formItem">
<el-input key="名称input" v-model="formData.name" placeholder="请输入名称" clearable :disabled="formData.name=='默认规则'&&formType=='update'"/>
<el-input key="名称input" v-model="formData.name" placeholder="请输入名称" clearable :disabled="formData.priority==0&&formType=='update'"/>
</el-form-item>
</el-col>
<el-col :span="24" key="描述col">
<el-form-item label="描述" prop="description" key="描述formItem">
<el-input key="描述input" v-model="formData.description" placeholder="请输入描述" clearable :disabled="formData.name=='默认规则'&&formType=='update'"/>
<el-input key="描述input" v-model="formData.description" placeholder="请输入描述" clearable :disabled="formData.priority==0&&formType=='update'"/>
</el-form-item>
</el-col>
<el-col :span="12" key="优先级col">
<el-form-item label="优先级" prop="priority" key="优先级formItem">
<el-input-number key="优先级input" v-model="formData.priority" :min="1" :disabled="formData.name=='默认规则'&&formType=='update'"/>
<el-input-number key="优先级input" v-model="formData.priority" :min="formData.priority==0&&formType=='update'?0:1" :disabled="formData.priority==0&&formType=='update'"/>
</el-form-item>
</el-col>
<el-col :span="12" key="状态col">
<el-form-item label="状态" prop="status" key="状态formItem">
<el-switch key="状态input" v-model="formData.status" :disabled="formData.name=='默认规则'&&formType=='update'"/>
<el-switch key="状态input" v-model="formData.status" :disabled="formData.priority==0&&formType=='update'"/>
</el-form-item>
</el-col>
</el-row>
@ -58,7 +58,7 @@
placeholder=""
style="width: 110px; margin-right: 10px"
@change="changeSupplierCustomer"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
@ -71,7 +71,7 @@
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
@ -87,7 +87,7 @@
clearable
multiple
collapse-tags
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
v-for="cur in options.supplierList"
@ -104,7 +104,7 @@
placeholder=""
@change="changeItemsType"
style="width: 110px; margin-right: 10px"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="item.label"
@ -117,7 +117,7 @@
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
@ -134,7 +134,7 @@
multiple
collapse-tags
v-if="item.ParamCode == 'ItemType'"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
v-for="cur in getStrDictOptions(DICT_TYPE.ITEM_TYPE)"
@ -151,7 +151,7 @@
multiple
collapse-tags
v-else-if="item.ParamCode == 'AbcClass'"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
v-for="cur in getStrDictOptions(DICT_TYPE.ABC_CLASS)"
@ -166,7 +166,7 @@
clearable
style="flex: 1"
v-else-if="item.ParamCode == 'ItemGroup'"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
/>
<el-input :key="'项目Value'+index"
v-model="item.Value"
@ -174,7 +174,7 @@
clearable
style="flex: 1"
v-else-if="item.ParamCode == 'Project'"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
/>
<el-input :key="'物料Value'+index"
v-model="item.Value"
@ -182,7 +182,7 @@
clearable
style="flex: 1"
v-else-if="item.ParamCode == 'ItemCode'"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
/>
</el-form-item>
</el-col>

4
src/views/wms/basicDataManage/strategySetting/strategy/batchStrategy/index.vue

@ -144,8 +144,8 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hasPermi: 'wms:itembasic:update' }), //
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,0), hasPermi: 'wms:itembasic:delete' }), //
defaultButtons.mainListEditBtn(null), //
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,0)}), //
]
}

1208
src/views/wms/basicDataManage/strategySetting/strategy/deliverStrategy/AddForm.vue

File diff suppressed because it is too large

170
src/views/wms/basicDataManage/strategySetting/strategy/deliverStrategy/index.vue

@ -0,0 +1,170 @@
<!-- 下架策略 -->
<template>
<!-- 搜索工作栏 -->
<ContentWrap>
<el-form class="-mb-15px" :model="queryParams" ref="queryFormRef" :inline="true" label-width="68px">
<el-form-item label="策略名称" prop="name">
<el-input v-model="queryParams.name" placeholder="请输入策略名称" clearable @keyup.enter="handleQuery"
class="!w-240px" />
</el-form-item>
<el-form-item label="优先级" prop="priority">
<el-input v-model.number="queryParams.priority" type="number" oninput ="value=value.replace(/[^\d]/g,'')" placeholder="请输入优先级" clearable @keyup.enter="handleQuery" class="!w-240px" />
</el-form-item>
<el-form-item>
<el-button type="info" plain @click="handleQuery">
<Icon icon="ep:search" class="mr-5px" /> 搜索
</el-button>
<el-button type="info" plain @click="resetQuery">
<Icon icon="ep:refresh" class="mr-5px" /> 重置
</el-button>
</el-form-item>
</el-form>
</ContentWrap>
<!-- 列表头部 -->
<TableHead :HeadButttondata="HeadButttondata" @buttonBaseClick="buttonBaseClick" />
<!-- 列表 -->
<ContentWrap>
<el-table v-clientTable v-loading="loading" :data="list" :default-sort="{ prop: 'priority', order: 'null' }">
<el-table-column align="center" label="策略代码" prop="strategyCode" />
<el-table-column align="center" label="策略名称" prop="name" show-overflow-tooltip />
<el-table-column align="center" label="策略描述" prop="description" />
<el-table-column align="center" label="优先级" prop="priority" sortable/>
<el-table-column align="center" label="状态" prop="status">
<template #default="scope">
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column align="center" label="操作" fixed="right" width="240">
<template #default="scope">
<ButtonBase :Butttondata="butttondata(scope.row)" @button-base-click="buttonTableClick($event, scope.row)" />
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<Pagination v-model:limit="queryParams.pageSize" v-model:page="queryParams.pageNo" :total="total"
@pagination="getList" />
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<AddForm ref="formRef" @success="getList" />
</template>
<script setup lang="ts">
import { DICT_TYPE } from '@/utils/dict'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as RuleApi from '@/api/wms/rule'
import AddForm from './AddForm.vue'
defineOptions({ name: 'SupplieDeliveryStrategy' })
const queryFormRef = ref() //
const { t } = useI18n() //
const message = useMessage() //
const loading = ref(true) //
const total = ref(0) //
const list = ref([]) //
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
strategyCode: 'S012',
})
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
const data = await RuleApi.getRulePage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.pageNo = 1
getList()
}
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value.resetFields()
handleQuery()
}
//
const formRef = ref()
const openForm = (type: string, strategyCode: string, id: number) => {
formRef.value.open(type, strategyCode, id)
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await RuleApi.deleteRule(id)
message.success(t('common.delSuccess'))
//
buttonBaseClick('refresh',null)
} catch { }
}
//
const HeadButttondata = [
defaultButtons.defaultAddBtn(null), //
]
//
const buttonBaseClick = (val, item) => {
console.log('buttonBaseClick',val)
if (val == 'add') { //
openForm('create', queryParams.strategyCode)
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
//
const isShowMainButton = (row,val) => {
if (val == row.priority) {
return true
} else {
return false
}
}
// -
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn(null), //
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,0)}), //
]
}
// -
const buttonTableClick = (val, row) => {
if (val == 'edit') { //
openForm('update', queryParams.strategyCode, row.id)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 初始化 **/
onMounted(() => {
getList()
})
</script>

550
src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue

@ -26,22 +26,22 @@
</el-col>
<el-col :span="24">
<el-form-item label="名称" prop="name">
<el-input key="name" v-model="formData.name" placeholder="请输入名称" clearable :disabled="formData.name=='默认规则'&&formType=='update'"/>
<el-input key="name" v-model="formData.name" placeholder="请输入名称" clearable :disabled="formData.priority==0&&formType=='update'"/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="描述" prop="description">
<el-input key="description" v-model="formData.description" placeholder="请输入描述" clearable :disabled="formData.name=='默认规则'&&formType=='update'"/>
<el-input key="description" v-model="formData.description" placeholder="请输入描述" clearable :disabled="formData.priority==0&&formType=='update'"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="优先级" prop="priority">
<el-input-number key="priority" v-model="formData.priority" :min="1" :disabled="formData.name=='默认规则'&&formType=='update'"/>
<el-input-number key="priority" v-model="formData.priority" :min="formData.priority==0&&formType=='update'?0:1" :disabled="formData.priority==0&&formType=='update'"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="状态" prop="status">
<el-switch key="status" v-model="formData.status" :disabled="formData.name=='默认规则'&&formType=='update'"/>
<el-switch key="status" v-model="formData.status" :disabled="formData.priority==0&&formType=='update'"/>
</el-form-item>
</el-col>
</el-row>
@ -54,53 +54,53 @@
<el-row key="规则条件row" :gutter="10">
<el-col key="供应商和客户col" :span="24" v-for="(item, index) in formData.condition" :key="index">
<!-- 选择供应商和客户 -->
<el-form-item key="供应商和客户formItem" label="" label-width="0" class="err-240" v-if="index == 0">
<el-select key="供应商和客户"
v-model="item.ParamCode"
placeholder=""
style="width: 110px; margin-right: 10px"
@change="changeSupplierCustomer"
:disabled="formData.name=='默认规则'&&formType=='update'"
>
<el-option
:label="cur.label"
:value="cur.value"
v-for="(cur, index) in options.typeOptions"
:key="'供应商和客户'+cur.value"
/>
</el-select>
<el-select key="供应商和客户Operator"
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
:disabled="formData.name=='默认规则'&&formType=='update'"
>
<el-option
:label="cur.label"
:value="cur.value"
v-for="cur in options.rangeOptions1"
:key="'供应商和客户Operator'+cur.value"
/>
</el-select>
<el-select key="供应商和客户Value"
v-model="item.Value"
:placeholder="`请选择${item.ParamCode == 'SupplierCode' ? '供应商' : '客户'}`"
style="flex: 1"
clearable
multiple
collapse-tags
filterable
:filter-method="filterMethod"
:disabled="formData.name=='默认规则'&&formType=='update'"
>
<el-option
v-for="cur in options.supplierList"
:key="'供应商和客户Value'+cur.code"
:label="cur.name"
:value="cur.code"
/>
</el-select>
</el-form-item>
<!-- <el-form-item key="供应商和客户formItem" label="" label-width="0" class="err-240" v-if="index == 0">-->
<!-- <el-select key="供应商和客户"-->
<!-- v-model="item.ParamCode"-->
<!-- placeholder=""-->
<!-- style="width: 110px; margin-right: 10px"-->
<!-- @change="changeSupplierCustomer"-->
<!-- :disabled="formData.priority==0&&formType=='update'"-->
<!-- >-->
<!-- <el-option-->
<!-- :label="cur.label"-->
<!-- :value="cur.value"-->
<!-- v-for="(cur, index) in options.typeOptions"-->
<!-- :key="'供应商和客户'+cur.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- <el-select key="供应商和客户Operator"-->
<!-- v-model="item.Operator"-->
<!-- placeholder="请选择范围"-->
<!-- style="width: 110px; margin-right: 10px"-->
<!-- :disabled="formData.priority==0&&formType=='update'"-->
<!-- >-->
<!-- <el-option-->
<!-- :label="cur.label"-->
<!-- :value="cur.value"-->
<!-- v-for="cur in options.rangeOptions1"-->
<!-- :key="'供应商和客户Operator'+cur.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- <el-select key="供应商和客户Value"-->
<!-- v-model="item.Value"-->
<!-- :placeholder="`请选择${item.ParamCode == 'SupplierCode' ? '供应商' : '客户'}`"-->
<!-- style="flex: 1"-->
<!-- clearable-->
<!-- multiple-->
<!-- collapse-tags-->
<!-- filterable-->
<!-- :filter-method="filterMethod"-->
<!-- :disabled="formData.priority==0&&formType=='update'"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="cur in options.supplierList"-->
<!-- :key="'供应商和客户Value'+cur.code"-->
<!-- :label="cur.name"-->
<!-- :value="cur.code"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- 选择物料类型 -->
<el-form-item key="物料类型formItem" label="" label-width="0" class="err-240" v-if="index == 1">
<el-select key="物料类型"
@ -108,7 +108,7 @@
placeholder=""
@change="changeItemsType"
style="width: 110px; margin-right: 10px"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="item.label"
@ -121,7 +121,7 @@
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
@ -138,7 +138,7 @@
multiple
collapse-tags
v-if="item.ParamCode == 'ItemType'"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
v-for="cur in getStrDictOptions(DICT_TYPE.ITEM_TYPE)"
@ -155,7 +155,7 @@
multiple
collapse-tags
v-else-if="item.ParamCode == 'AbcClass'"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
v-for="cur in getStrDictOptions(DICT_TYPE.ABC_CLASS)"
@ -164,6 +164,25 @@
:value="cur.value"
/>
</el-select>
<el-select key="物料状态"
v-model="item.Value"
placeholder="请选择物料状态"
style="flex: 1"
clearable
multiple
collapse-tags
v-else-if="item.ParamCode == 'ItemStatus'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
v-for="cur in getStrDictOptions(DICT_TYPE.ITEM_STATUS)"
:key="'物料状态'+cur.value"
:label="cur.label"
:value="cur.value"
/>
</el-select>
<el-select key="物料分组"
v-model="item.Value"
placeholder="请输入物料分组,多个物料分组以逗号分隔"
@ -172,7 +191,7 @@
multiple
collapse-tags
v-if="item.ParamCode == 'ItemGroup'"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
v-for="cur in getStrDictOptions(DICT_TYPE.ITEM_GROUP)"
@ -194,7 +213,7 @@
clearable
style="flex: 1"
v-else-if="item.ParamCode == 'Project'"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
/>
<el-input key="物料"
v-model="item.Value"
@ -202,136 +221,130 @@
clearable
style="flex: 1"
v-else-if="item.ParamCode == 'ItemCode'"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
/>
</el-form-item>
<!-- 选择重量体积还是面积 -->
<el-form-item key="重量体积或面积formItem" label="" label-width="0" class="err-240" v-if="index == 2">
<el-select key="重量体积或面积"
v-model="item.ParamCode"
placeholder=""
@change="changeCalculation"
style="width: 110px; margin-right: 10px"
:disabled="formData.name=='默认规则'&&formType=='update'"
>
<el-option
:label="cur.label"
:value="cur.value"
v-for="cur in options.calculationTypeOptions"
:key="'重量体积或面积'+cur.value"
/>
</el-select>
<el-select key="重量体积或面积Operator"
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
:disabled="formData.name=='默认规则'&&formType=='update'"
>
<el-option
:label="cur.label"
:value="cur.value"
v-for="cur in options.rangeOptions2"
:key="'重量体积或面积Operator'+cur.value"
/>
</el-select>
<el-input key="重量体积或面积Value"
v-model="item.Value"
:placeholder="`请输入${
item.ParamCode == 'Weight' ? '重量' : item.ParamCode == 'Area' ? '面积' : '体积'
}`"
clearable
style="flex: 1"
:disabled="formData.name=='默认规则'&&formType=='update'"
/>
</el-form-item>
<!-- <el-form-item key="重量体积或面积formItem" label="" label-width="0" class="err-240" v-if="index == 2">-->
<!-- <el-select key="重量体积或面积"-->
<!-- v-model="item.ParamCode"-->
<!-- placeholder=""-->
<!-- @change="changeCalculation"-->
<!-- style="width: 110px; margin-right: 10px"-->
<!-- :disabled="formData.priority==0&&formType=='update'"-->
<!-- >-->
<!-- <el-option-->
<!-- :label="cur.label"-->
<!-- :value="cur.value"-->
<!-- v-for="cur in options.calculationTypeOptions"-->
<!-- :key="'重量体积或面积'+cur.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- <el-select key="重量体积或面积Operator"-->
<!-- v-model="item.Operator"-->
<!-- placeholder="请选择范围"-->
<!-- style="width: 110px; margin-right: 10px"-->
<!-- :disabled="formData.priority==0&&formType=='update'"-->
<!-- >-->
<!-- <el-option-->
<!-- :label="cur.label"-->
<!-- :value="cur.value"-->
<!-- v-for="cur in options.rangeOptions2"-->
<!-- :key="'重量体积或面积Operator'+cur.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- <el-input key="重量体积或面积Value"-->
<!-- v-model="item.Value"-->
<!-- :placeholder="`请输入${-->
<!-- item.ParamCode == 'Weight' ? '重量' : item.ParamCode == 'Area' ? '面积' : '体积'-->
<!-- }`"-->
<!-- clearable-->
<!-- style="flex: 1"-->
<!-- :disabled="formData.priority==0&&formType=='update'"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- 库存状态 -->
<el-form-item key="库存状态formItem" label="库存状态" class="err-120" v-if="index == 3">
<el-select key="库存状态Operator"
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
:disabled="formData.name=='默认规则'&&formType=='update'"
>
<el-option
:label="cur.label"
:value="cur.value"
v-for="cur in options.rangeOptions1"
:key="'库存状态Operator'+cur.value"
/>
</el-select>
<el-select key="库存状态Value"
v-model="item.Value"
placeholder="请选择库存状态"
style="flex: 1"
clearable
multiple
collapse-tags
:disabled="formData.name=='默认规则'&&formType=='update'"
>
<el-option
v-for="cur in getStrDictOptions(DICT_TYPE.INVENTORY_STATUS)"
:key="'库存状态Value'+cur.value"
:label="cur.label"
:value="cur.value"
/>
</el-select>
</el-form-item>
<!-- <el-form-item key="库存状态formItem" label="库存状态" class="err-120" v-if="index == 3">-->
<!-- <el-select key="库存状态Operator"-->
<!-- v-model="item.Operator"-->
<!-- placeholder="请选择范围"-->
<!-- style="width: 110px; margin-right: 10px"-->
<!-- :disabled="formData.priority==0&&formType=='update'"-->
<!-- >-->
<!-- <el-option-->
<!-- :label="cur.label"-->
<!-- :value="cur.value"-->
<!-- v-for="cur in options.rangeOptions1"-->
<!-- :key="'库存状态Operator'+cur.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- <el-select key="库存状态Value"-->
<!-- v-model="item.Value"-->
<!-- placeholder="请选择库存状态"-->
<!-- style="flex: 1"-->
<!-- clearable-->
<!-- multiple-->
<!-- collapse-tags-->
<!-- :disabled="formData.priority==0&&formType=='update'"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="cur in getStrDictOptions(DICT_TYPE.INVENTORY_STATUS)"-->
<!-- :key="'库存状态Value'+cur.value"-->
<!-- :label="cur.label"-->
<!-- :value="cur.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- 存储类型 -->
<el-form-item key="存储类型formItem" label="存储类型" class="err-120" v-if="index == 4">
<el-select key="存储类型Operator"
<!-- <el-form-item key="存储类型formItem" label="存储类型" class="err-120" v-if="index == 4">-->
<!-- <el-select key="存储类型Operator"-->
<!-- v-model="item.Operator"-->
<!-- placeholder="请选择范围"-->
<!-- style="width: 110px; margin-right: 10px"-->
<!-- :disabled="formData.priority==0&&formType=='update'"-->
<!-- >-->
<!-- <el-option-->
<!-- :label="cur.label"-->
<!-- :value="cur.value"-->
<!-- v-for="cur in options.rangeOptions1"-->
<!-- :key="'存储类型Operator'+cur.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- <el-select key="存储类型Value"-->
<!-- v-model="item.Value"-->
<!-- placeholder="请选择存储类型"-->
<!-- style="flex: 1"-->
<!-- clearable-->
<!-- multiple-->
<!-- collapse-tags-->
<!-- :disabled="formData.priority==0&&formType=='update'"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="cur in getStrDictOptions(DICT_TYPE.STORAGE_TYPE)"-->
<!-- :key="'存储类型Value'+cur.value"-->
<!-- :label="cur.label"-->
<!-- :value="cur.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- 生产线 -->
<el-form-item key="生产线formItem" label="生产线" class="err-120" v-if="index == 5">
<el-select key="生产线Operator"
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
:value="cur.value"
v-for="cur in options.rangeOptions1"
:key="'存储类型Operator'+cur.value"
:key="'生产线Operator'+cur.value"
/>
</el-select>
<el-select key="存储类型Value"
v-model="item.Value"
placeholder="请选择存储类型"
style="flex: 1"
clearable
multiple
collapse-tags
:disabled="formData.name=='默认规则'&&formType=='update'"
>
<el-option
v-for="cur in getStrDictOptions(DICT_TYPE.STORAGE_TYPE)"
:key="'存储类型Value'+cur.value"
:label="cur.label"
:value="cur.value"
/>
</el-select>
</el-form-item>
<!-- 库存事务 -->
<el-form-item key="库存事务formItem" label="库存事务" class="err-120" v-if="index == 5">
<el-select key="库存事务Operator"
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
:disabled="formData.name=='默认规则'&&formType=='update'"
>
<el-option
:label="cur.label"
:value="cur.value"
v-for="cur in options.rangeOptions1"
:key="'库存事务Operator'+cur.value"
/>
</el-select>
<!-- <el-input key="库存事务Value"
v-model="item.Value"
placeholder="请输入库存事务,多个库存事务以逗号分隔"
clearable
style="flex: 1"
/> -->
<el-input key="库存事务Value" style="flex:1" placeholder="请选择库存事务" disabled v-model="item.Value" @blur="blurTransactionType">
<el-input key="生产线Value" style="flex:1" placeholder="请选择生产线" disabled v-model="item.Value" @blur="blurTransactionType">
<template #suffix>
<el-button :disabled="formData.name=='默认规则'&&formType=='update'" type="text" plain style="color:var(--el-button-text-color)" @click="searchTransactionType">
<el-button :disabled="formData.priority==0&&formType=='update'" type="text" plain style="color:var(--el-button-text-color)" @click="searchTransactionType">
<Icon icon="ep:search" class="mr-5px" />
</el-button>
</template>
@ -544,91 +557,91 @@
</el-form-item>
</el-col>
<!-- 优先整包 -->
<el-col :span="24">
<el-form-item key="优先整包formItem" label="优先整包">
<el-switch key="优先整包"
v-model="formData.configuration.EntirePackageFirst"
active-value="TRUE"
inactive-value="FALSE"
/>
</el-form-item>
</el-col>
<!-- <el-col :span="24">-->
<!-- <el-form-item key="优先整包formItem" label="优先整包">-->
<!-- <el-switch key="优先整包"-->
<!-- v-model="formData.configuration.EntirePackageFirst"-->
<!-- active-value="TRUE"-->
<!-- inactive-value="FALSE"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- 发料包装类型 -->
<el-col key="发料包装类型col" :span="24">
<el-form-item key="发料包装类型formItem" label="发料包装类型">
<div class="checkbox">
<el-radio-group key="发料包装类型" v-model="formData.configuration.IssueStorageType">
<el-radio
:label="cur.value"
v-for="cur in getStrDictOptions(DICT_TYPE.STORAGE_TYPE)"
:key="'发料包装类型'+cur.value"
>{{ cur.label }}</el-radio
>
</el-radio-group>
</div>
</el-form-item>
</el-col>
<!-- <el-col key="发料包装类型col" :span="24">-->
<!-- <el-form-item key="发料包装类型formItem" label="发料包装类型">-->
<!-- <div class="checkbox">-->
<!-- <el-radio-group key="发料包装类型" v-model="formData.configuration.IssueStorageType">-->
<!-- <el-radio-->
<!-- :label="cur.value"-->
<!-- v-for="cur in getStrDictOptions(DICT_TYPE.STORAGE_TYPE)"-->
<!-- :key="'发料包装类型'+cur.value"-->
<!-- >{{ cur.label }}</el-radio-->
<!-- >-->
<!-- </el-radio-group>-->
<!-- </div>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- 多次发料 -->
<el-col key="多次发料col" :span="7">
<el-form-item key="多次发料formItem" label="多次发料">
<el-switch key="多次发料"
v-model="formData.configuration.IsSplit"
active-value="TRUE"
inactive-value="FALSE"
/>
</el-form-item>
</el-col>
<!-- <el-col key="多次发料col" :span="7">-->
<!-- <el-form-item key="多次发料formItem" label="多次发料">-->
<!-- <el-switch key="多次发料"-->
<!-- v-model="formData.configuration.IsSplit"-->
<!-- active-value="TRUE"-->
<!-- inactive-value="FALSE"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- 拆分次数 -->
<el-col key="拆分次数col" :span="8">
<el-form-item key="拆分次数formItem" label="拆分次数" label-width="70px">
<el-input-number key="拆分次数"
v-model="formData.configuration.EachTimeQty"
:min="0"
controls-position="right"
/>
</el-form-item>
</el-col>
<!-- <el-col key="拆分次数col" :span="8">-->
<!-- <el-form-item key="拆分次数formItem" label="拆分次数" label-width="70px">-->
<!-- <el-input-number key="拆分次数"-->
<!-- v-model="formData.configuration.EachTimeQty"-->
<!-- :min="0"-->
<!-- controls-position="right"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- 时间间隔 -->
<el-col key="时间间隔col" :span="9">
<el-form-item key="时间间隔formItem" label="时间间隔" label-width="70px">
<el-input-number key="时间间隔"
v-model="formData.configuration.TimeInterval"
:min="0"
style="flex: 1; margin-right: 10px"
controls-position="right"
/>
</el-form-item>
</el-col>
<!-- <el-col key="时间间隔col" :span="9">-->
<!-- <el-form-item key="时间间隔formItem" label="时间间隔" label-width="70px">-->
<!-- <el-input-number key="时间间隔"-->
<!-- v-model="formData.configuration.TimeInterval"-->
<!-- :min="0"-->
<!-- style="flex: 1; margin-right: 10px"-->
<!-- controls-position="right"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- 使用整理库位-->
<el-col key="使用整理库位col" :span="24">
<el-form-item key="使用整理库位formItem" label="使用整理库位">
<el-switch key="使用整理库位"
v-model="formData.configuration.UseOrganizeLocation"
active-value="TRUE"
inactive-value="FALSE"
/>
</el-form-item>
</el-col>
<!-- <el-col key="使用整理库位col" :span="24">-->
<!-- <el-form-item key="使用整理库位formItem" label="使用整理库位">-->
<!-- <el-switch key="使用整理库位"-->
<!-- v-model="formData.configuration.UseOrganizeLocation"-->
<!-- active-value="TRUE"-->
<!-- inactive-value="FALSE"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- 使用在途库位 -->
<el-col key="使用在途库位col" :span="24">
<el-form-item key="使用在途库位formItem" label="使用在途库位">
<el-switch key="使用在途库位"
v-model="formData.configuration.UseTransportLocation"
active-value="TRUE"
inactive-value="FALSE"
/>
</el-form-item>
</el-col>
<!-- <el-col key="使用在途库位col" :span="24">-->
<!-- <el-form-item key="使用在途库位formItem" label="使用在途库位">-->
<!-- <el-switch key="使用在途库位"-->
<!-- v-model="formData.configuration.UseTransportLocation"-->
<!-- active-value="TRUE"-->
<!-- inactive-value="FALSE"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- 生成接收任务 -->
<el-col key="生成接收任务col" :span="24">
<el-form-item key="生成接收任务formItem" label="生成接收任务">
<el-switch key="生成接收任务"
v-model="formData.configuration.CreateReceiptJob"
active-value="TRUE"
inactive-value="FALSE"
/>
</el-form-item>
</el-col>
<!-- <el-col key="生成接收任务col" :span="24">-->
<!-- <el-form-item key="生成接收任务formItem" label="生成接收任务">-->
<!-- <el-switch key="生成接收任务"-->
<!-- v-model="formData.configuration.CreateReceiptJob"-->
<!-- active-value="TRUE"-->
<!-- inactive-value="FALSE"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
</el-row>
</div>
</el-form>
@ -665,9 +678,8 @@ import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/l
import { isString } from '@/utils/is'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import * as TransactiontypeApi from '@/api/wms/transactiontype'
import { Transactiontype } from '@/views/wms/basicDataManage/documentSetting/transactiontype/transactiontype.data'
import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data'
import * as ProductionlineApi from '@/api/wms/productionline'
const { t } = useI18n() //
@ -693,18 +705,10 @@ const formData = ref({
status: true, //
//
condition: [
//
{ ParamCode: 'SupplierCode', Operator: 'IN', Value: '' },
// ///abc//
{ ParamCode: 'ItemType', Operator: 'IN', Value: '' },
// //
{ ParamCode: 'Weight', Operator: '>', Value: [] },
//
{ ParamCode: 'InventoryStatus', Operator: 'IN', Value: [] },
//
{ ParamCode: 'StorageType', Operator: 'IN', Value: [] },
//
{ ParamCode: 'TransactionType', Operator: 'IN', Value: '' }
// 线
{ ParamCode: 'Productionline', Operator: 'IN', Value: '' }
],
configuration: {
//
@ -789,7 +793,8 @@ const options = reactive({
{ value: 'ItemGroup', label: '物料分组' },
{ value: 'ItemCode', label: '物料' },
{ value: 'Project', label: '项目' },
{ value: 'AbcClass', label: 'ABC类' }
{ value: 'AbcClass', label: 'ABC类' },
{ value: 'ItemStatus', label: '物料状态' }
],
//
calculationTypeOptions: [
@ -1007,10 +1012,10 @@ const blurWarehouse = async ()=>{
//
const searchTransactionType = ()=>{
searchTableRef.value.open(
'请选择事务类型',
Transactiontype.allSchemas,
TransactiontypeApi.getTransactiontypePage,
'TransactionType',
'请选择生产线',
Productionline.allSchemas,
ProductionlineApi.getProductionlinePage,
'Productionline',
'code',
true,
undefined,
@ -1096,8 +1101,8 @@ const searchWarehouse = ()=>{
}
const searchTableSuccess = (formField, searchField, val, type, row) => {
if(formField=='TransactionType'){
let transactionType = formData.value.condition.find(item=>item['ParamCode']=='TransactionType')
if(formField=='Productionline'){
let transactionType = formData.value.condition.find(item=>item['ParamCode']=='Productionline')
if(transactionType){
transactionType.Value = val.map(item=>(item['code'])).join(',')
}
@ -1164,11 +1169,14 @@ const open = async (type: string, strategyCode: string, id?: number) => {
if (data.condition) {
formData.value.condition = JSON.parse(data.condition)
formData.value.condition.forEach((item, index) => {
console.log(item)
if ((item.Operator == 'IN' || item.Operator == 'NOT IN')&& Array.isArray(item.Value)) {
console.log(item.Value)
item.Value = item.Value.split(',')
}
})
}
console.log(formData.value.condition)
if (data.configuration) {
formData.value.configuration = JSON.parse(data.configuration)
}
@ -1298,8 +1306,8 @@ const resetForm = () => {
{ ParamCode: 'InventoryStatus', Operator: 'IN', Value: [] },
//
{ ParamCode: 'StorageType', Operator: 'IN', Value: [] },
//
{ ParamCode: 'TransactionType', Operator: 'IN', Value: '' }
// 线
{ ParamCode: 'Productionline', Operator: 'IN', Value: '' }
],
configuration: {

4
src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/index.vue

@ -148,8 +148,8 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hasPermi: 'wms:itembasic:update' }), //
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,0), hasPermi: 'wms:itembasic:delete' }), //
defaultButtons.mainListEditBtn(null), //
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,0)}), //
]
}

20
src/views/wms/basicDataManage/strategySetting/strategy/inspectStrategy/AddForm.vue

@ -26,22 +26,22 @@
</el-col>
<el-col :span="24" key="名称col">
<el-form-item key="名称formItem" label="名称" prop="name">
<el-input key="名称input" v-model="formData.name" placeholder="请输入名称" clearable :disabled="formData.name=='默认规则'&&formType=='update'"/>
<el-input key="名称input" v-model="formData.name" placeholder="请输入名称" clearable :disabled="formData.priority==0&&formType=='update'"/>
</el-form-item>
</el-col>
<el-col :span="24" key="描述col">
<el-form-item key="描述formItem" label="描述" prop="description">
<el-input key="描述input" v-model="formData.description" placeholder="请输入描述" clearable :disabled="formData.name=='默认规则'&&formType=='update'"/>
<el-input key="描述input" v-model="formData.description" placeholder="请输入描述" clearable :disabled="formData.priority==0&&formType=='update'"/>
</el-form-item>
</el-col>
<el-col :span="12" key="优先级col">
<el-form-item key="优先级formItem" label="优先级" prop="priority">
<el-input-number key="优先级input" v-model="formData.priority" :min="1" :disabled="formData.name=='默认规则'&&formType=='update'"/>
<el-input-number key="优先级input" v-model="formData.priority" :min="formData.priority==0&&formType=='update'?0:1" :disabled="formData.priority==0&&formType=='update'"/>
</el-form-item>
</el-col>
<el-col :span="12" key="状态col">
<el-form-item key="状态formItem" label="状态" prop="status">
<el-switch key="状态switch" v-model="formData.status" :disabled="formData.name=='默认规则'&&formType=='update'"/>
<el-switch key="状态switch" v-model="formData.status" :disabled="formData.priority==0&&formType=='update'"/>
</el-form-item>
</el-col>
</el-row>
@ -57,7 +57,7 @@
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
@ -72,7 +72,7 @@
style="flex: 1"
clearable
@change="changeSupplierType"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.SUPPLIER_TYPE)"
@ -98,7 +98,7 @@
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
@ -112,7 +112,7 @@
placeholder="请选择供应商"
style="flex: 1"
clearable
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
v-for="cur in options.supplierList"
@ -128,7 +128,7 @@
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
@ -142,7 +142,7 @@
placeholder="请输入物料,多个物料以逗号分隔"
clearable
style="flex: 1"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
/>
</el-form-item>
</el-col>

4
src/views/wms/basicDataManage/strategySetting/strategy/inspectStrategy/index.vue

@ -142,8 +142,8 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hasPermi: 'wms:itembasic:update' }), //
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,0), hasPermi: 'wms:itembasic:delete' }), //
defaultButtons.mainListEditBtn(null), //
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,0)}), //
]
}

23
src/views/wms/basicDataManage/strategySetting/strategy/manageAccuracyStrategy/AddForm.vue

@ -25,17 +25,17 @@
</el-col>
<el-col :span="24">
<el-form-item label="名称" prop="name">
<el-input v-model="formData.name" placeholder="请输入名称" clearable />
<el-input v-model="formData.name" placeholder="请输入名称" clearable :disabled="formData.priority==0&&formType=='update'" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="描述" prop="description">
<el-input v-model="formData.description" placeholder="请输入描述" clearable />
<el-input v-model="formData.description" placeholder="请输入描述" clearable :disabled="formData.priority==0&&formType=='update'" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="优先级" prop="priority">
<el-input-number v-model="formData.priority" :min="1" />
<el-input-number v-model="formData.priority" :min="formData.priority==0&&formType=='update'?0:1" :disabled="formData.priority==0&&formType=='update'"/>
</el-form-item>
</el-col>
<el-col :span="12">
@ -58,6 +58,7 @@
placeholder=""
style="width: 110px; margin-right: 10px"
@change="changeSupplierCustomer"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
@ -70,6 +71,7 @@
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
@ -85,6 +87,7 @@
clearable
multiple
collapse-tags
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
v-for="cur in options.supplierList"
@ -100,6 +103,7 @@
v-model="item.ParamCode"
placeholder=""
@change="changeItemsType"
:disabled="formData.priority==0&&formType=='update'"
style="width: 110px; margin-right: 10px"
>
<el-option
@ -112,6 +116,7 @@
<el-select
v-model="item.Operator"
placeholder="请选择范围"
:disabled="formData.priority==0&&formType=='update'"
style="width: 110px; margin-right: 10px"
>
<el-option
@ -128,6 +133,7 @@
clearable
multiple
collapse-tags
:disabled="formData.priority==0&&formType=='update'"
v-if="item.ParamCode == 'ItemType'"
>
<el-option
@ -144,6 +150,7 @@
clearable
multiple
collapse-tags
:disabled="formData.priority==0&&formType=='update'"
v-else-if="item.ParamCode == 'AbcClass'"
>
<el-option
@ -158,6 +165,7 @@
placeholder="请输入物料分组,多个物料分组以逗号分隔"
clearable
style="flex: 1"
:disabled="formData.priority==0&&formType=='update'"
v-else-if="item.ParamCode == 'ItemGroup'"
/>
<el-input
@ -165,6 +173,7 @@
placeholder="请输入项目,多个项目以逗号分隔"
clearable
style="flex: 1"
:disabled="formData.priority==0&&formType=='update'"
v-else-if="item.ParamCode == 'Project'"
/>
<el-input
@ -172,6 +181,7 @@
placeholder="请输入物料,多个物料以逗号分隔"
clearable
style="flex: 1"
:disabled="formData.priority==0&&formType=='update'"
v-else-if="item.ParamCode == 'ItemCode'"
/>
</el-form-item>
@ -182,6 +192,7 @@
placeholder=""
style="width: 110px; margin-right: 10px"
@change="changeWarehouse"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
@ -193,6 +204,7 @@
<el-select
v-model="item.Operator"
placeholder="请选择范围"
:disabled="formData.priority==0&&formType=='update'"
style="width: 110px; margin-right: 10px"
>
<el-option
@ -204,6 +216,7 @@
</el-select>
<el-select
v-model="item.Value"
:disabled="formData.priority==0&&formType=='update'"
:placeholder="`请选择${
item.ParamCode == 'WarehouseCode'
? '仓库'
@ -234,6 +247,7 @@
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
@ -249,6 +263,7 @@
multiple
collapse-tags
style="flex: 1"
:disabled="formData.priority==0&&formType=='update'"
/>
</el-form-item>
<!-- 忽略库位 -->
@ -257,6 +272,7 @@
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
@ -272,6 +288,7 @@
multiple
collapse-tags
style="flex: 1"
:disabled="formData.priority==0&&formType=='update'"
/>
</el-form-item>
</el-col>

4
src/views/wms/basicDataManage/strategySetting/strategy/manageAccuracyStrategy/index.vue

@ -150,8 +150,8 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hasPermi: 'wms:itembasic:update' }), //
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,0), hasPermi: 'wms:itembasic:delete' }), //
defaultButtons.mainListEditBtn(null), //
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,0)}), //
]
}

2
src/views/wms/basicDataManage/strategySetting/strategy/purchaseReceiptStrategy/AddForm.vue

@ -36,7 +36,7 @@
</el-col>
<el-col :span="12" key="优先级Col">
<el-form-item key="优先级formItem" label="优先级" prop="priority">
<el-input-number key="优先级input" v-model="formData.priority" :min="1" :disabled="formData.name=='默认规则'&&formType=='update'"/>
<el-input-number key="优先级input" v-model="formData.priority" :min="formData.priority==0&&formType=='update'?0:1" :disabled="formData.priority==0&&formType=='update'"/>
</el-form-item>
</el-col>
<el-col :span="12" key="状态Col">

4
src/views/wms/basicDataManage/strategySetting/strategy/purchaseReceiptStrategy/index.vue

@ -145,8 +145,8 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hasPermi: 'wms:itembasic:update' }), //
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,0), hasPermi: 'wms:itembasic:delete' }), //
defaultButtons.mainListEditBtn(null), //
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,0)}), //
]
}

16
src/views/wms/basicDataManage/strategySetting/strategy/repairMaterialStrategy/AddForm.vue

@ -25,17 +25,17 @@
</el-col>
<el-col :span="24">
<el-form-item label="名称" prop="name">
<el-input v-model="formData.name" placeholder="请输入名称" clearable />
<el-input v-model="formData.name" placeholder="请输入名称" clearable :disabled="formData.priority==0&&formType=='update'" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="描述" prop="description">
<el-input v-model="formData.description" placeholder="请输入描述" clearable />
<el-input v-model="formData.description" placeholder="请输入描述" clearable :disabled="formData.priority==0&&formType=='update'" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="优先级" prop="priority">
<el-input-number v-model="formData.priority" :min="1" />
<el-input-number v-model="formData.priority" :min="formData.priority==0&&formType=='update'?0:1" :disabled="formData.priority==0&&formType=='update'" />
</el-form-item>
</el-col>
<el-col :span="12">
@ -57,6 +57,7 @@
v-model="item.ParamCode"
placeholder=""
@change="changeItemsType"
:disabled="formData.priority==0&&formType=='update'"
style="width: 110px; margin-right: 10px"
>
<el-option
@ -68,6 +69,7 @@
</el-select>
<el-select
v-model="item.Operator"
:disabled="formData.priority==0&&formType=='update'"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
>
@ -85,6 +87,7 @@
clearable
multiple
collapse-tags
:disabled="formData.priority==0&&formType=='update'"
v-if="item.ParamCode == 'ItemType'"
>
<el-option
@ -101,6 +104,7 @@
clearable
multiple
collapse-tags
:disabled="formData.priority==0&&formType=='update'"
v-else-if="item.ParamCode == 'AbcClass'"
>
<el-option
@ -115,6 +119,7 @@
placeholder="请输入物料分组,多个物料分组以逗号分隔"
clearable
style="flex: 1"
:disabled="formData.priority==0&&formType=='update'"
v-else-if="item.ParamCode == 'ItemGroup'"
/>
<el-input
@ -122,6 +127,7 @@
placeholder="请输入项目,多个项目以逗号分隔"
clearable
style="flex: 1"
:disabled="formData.priority==0&&formType=='update'"
v-else-if="item.ParamCode == 'Project'"
/>
<el-input
@ -129,6 +135,7 @@
placeholder="请输入物料,多个物料以逗号分隔"
clearable
style="flex: 1"
:disabled="formData.priority==0&&formType=='update'"
v-else-if="item.ParamCode == 'ItemCode'"
/>
</el-form-item>
@ -139,6 +146,7 @@
placeholder=""
style="width: 110px; margin-right: 10px"
@change="changeWarehouse"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
@ -151,6 +159,7 @@
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
@ -176,6 +185,7 @@
multiple
collapse-tags
style="flex: 1"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
v-for="cur in options.warehouseList"

4
src/views/wms/basicDataManage/strategySetting/strategy/repairMaterialStrategy/index.vue

@ -150,8 +150,8 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hasPermi: 'wms:itembasic:update' }), //
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,0), hasPermi: 'wms:itembasic:delete' }), //
defaultButtons.mainListEditBtn(null), //
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,0)}), //
]
}

28
src/views/wms/basicDataManage/strategySetting/strategy/storageCapacityStrategy/AddForm.vue

@ -25,22 +25,22 @@
</el-col>
<el-col :span="24" key="名称col">
<el-form-item key="名称formItem" label="名称" prop="name">
<el-input key="名称input" v-model="formData.name" placeholder="请输入名称" clearable :disabled="formData.name=='默认规则'&&formType=='update'"/>
<el-input key="名称input" v-model="formData.name" placeholder="请输入名称" clearable :disabled="formData.priority==0&&formType=='update'"/>
</el-form-item>
</el-col>
<el-col :span="24" key="描述col">
<el-form-item key="描述formItem" label="描述" prop="description">
<el-input key="描述input" v-model="formData.description" placeholder="请输入描述" clearable :disabled="formData.name=='默认规则'&&formType=='update'"/>
<el-input key="描述input" v-model="formData.description" placeholder="请输入描述" clearable :disabled="formData.priority==0&&formType=='update'"/>
</el-form-item>
</el-col>
<el-col :span="12" key="优先级col">
<el-form-item key="优先级formItem" label="优先级" prop="priority">
<el-input-number key="优先级input" v-model="formData.priority" :min="1" :disabled="formData.name=='默认规则'&&formType=='update'"/>
<el-input-number key="优先级input" v-model="formData.priority" :min="formData.priority==0&&formType=='update'?0:1" :disabled="formData.priority==0&&formType=='update'"/>
</el-form-item>
</el-col>
<el-col :span="12" key="状态col">
<el-form-item key="状态formItem" label="状态" prop="status">
<el-switch key="优先级switch" v-model="formData.status" :disabled="formData.name=='默认规则'&&formType=='update'"/>
<el-switch key="优先级switch" v-model="formData.status" :disabled="formData.priority==0&&formType=='update'"/>
</el-form-item>
</el-col>
</el-row>
@ -58,7 +58,7 @@
placeholder=""
@change="changeItemsType"
style="width: 110px; margin-right: 10px"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
@ -71,7 +71,7 @@
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
@ -88,7 +88,7 @@
multiple
collapse-tags
v-if="item.ParamCode == 'ItemType'"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
v-for="cur in getStrDictOptions(DICT_TYPE.ITEM_TYPE)"
@ -105,7 +105,7 @@
multiple
collapse-tags
v-else-if="item.ParamCode == 'AbcClass'"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
v-for="cur in getStrDictOptions(DICT_TYPE.ABC_CLASS)"
@ -120,7 +120,7 @@
clearable
style="flex: 1"
v-else-if="item.ParamCode == 'ItemGroup'"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
/>
<el-input :key="'项目Value'+index"
v-model="item.Value"
@ -128,7 +128,7 @@
clearable
style="flex: 1"
v-else-if="item.ParamCode == 'Project'"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
/>
<el-input :key="'物料Value'+index"
v-model="item.Value"
@ -136,7 +136,7 @@
clearable
style="flex: 1"
v-else-if="item.ParamCode == 'ItemCode'"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
/>
</el-form-item>
<!-- 仓库 库区 库位组 库位 -->
@ -146,7 +146,7 @@
placeholder=""
style="width: 110px; margin-right: 10px"
@change="changeWarehouse"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
@ -159,7 +159,7 @@
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
@ -185,7 +185,7 @@
multiple
collapse-tags
style="flex: 1"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
v-for="cur in options.warehouseList"

4
src/views/wms/basicDataManage/strategySetting/strategy/storageCapacityStrategy/index.vue

@ -144,8 +144,8 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hasPermi: 'wms:itembasic:update' }), //
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,0), hasPermi: 'wms:itembasic:delete' }), //
defaultButtons.mainListEditBtn(null), //
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,0)}), //
]
}

18
src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/AddForm.vue

@ -37,7 +37,7 @@
</el-col>
<el-col :span="12" key="优先级col">
<el-form-item key="优先级formItem" :label="t('ts.优先级').replace('ts.','')" prop="priority">
<el-input-number key="优先级input" v-model="formData.priority" :min="1" :disabled="formData.name=='默认规则'&&formType=='update'"/>
<el-input-number key="优先级input" v-model="formData.priority" :min="formData.priority==0&&formType=='update'?0:1" :disabled="formData.priority==0&&formType=='update'"/>
</el-form-item>
</el-col>
<el-col :span="12" key="状态col">
@ -58,8 +58,8 @@
v-model="item.ParamCode"
placeholder=""
style="width: 110px; margin-right: 10px"
:disabled="formData.priority==0&&formType=='update'"
@change="changeWarehouseArea"
:disabled="formData.name=='默认规则'&&formType=='update'"
>
<el-option
:label="cur.label"
@ -72,7 +72,7 @@
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
@change="OperatorChange($event,item)"
>
<el-option
@ -82,8 +82,8 @@
:key="'仓库和库区Operator'+cur.value"
/>
</el-select>
<el-input key="仓库和库区Value" style="flex:1" placeholder="请选择仓库或者库区" v-model="item.Value" @blur="blurWarehouseByCodes" />
<el-button :disabled="formData.name=='默认规则'&&formType=='update'" type="info" plain @click="searchWarehouse">
<el-input key="仓库和库区Value" style="flex:1" placeholder="请选择仓库或者库区" v-model="item.Value" @blur="blurWarehouseByCodes" :disabled="formData.priority==0&&formType=='update'"/>
<el-button type="info" plain @click="searchWarehouse" :disabled="formData.priority==0&&formType=='update'">
<Icon icon="ep:search" />
</el-button>
</el-form-item>
@ -97,7 +97,7 @@
v-model="item.Operator"
:placeholder="t('ts.请选择范围').replace('ts.','')"
style="width: 110px; margin-right: 10px"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
@change="OperatorChange($event,item)"
>
<el-option
@ -107,8 +107,8 @@
:key="'供应商代码Operator'+cur.value"
/>
</el-select>
<el-input key="供应商代码Value" style="flex:1" placeholder="请选择供应商代码" v-model="item.Value" @blur="blurSupplierCode" />
<el-button :disabled="formData.name=='默认规则'&&formType=='update'" type="info" plain @click="searchSupplier">
<el-input key="供应商代码Value" style="flex:1" placeholder="请选择供应商代码" v-model="item.Value" @blur="blurSupplierCode" :disabled="formData.priority==0&&formType=='update'"/>
<el-button type="info" plain @click="searchSupplier" :disabled="formData.priority==0&&formType=='update'">
<Icon icon="ep:search" />
</el-button>
</el-form-item>
@ -146,7 +146,7 @@
<!-- 月台 -->
<el-form-item key="月台formItem" :label="t('ts.月台').replace('ts.','')" prop="configuration.DockCode">
<el-input key="月台Value" style="flex:1" placeholder="请选择月台" v-model="formData.configuration.DockCode" @blur="blurDockCode"/>
<el-button :disabled="formData.name=='默认规则'&&formType=='update'" type="info" plain @click="searchDockCode">
<el-button type="info" plain @click="searchDockCode">
<Icon icon="ep:search" />
</el-button>
</el-form-item>

4
src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/index.vue

@ -173,8 +173,8 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hasPermi: 'wms:strategy:update' }), //
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,0), hasPermi: 'wms:strategy:delete' }), //
defaultButtons.mainListEditBtn(null), //
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,0)}), //
]
}

305
src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue

@ -25,22 +25,22 @@
</el-col>
<el-col :span="24">
<el-form-item label="名称" prop="name">
<el-input key="name" v-model="formData.name" placeholder="请输入名称" clearable :disabled="formData.name=='默认规则'&&formType=='update'"/>
<el-input key="name" v-model="formData.name" placeholder="请输入名称" clearable :disabled="formData.priority==0&&formType=='update'"/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="描述" prop="description">
<el-input key="description" v-model="formData.description" placeholder="请输入描述" clearable :disabled="formData.name=='默认规则'&&formType=='update'"/>
<el-input key="description" v-model="formData.description" placeholder="请输入描述" clearable :disabled="formData.priority==0&&formType=='update'"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="优先级" prop="priority">
<el-input-number key="priority" v-model="formData.priority" :min="1" :disabled="formData.name=='默认规则'&&formType=='update'"/>
<el-input-number key="priority" v-model="formData.priority" :min="formData.priority==0&&formType=='update'?0:1" :disabled="formData.priority==0&&formType=='update'"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="状态" prop="status">
<el-switch key="status" v-model="formData.status" :disabled="formData.name=='默认规则'&&formType=='update'"/>
<el-switch key="status" v-model="formData.status" :disabled="formData.priority==0&&formType=='update'"/>
</el-form-item>
</el-col>
</el-row>
@ -53,12 +53,76 @@
<el-col key="供应商和客户col" :span="24" v-for="(item, index) in formData.condition" :key="'规则条件'+index">
<!-- 选择供应商和客户 -->
<el-form-item key="供应商和客户formItem" label="" label-width="0" class="err-240" v-if="index == 0">
<el-select key="仓库条件"
v-model="item.ParamCode"
placeholder=""
style="width: 110px; margin-right: 10px"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
:value="cur.value"
v-for="(cur, index) in options.warehouseTypeOptions"
:key="'仓库'+cur.value"
/>
</el-select>
<el-select key="供应商和客户Operator"
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
:value="cur.value"
v-for="cur in options.rangeOptions1"
:key="'供应商和客户Operator'+cur.value"
/>
</el-select>
<!-- 仓库 -->
<el-input style="flex:1" v-show="item.ParamCode == 'WarehouseCode'" placeholder="请选择仓库" v-model="item.Value" @blur="blurWarehouse({module:'condition',type:'WarehouseCode'})" :disabled="formData.priority==0&&formType=='update'">
<template #suffix>
<el-button type="text" plain style="color:var(--el-button-text-color)" @click="searchWarehouse({module:'condition',type:'WarehouseCode'})">
<Icon icon="ep:search" class="mr-5px" />
</el-button>
</template>
</el-input>
<!-- 库区 -->
<el-input style="flex:1" v-show="item.ParamCode == 'AreaCode'" placeholder="请选择库区" v-model="item.Value" @blur="blurWarehouse({module:'condition',type:'AreaCode'})">
<template #suffix>
<el-button type="text" plain style="color:var(--el-button-text-color)" @click="searchWarehouse({module:'condition',type:'AreaCode'})">
<Icon icon="ep:search" class="mr-5px" />
</el-button>
</template>
</el-input>
<!-- 库位组 -->
<el-input style="flex:1" v-show="item.ParamCode == 'LocationGroupCode'" placeholder="请选择库位组" v-model="item.Value" @blur="blurWarehouse({module:'condition',type:'LocationGroupCode'})">
<template #suffix>
<el-button type="text" plain style="color:var(--el-button-text-color)" @click="searchWarehouse({module:'condition',type:'LocationGroupCode'})">
<Icon icon="ep:search" class="mr-5px" />
</el-button>
</template>
</el-input>
<!-- 库位 -->
<el-input style="flex:1" v-show="item.ParamCode == 'LocationCode'" placeholder="请选择库位" v-model="item.Value" @blur="blurWarehouse({module:'condition',type:'LocationCode'})">
<template #suffix>
<el-button type="text" plain style="color:var(--el-button-text-color)" @click="searchWarehouse({module:'condition',type:'LocationCode'})">
<Icon icon="ep:search" class="mr-5px" />
</el-button>
</template>
</el-input>
</el-form-item>
<!-- 选择供应商和客户 -->
<!-- <el-form-item key="供应商和客户formItem" label="" label-width="0" class="err-240" v-if="index == 0">
<el-select key="供应商和客户"
v-model="item.ParamCode"
placeholder=""
style="width: 110px; margin-right: 10px"
@change="changeSupplierCustomer"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
@ -71,7 +135,7 @@
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
@ -89,7 +153,7 @@
collapse-tags
filterable
:filter-method="filterMethod"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
v-for="cur in options.supplierList"
@ -98,7 +162,7 @@
:value="cur.code"
/>
</el-select>
</el-form-item>
</el-form-item> -->
<!-- 选择物料类型 -->
<el-form-item key="物料类型formItem" label="" label-width="0" class="err-240" v-if="index == 1">
<el-select key="物料类型"
@ -106,7 +170,7 @@
placeholder=""
@change="changeItemsType"
style="width: 110px; margin-right: 10px"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="item.label"
@ -119,7 +183,7 @@
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
@ -136,7 +200,7 @@
multiple
collapse-tags
v-if="item.ParamCode == 'ItemType'"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
v-for="cur in getStrDictOptions(DICT_TYPE.ITEM_TYPE)"
@ -153,7 +217,7 @@
multiple
collapse-tags
v-else-if="item.ParamCode == 'AbcClass'"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
v-for="cur in getStrDictOptions(DICT_TYPE.ABC_CLASS)"
@ -168,7 +232,7 @@
clearable
style="flex: 1"
v-else-if="item.ParamCode == 'ItemGroup'"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
/>
<el-input key="项目"
v-model="item.Value"
@ -176,7 +240,7 @@
clearable
style="flex: 1"
v-else-if="item.ParamCode == 'Project'"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
/>
<el-input key="物料"
v-model="item.Value"
@ -184,17 +248,17 @@
clearable
style="flex: 1"
v-else-if="item.ParamCode == 'ItemCode'"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
/>
</el-form-item>
<!-- 选择重量体积还是面积 -->
<el-form-item key="重量体积或面积formItem" label="" label-width="0" class="err-240" v-if="index == 2">
<!-- <el-form-item key="重量体积或面积formItem" label="" label-width="0" class="err-240" v-if="index == 2">
<el-select key="重量体积或面积"
v-model="item.ParamCode"
placeholder=""
@change="changeCalculation"
style="width: 110px; margin-right: 10px"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
@ -207,7 +271,7 @@
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
@ -223,16 +287,16 @@
}`"
clearable
style="flex: 1"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
/>
</el-form-item>
</el-form-item> -->
<!-- 库存状态 -->
<el-form-item key="库存状态formItem" label="库存状态" class="err-120" v-if="index == 3">
<!-- <el-form-item key="库存状态formItem" label="库存状态" class="err-120" v-if="index == 3">
<el-select key="库存状态Operator"
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
@ -248,7 +312,7 @@
clearable
multiple
collapse-tags
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
v-for="cur in getStrDictOptions(DICT_TYPE.INVENTORY_STATUS)"
@ -257,14 +321,14 @@
:value="cur.value"
/>
</el-select>
</el-form-item>
</el-form-item> -->
<!-- 存储类型 -->
<el-form-item key="存储类型formItem" label="存储类型" class="err-120" v-if="index == 4">
<!-- <el-form-item key="存储类型formItem" label="存储类型" class="err-120" v-if="index == 4">
<el-select key="存储类型Operator"
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
@ -280,7 +344,7 @@
clearable
multiple
collapse-tags
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
v-for="cur in getStrDictOptions(DICT_TYPE.STORAGE_TYPE)"
@ -289,14 +353,14 @@
:value="cur.value"
/>
</el-select>
</el-form-item>
</el-form-item> -->
<!-- 库存事务 -->
<!-- <el-form-item key="库存事务formItem" label="库存事务" class="err-120" v-if="index == 5">
<el-select key="库存事务Operator"
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
@ -307,19 +371,19 @@
</el-select>
<el-input key="库存事务Value" style="flex:1" placeholder="请选择库存事务" disabled v-model="item.Value" @blur="blurTransactionType">
<template #suffix>
<el-button :disabled="formData.name=='默认规则'&&formType=='update'" type="text" plain style="color:var(--el-button-text-color)" @click="searchTransactionType">
<el-button :disabled="formData.priority==0&&formType=='update'" type="text" plain style="color:var(--el-button-text-color)" @click="searchTransactionType">
<Icon icon="ep:search" class="mr-5px" />
</el-button>
</template>
</el-input>
</el-form-item> -->
<!-- 业务类型 -->
<el-form-item key="业务类型formItem" label="业务类型" class="err-120" v-if="index == 5">
<el-form-item key="业务类型formItem" label="业务类型" class="err-120" v-if="index == 2">
<el-select key="业务类型Operator"
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
@ -330,7 +394,7 @@
</el-select>
<el-input key="业务类型Value" style="flex:1" placeholder="请选择业务类型" disabled v-model="item.Value" @blur="blurTransactionType">
<template #suffix>
<el-button :disabled="formData.name=='默认规则'&&formType=='update'" type="text" plain style="color:var(--el-button-text-color)" @click="searchBusinessType">
<el-button :disabled="formData.priority==0&&formType=='update'" type="text" plain style="color:var(--el-button-text-color)" @click="searchBusinessType">
<Icon icon="ep:search" class="mr-5px" />
</el-button>
</template>
@ -373,36 +437,36 @@
<!-- 仓库 -->
<el-input style="flex:1" v-show="warehouseType == 'WarehouseCode'" placeholder="请选择仓库" v-model="formData.configuration.WarehouseCode" @blur="blurWarehouse">
<el-input style="flex:1" v-show="warehouseType == 'WarehouseCode'" placeholder="请选择仓库" v-model="formData.configuration.WarehouseCode" @blur="blurWarehouse({module:'config',type:'WarehouseCode'})">
<template #suffix>
<el-button type="text" plain style="color:var(--el-button-text-color)" @click="searchWarehouse">
<el-button type="text" plain style="color:var(--el-button-text-color)" @click="searchWarehouse({module:'config',type:'WarehouseCode'})">
<Icon icon="ep:search" class="mr-5px" />
</el-button>
</template>
</el-input>
<!-- 库区 -->
<el-input style="flex:1" v-show="warehouseType == 'AreaCode'" placeholder="请选择库区" v-model="formData.configuration.AreaCode" @blur="blurWarehouse">
<el-input style="flex:1" v-show="warehouseType == 'AreaCode'" placeholder="请选择库区" v-model="formData.configuration.AreaCode" @blur="blurWarehouse({module:'config',type:'AreaCode'})">
<template #suffix>
<el-button type="text" plain style="color:var(--el-button-text-color)" @click="searchWarehouse">
<el-button type="text" plain style="color:var(--el-button-text-color)" @click="searchWarehouse({module:'config',type:'AreaCode'})">
<Icon icon="ep:search" class="mr-5px" />
</el-button>
</template>
</el-input>
<!-- 库位组 -->
<el-input style="flex:1" v-show="warehouseType == 'LocationGroupCode'" placeholder="请选择库位组" v-model="formData.configuration.LocationGroupCode" @blur="blurWarehouse">
<el-input style="flex:1" v-show="warehouseType == 'LocationGroupCode'" placeholder="请选择库位组" v-model="formData.configuration.LocationGroupCode" @blur="blurWarehouse({module:'config',type:'LocationGroupCode'})">
<template #suffix>
<el-button type="text" plain style="color:var(--el-button-text-color)" @click="searchWarehouse">
<el-button type="text" plain style="color:var(--el-button-text-color)" @click="searchWarehouse({module:'config',type:'LocationGroupCode'})">
<Icon icon="ep:search" class="mr-5px" />
</el-button>
</template>
</el-input>
<!-- 库位 -->
<el-input style="flex:1" v-show="warehouseType == 'LocationCode'" placeholder="请选择库位" v-model="formData.configuration.LocationCode" @blur="blurWarehouse">
<el-input style="flex:1" v-show="warehouseType == 'LocationCode'" placeholder="请选择库位" v-model="formData.configuration.LocationCode" @blur="blurWarehouse({module:'config',type:'LocationCode'})">
<template #suffix>
<el-button type="text" plain style="color:var(--el-button-text-color)" @click="searchWarehouse">
<el-button type="text" plain style="color:var(--el-button-text-color)" @click="searchWarehouse({module:'config',type:'LocationCode'})">
<Icon icon="ep:search" class="mr-5px" />
</el-button>
</template>
@ -566,7 +630,7 @@
</el-form-item>
</el-col>
<!-- 货架排序方向 -->
<el-col key="货架排序方向col" :span="24">
<!-- <el-col key="货架排序方向col" :span="24">
<el-form-item key="货架排序方向formItem" label="货架排序方向" class="flex-top">
<div class="checkbox">
<el-radio-group key="货架排序方向" v-model="formData.configuration.ShelfOrder">
@ -579,9 +643,9 @@
</el-radio-group>
</div>
</el-form-item>
</el-col>
</el-col> -->
<!-- 行排序方向 -->
<el-col key="行排序方向col" :span="24">
<!-- <el-col key="行排序方向col" :span="24">
<el-form-item key="行排序方向formItem" label="行排序方向" class="flex-top">
<div class="checkbox">
<el-radio-group key="行排序方向" v-model="formData.configuration.RowOrder">
@ -594,9 +658,9 @@
</el-radio-group>
</div>
</el-form-item>
</el-col>
</el-col> -->
<!-- 列排序方向 -->
<el-col key="列排序方向col" :span="24">
<!-- <el-col key="列排序方向col" :span="24">
<el-form-item key="列排序方向formItem" label="列排序方向" class="flex-top">
<div class="checkbox">
<el-radio-group key="列排序方向" v-model="formData.configuration.ColumOrder">
@ -609,7 +673,7 @@
</el-radio-group>
</div>
</el-form-item>
</el-col>
</el-col> -->
</el-row>
</div>
</el-form>
@ -674,16 +738,18 @@ const formData = ref({
status: true, //
//
condition: [
//
{ ParamCode: 'SupplierCode', Operator: 'IN', Value: '' },
//
{ ParamCode: 'WarehouseCode', Operator: 'IN', Value: '' },
// //
// { ParamCode: 'SupplierCode', Operator: 'IN', Value: '' },
// ///abc//
{ ParamCode: 'ItemType', Operator: 'IN', Value: '' },
// //
{ ParamCode: 'Weight', Operator: '>', Value: [] },
//
{ ParamCode: 'InventoryStatus', Operator: 'IN', Value: [] },
//
{ ParamCode: 'StorageType', Operator: 'IN', Value: [] },
// // //
// { ParamCode: 'Weight', Operator: '>', Value: [] },
// //
// { ParamCode: 'InventoryStatus', Operator: 'IN', Value: [] },
// //
// { ParamCode: 'StorageType', Operator: 'IN', Value: [] },
// //
{ ParamCode: 'TransactionType', Operator: 'IN', Value: '' },
],
@ -893,10 +959,11 @@ const filterMethodWarehouseList = (query: string) => {
const searchTableRef = ref()
const searchWarehouse = ()=>{
if(warehouseType.value == 'WarehouseCode'){
const searchTableModule = ref('') // 条件 / 配置
const searchWarehouse = ({module='config',type})=>{
searchTableModule.value = module
// module: config condition
if( module=='condition'&&type=='WarehouseCode' || module=='config'&&warehouseType.value == 'WarehouseCode'){
//
searchTableRef.value.open(
'请选择仓库',
@ -909,7 +976,7 @@ const searchWarehouse = ()=>{
undefined,
undefined
)
}else if(warehouseType.value == 'AreaCode'){
}else if(module=='condition'&&type=='AreaCode' || module=='config'&&warehouseType.value == 'AreaCode'){
searchTableRef.value.open(
'请选择库区',
Area.allSchemas,
@ -922,7 +989,7 @@ const searchWarehouse = ()=>{
undefined
)
}else if(warehouseType.value == 'LocationGroupCode'){
}else if(module=='condition'&&type=='LocationGroupCode' || module=='config'&&warehouseType.value == 'LocationGroupCode'){
searchTableRef.value.open(
'请选择库位组',
@ -936,7 +1003,7 @@ const searchWarehouse = ()=>{
undefined
)
}else if(warehouseType.value == 'LocationCode'){
}else if(module=='condition'&&type=='LocationCode' || module=='config'&&warehouseType.value == 'LocationCode'){
searchTableRef.value.open(
'请选择库位',
Location.allSchemas,
@ -952,75 +1019,79 @@ const searchWarehouse = ()=>{
}
}
const blurWarehouse = async ()=>{
const blurWarehouse = async ({module='config',type})=>{
//
let warehouseValue = formData.value.configuration[warehouseType.value]
let conditionObj = null
if(module=='condition'){
//
conditionObj = formData.value.condition.find(item=>item['ParamCode']==type)
if(conditionObj){
warehouseValue = conditionObj['Value']
}
// { value: 'WarehouseCode', label: '' },
// { value: 'AreaCode', label: '' },
// { value: 'LocationGroupCode', label: '' },
// { value: 'LocationCode', label: '' }
}
if(!warehouseValue){
return
}
if(warehouseType.value == 'WarehouseCode'){
let verifyRes = []
if(module=='condition'&&type=='WarehouseCode' || module=='config'&&warehouseType.value == 'WarehouseCode'){
//
let verifyRes = await WarehouseApi.verifyWarehouse({
verifyRes = await WarehouseApi.verifyWarehouse({
code:warehouseValue
})
console.log('仓库verifyRes',verifyRes)
if(verifyRes&&verifyRes.length>0){
// formData.value.configuration[warehouseType.value] = verifyRes.map(item=>(item['code'])).join(',')
let verifyList = verifyRes.map(item=>(item['code']))
let codeList = formData.value.configuration[warehouseType.value].split(',')
formData.value.configuration[warehouseType.value] = codeList.filter(item=>verifyList.indexOf(item)>-1).join(',')
}else{
formData.value.configuration[warehouseType.value] = ''
}
}else if(warehouseType.value == 'AreaCode'){
}else if(module=='condition'&&type=='AreaCode' || module=='config'&&warehouseType.value == 'AreaCode'){
//
let verifyRes = await AreaApi.verifyAreaList({
verifyRes = await AreaApi.verifyAreaList({
code:warehouseValue
})
console.log('库区verifyRes',verifyRes)
if(verifyRes&&verifyRes.length>0){
let verifyList = verifyRes.map(item=>(item['code']))
let codeList = formData.value.configuration[warehouseType.value].split(',')
formData.value.configuration[warehouseType.value] = codeList.filter(item=>verifyList.indexOf(item)>-1).join(',')
}else{
formData.value.configuration[warehouseType.value] = ''
}
}else if(warehouseType.value == 'LocationGroupCode'){
}else if(module=='condition'&&type=='LocationGroupCode' || module=='config'&&warehouseType.value == 'LocationGroupCode'){
//
let verifyRes = await LocationgroupApi.verifyLocationgroup({
code:warehouseValue
})
console.log('库位组verifyRes',verifyRes)
if(verifyRes&&verifyRes.length>0){
let verifyList = verifyRes.map(item=>(item['code']))
let codeList = formData.value.configuration[warehouseType.value].split(',')
formData.value.configuration[warehouseType.value] = codeList.filter(item=>verifyList.indexOf(item)>-1).join(',')
}else{
formData.value.configuration[warehouseType.value] = ''
}
}else if(warehouseType.value == 'LocationCode'){
}else if(module=='condition'&&type=='LocationCode' || module=='config'&&warehouseType.value == 'LocationCode'){
//
let verifyRes = await LocationApi.verifyLocation({
code:warehouseValue
})
console.log('库位verifyRes',verifyRes)
}
if(verifyRes&&verifyRes.length>0){
let verifyList = verifyRes.map(item=>(item['code']))
if(module=='condition'){
//
let codeList = warehouseValue.split(',')
conditionObj['Value'] = codeList.filter(item=>verifyList.indexOf(item)>-1).join(',')
}else{
//
let codeList = formData.value.configuration[warehouseType.value].split(',')
formData.value.configuration[warehouseType.value] = codeList.filter(item=>verifyList.indexOf(item)>-1).join(',')
}
}else{
if(module=='condition'){
//
conditionObj['Value'] = ''
}else{
formData.value.configuration[warehouseType.value] = ''
}
}
if(module!='condition'){
let fields = ['WarehouseCode','AreaCode','LocationGroupCode','LocationCode']
fields.forEach(item=>{
if(item!=warehouseType.value){
formData.value.configuration[item] = ''
}
})
}
}
//
const searchBusinessType = ()=>{
@ -1085,7 +1156,14 @@ const searchTableSuccess = (formField, searchField, val, type, row) => {
businessType.Value = val.map(item=>(item['code'])).join(',')
}
return
}
}else if(searchTableModule.value == 'condition'){
// module: config condition
//
let conditionObj = formData.value.condition.find(item=>['WarehouseCode','AreaCode','LocationGroupCode','LocationCode'].includes(item['ParamCode']))
conditionObj['Value'] = val.map(item=>(item['code'])).join(',')
}else{
//
//
formData.value.configuration[warehouseType.value] = val.map(item=>(item['code'])).join(',')
let fields = ['WarehouseCode','AreaCode','LocationGroupCode','LocationCode']
fields.forEach(item=>{
@ -1093,6 +1171,9 @@ const searchTableSuccess = (formField, searchField, val, type, row) => {
formData.value.configuration[item] = ''
}
})
}
}
// ///
const changeWarehouse = (e) => {
@ -1160,12 +1241,12 @@ const open = async (type: string, strategyCode: string, id?: number) => {
}
}
//
if (formData.value.condition[0].ParamCode == 'SupplierCode') {
getFormSupplierList()
} else {
getFormCustomerList()
}
// //
// if (formData.value.condition[0].ParamCode == 'SupplierCode') {
// getFormSupplierList()
// } else {
// getFormCustomerList()
// }
// ///
if (
'WarehouseCode' in formData.value.configuration &&
@ -1210,7 +1291,7 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
let TransactionType = formData.value.condition[5]['Value']
let TransactionType = formData.value.condition[2]['Value']
if(Array.isArray(TransactionType)){
TransactionType = TransactionType.join(',')
}
@ -1241,7 +1322,7 @@ const submitForm = async () => {
return
}
}
await blurWarehouse()
await blurWarehouse({module:'config',type:warehouseType.value})
// await blurTransactionType()
if(warehouseType.value == 'WarehouseCode' && !formData.value.configuration.WarehouseCode){
//
@ -1332,16 +1413,18 @@ const resetForm = () => {
status: true, //
//
condition: [
//
{ ParamCode: 'SupplierCode', Operator: 'IN', Value: '' },
//
{ ParamCode: 'WarehouseCode', Operator: 'IN', Value: '' },
// //
// { ParamCode: 'SupplierCode', Operator: 'IN', Value: '' },
// ///abc//
{ ParamCode: 'ItemType', Operator: 'IN', Value: '' },
// ///
{ ParamCode: 'Weight', Operator: '>', Value: [] },
//
{ ParamCode: 'InventoryStatus', Operator: 'IN', Value: [] },
//
{ ParamCode: 'StorageType', Operator: 'IN', Value: [] },
// // ///
// { ParamCode: 'Weight', Operator: '>', Value: [] },
// //
// { ParamCode: 'InventoryStatus', Operator: 'IN', Value: [] },
// //
// { ParamCode: 'StorageType', Operator: 'IN', Value: [] },
// //
{ ParamCode: 'TransactionType', Operator: 'IN', Value: '' },
],

4
src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/index.vue

@ -198,8 +198,8 @@ const importSuccess = () => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hasPermi: 'wms:itembasic:update' }), //
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,0), hasPermi: 'wms:itembasic:delete' }), //
defaultButtons.mainListEditBtn(null), //
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,0)}), //
]
}

2
src/views/wms/basicDataManage/strategySetting/strategy/utensilCapacityStrategy/AddForm.vue

@ -35,7 +35,7 @@
</el-col>
<el-col :span="12" key="优先级col">
<el-form-item key="优先级formItem" label="优先级" prop="priority">
<el-input-number key="优先级input" v-model="formData.priority" :min="1" :disabled="formData.name=='默认规则'&&formType=='update'"/>
<el-input-number key="优先级input" v-model="formData.priority" :min="formData.priority==0&&formType=='update'?0:1" :disabled="formData.priority==0&&formType=='update'"/>
</el-form-item>
</el-col>
<el-col :span="12" key="状态col">

4
src/views/wms/basicDataManage/strategySetting/strategy/utensilCapacityStrategy/index.vue

@ -144,8 +144,8 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hasPermi: 'wms:itembasic:update' }), //
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,0), hasPermi: 'wms:itembasic:delete' }), //
defaultButtons.mainListEditBtn(null), //
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,0)}), //
]
}

14
src/views/wms/basicDataManage/strategySetting/strategy/warehouseStorageStrategy/AddForm.vue

@ -25,22 +25,22 @@
</el-col>
<el-col :span="24" key="名称col">
<el-form-item label="名称" prop="name" key="名称formItem">
<el-input key="名称input" v-model="formData.name" placeholder="请输入名称" clearable :disabled="formData.name=='默认规则'&&formType=='update'"/>
<el-input key="名称input" v-model="formData.name" placeholder="请输入名称" clearable :disabled="formData.priority==0&&formType=='update'"/>
</el-form-item>
</el-col>
<el-col :span="24" key="描述col">
<el-form-item label="描述" prop="description" key="描述formItem">
<el-input key="描述input" v-model="formData.description" placeholder="请输入描述" clearable :disabled="formData.name=='默认规则'&&formType=='update'"/>
<el-input key="描述input" v-model="formData.description" placeholder="请输入描述" clearable :disabled="formData.priority==0&&formType=='update'"/>
</el-form-item>
</el-col>
<el-col :span="12" key="优先级col">
<el-form-item label="优先级" prop="priority" key="优先级formItem">
<el-input-number key="优先级input" v-model="formData.priority" :min="1" :disabled="formData.name=='默认规则'&&formType=='update'"/>
<el-input-number key="优先级input" v-model="formData.priority" :min="formData.priority==0&&formType=='update'?0:1" :disabled="formData.priority==0&&formType=='update'"/>
</el-form-item>
</el-col>
<el-col :span="12" key="状态col">
<el-form-item label="状态" prop="status" key="状态formItem">
<el-switch key="状态switch" v-model="formData.status" :disabled="formData.name=='默认规则'&&formType=='update'"/>
<el-switch key="状态switch" v-model="formData.status" :disabled="formData.priority==0&&formType=='update'"/>
</el-form-item>
</el-col>
</el-row>
@ -59,7 +59,7 @@
placeholder=""
style="width: 120px; margin-right: 10px"
@change="changeWarehouse"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
@ -72,7 +72,7 @@
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
:label="cur.label"
@ -98,7 +98,7 @@
style="flex: 1"
multiple
collapse-tags
:disabled="formData.name=='默认规则'&&formType=='update'"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
v-for="cur in options.warehouseList"

4
src/views/wms/basicDataManage/strategySetting/strategy/warehouseStorageStrategy/index.vue

@ -145,8 +145,8 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListEditBtn({hasPermi: 'wms:itembasic:update' }), //
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,0), hasPermi: 'wms:itembasic:delete' }), //
defaultButtons.mainListEditBtn(null), //
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,0)}), //
]
}

82
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/unplannedreceiptRequestMain.data.ts

@ -681,6 +681,86 @@ export const UnplannedreceiptRequestMainRules = reactive({
],
})
export const ItembasicShow = useCrudSchemas(
  reactive<CrudSchema[]>([
{
label: '品番',
field: 'code',
sort: 'custom',
isSearch: true,
table: {
},
},
{
label: '品名',
field: 'name',
sort: 'custom',
isSearch: true,
table: {
},
},
{
label: '描述1',
field: 'desc1',
sort: 'custom',
table: {
} ,
// isTableForm:false
},
{
label: '描述2',
field: 'desc2',
sort: 'custom',
table: {
} ,
},
{
label: '物料状态',
field: 'status',
sort: 'custom',
dictType: DICT_TYPE.ITEM_STATUS,
dictClass: 'string',
isSearch: true,
isTable: true,
table: {
}
},
{
label: '计量单位',
field: 'uom',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: true,
isTable: true,
table: {
}
},
{
label: '种类',
field: 'category',
sort: 'custom',
dictType: DICT_TYPE.ITEM_CATEGORY,
dictClass: 'string',
isTable: false,
isDetail:false,
table: {
} ,
},
{
label: '类型',
field: 'type',
sort: 'custom',
dictType: DICT_TYPE.ITEM_TYPE,
dictClass: 'string',
isTable: true,
table: {
} ,
},
  ])
)
/**
* @returns {Array}
*/
@ -713,7 +793,7 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
searchListPlaceholder: '请选择物料代码',// 输入框占位文本
searchField: 'code',// 查询弹窗赋值字段
searchTitle: '物料基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchAllSchemas: ItembasicShow.allSchemas,
searchPage: ItembasicApi.getItembasicPage,
searchCondition: [{
key: 'available',

57
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts

@ -1720,14 +1720,6 @@ export const ProductreceiptRequestLabel = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 150
},
tableForm: {
disabled: true,
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '数量',
@ -1840,8 +1832,55 @@ export const ProductreceiptRequestLabel = useCrudSchemas(reactive<CrudSchema[]>(
table: {
width: 150
},
isTable: false,
tableForm: {
disabled: true
enterSearch: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择生产线代码',
searchField: 'code',
searchTitle: '生产线信息',
searchAllSchemas: Productionline.allSchemas,
searchPage: ProductionlineApi.getProductionlinePage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}, {
key: 'workshopCode',
value: 'workshopCode',
message: '请填写车间代码!',
isMainValue: true
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true,
searchListPlaceholder: '请选择生产线代码',
searchField: 'code',
searchTitle: '生产线信息',
searchAllSchemas: Productionline.allSchemas,
searchPage: ProductionlineApi.getProductionlinePage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}, {
key: 'workshopCode',
value: 'workshopCode',
message: '请填写车间代码!',
isMainValue: true
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
{

9
src/views/wms/purchasereceiptManage/amvpurchasereceipt/amvPurchasereceiptRecordMain/index.vue

@ -161,7 +161,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultExportBtn({ hasPermi: 'wms:amv-purchasereceipt-record-main:export' }), //
defaultButtons.defaultExportBtn({ hasPermi: 'wms:purchasereceipt-record-main:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null) //
@ -235,15 +235,14 @@ const butttondata = (row, $index) => {
}
return [
defaultButtons.mainInspectRequestBtn({
hasPermi: 'wms:amv-purchasereceipt-record-main:createInspectRequest',
hasPermi: 'wms:purchasereceipt-record-main:createInspectRequest',
hide: isShowputawayRequestFlagButton(row)
}), //
defaultButtons.mainPutawayRequestBtn({
hasPermi: 'wms:amv-purchasereceipt-record-main:createPutawayRequest',
hide: row.isPutaway==1?row.putawayRequestFlag == 'FALSE':'TRUE'
hide: (row.isPutaway==1 || row.putawayRequestFlag == 'FALSE')?false:true
}), //
defaultButtons.mainPurchasereturnRecordBtn({
hasPermi: 'wms:amv-purchasereceipt-record-main:createPurchasereturnRecord',
hasPermi: 'wms:purchasereceipt-record-main:createPurchasereturnRecord',
hide: row.purchasereturnRecordFlag == 'FALSE'
}), // 退
//defaultButtons.mainListPlanCheckQualityReportBtn({hide:row.orderTypeM == "2"}), //

23
src/views/wms/purchasereceiptManage/amvpurchasereceipt/amvPurchasereceiptRecordMain/purchasereceiptRecordMain.data.ts

@ -483,6 +483,25 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
},
sortTableDefault:12,
},
{
label: '是否上架',
field: 'isPutaway',
sort: 'custom',
dictClass: 'string',
isForm: false,
isTableForm: false,
isTable: false,
detail:{
dictType:'primary',
valueFilter:(value)=>{
if(value==1){
return ``
}else{
return '否'
}
}
}
},
{
label: '创建时间',
field: 'createTime',
@ -710,8 +729,10 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
dictType: DICT_TYPE.ITEM_TYPE,
dictClass: 'string',
isSearch: true,
isTable:false,
isDetail:false,
table: {
width: 150
},
search:{
componentProps:{
multiple:true,

9
src/views/wms/purchasereceiptManage/bspurchasereceipt/bsPurchasereceiptRecordMain/index.vue

@ -161,7 +161,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultExportBtn({ hasPermi: 'wms:bs-purchasereceipt-record-main:export' }), //
defaultButtons.defaultExportBtn({ hasPermi: 'wms:purchasereceipt-record-main:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null) //
@ -235,15 +235,14 @@ const butttondata = (row, $index) => {
}
return [
defaultButtons.mainInspectRequestBtn({
hasPermi: 'wms:bs-purchasereceipt-record-main:createInspectRequest',
hasPermi: 'wms:purchasereceipt-record-main:createInspectRequest',
hide: isShowputawayRequestFlagButton(row)
}), //
defaultButtons.mainPutawayRequestBtn({
hasPermi: 'wms:bs-purchasereceipt-record-main:createPutawayRequest',
hide: row.isPutaway==1?row.putawayRequestFlag == 'FALSE':'TRUE'
hide: (row.isPutaway==1 || row.putawayRequestFlag == 'FALSE')?false:true
}), //
defaultButtons.mainPurchasereturnRecordBtn({
hasPermi: 'wms:bs-purchasereceipt-record-main:createPurchasereturnRecord',
hasPermi: 'wms:purchasereceipt-record-main:createPurchasereturnRecord',
hide: row.purchasereturnRecordFlag == 'FALSE'
}), // 退
//defaultButtons.mainListPlanCheckQualityReportBtn({hide:row.orderTypeM == "2"}), //

23
src/views/wms/purchasereceiptManage/bspurchasereceipt/bsPurchasereceiptRecordMain/purchasereceiptRecordMain.data.ts

@ -483,6 +483,25 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
},
sortTableDefault:12,
},
{
label: '是否上架',
field: 'isPutaway',
sort: 'custom',
dictClass: 'string',
isForm: false,
isTableForm: false,
isTable: false,
detail:{
dictType:'primary',
valueFilter:(value)=>{
if(value==1){
return ``
}else{
return '否'
}
}
}
},
{
label: '创建时间',
field: 'createTime',
@ -710,8 +729,10 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
dictType: DICT_TYPE.ITEM_TYPE,
dictClass: 'string',
isSearch: true,
isTable:false,
isDetail:false,
table: {
width: 150
},
search:{
componentProps:{
multiple:true,

6
src/views/wms/purchasereceiptManage/developpurchasereceipt/developPurchasereceiptJobMain/index.vue

@ -189,7 +189,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultExportBtn({ hasPermi: 'wms:develop-purchasereceipt-job-main:export' }), //
defaultButtons.defaultExportBtn({ hasPermi: 'wms:purchasereceipt-job-main:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null) //
@ -252,7 +252,7 @@ const butttondata = (row, $index) => {
defaultButtons.mainListJobAccBtn({ hide: isShowMainButton(row, ['1']) }), //
defaultButtons.mainListJobCloBtn({
hide: isShowMainButton(row, ['1']),
hasPermi: 'wms:develop-purchasereceipt-job-main:close'
hasPermi: 'wms:purchasereceipt-job-main:close'
}), //
defaultButtons.mainListJobAbaBtn({ hide: isShowMainButton(row, ['2']) }), //
// defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
@ -263,7 +263,7 @@ const butttondata = (row, $index) => {
type: 'primary',
icon: '',
color: '',
hasPermi: 'wms:develop-purchasereceipt-job-main:refusal',
hasPermi: 'wms:purchasereceipt-job-main:refusal',
link: true //
},
defaultButtons.mainListPlanCheckQualityReportBtn({ hide: isShowSourceTypeButton(row) }) //

26
src/views/wms/purchasereceiptManage/developpurchasereceipt/developPurchasereceiptJobMain/purchasereceiptJobMain.data.ts

@ -375,6 +375,25 @@ export const PurchasereceiptJobMain = useCrudSchemas(
},
isTable: false
},
{
label: '是否上架',
field: 'isPutaway',
sort: 'custom',
dictClass: 'string',
isForm: false,
isTableForm: false,
isTable: false,
detail:{
dictType:'primary',
valueFilter:(value)=>{
if(value==1){
return ``
}else{
return '否'
}
}
}
},
{
label: '备注',
field: 'remark',
@ -996,7 +1015,12 @@ export const PurchasereceiptJobDetail = useCrudSchemas(
dictType: DICT_TYPE.ITEM_TYPE,
dictClass: 'string',
sortTableDefault: 7,
isSearch: true
isSearch: true,
search:{
componentProps:{
multiple:true,
}
}
},
{
label: '物料描述1',

9
src/views/wms/purchasereceiptManage/developpurchasereceipt/developPurchasereceiptRecordMain/index.vue

@ -161,7 +161,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultExportBtn({ hasPermi: 'wms:develop-purchasereceipt-record-main:export' }), //
defaultButtons.defaultExportBtn({ hasPermi: 'wms:purchasereceipt-record-main:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null) //
@ -235,16 +235,15 @@ const butttondata = (row, $index) => {
}
return [
defaultButtons.mainInspectRequestBtn({
hasPermi: 'wms:develop-purchasereceipt-record-main:createInspectRequest',
hasPermi: 'wms:purchasereceipt-record-main:createInspectRequest',
hide: isShowputawayRequestFlagButton(row)
}), //
defaultButtons.mainPutawayRequestBtn({
hasPermi: 'wms:develop-purchasereceipt-record-main:createPutawayRequest',
hasPermi: 'wms:purchasereceipt-record-main:createPutawayRequest',
hide: row.isPutaway==1?row.putawayRequestFlag == 'FALSE':'TRUE'
}), //
defaultButtons.mainPurchasereturnRecordBtn({
hasPermi: 'wms:develop-purchasereceipt-record-main:createPurchasereturnRecord',
hide: row.purchasereturnRecordFlag == 'FALSE'
hide: (row.isPutaway==1 || row.putawayRequestFlag == 'FALSE')?false:true
}), // 退
//defaultButtons.mainListPlanCheckQualityReportBtn({hide:row.orderTypeM == "2"}), //
defaultButtons.mainListPlanCheckQualityReportBtn({ hide: isShowSourceTypeButton(row) }), //

23
src/views/wms/purchasereceiptManage/developpurchasereceipt/developPurchasereceiptRecordMain/purchasereceiptRecordMain.data.ts

@ -483,6 +483,25 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
},
sortTableDefault:12,
},
{
label: '是否上架',
field: 'isPutaway',
sort: 'custom',
dictClass: 'string',
isForm: false,
isTableForm: false,
isTable: false,
detail:{
dictType:'primary',
valueFilter:(value)=>{
if(value==1){
return ``
}else{
return '否'
}
}
}
},
{
label: '创建时间',
field: 'createTime',
@ -710,8 +729,10 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
dictType: DICT_TYPE.ITEM_TYPE,
dictClass: 'string',
isSearch: true,
isTable:false,
isDetail:false,
table: {
width: 150
},
search:{
componentProps:{
multiple:true,

20
src/views/wms/purchasereceiptManage/developpurchasereceipt/developPurchasereceiptRequestMain/index.vue

@ -318,9 +318,9 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn(null), //
// defaultButtons.defaultAddBtn(null), //
defaultButtons.defaultImportBtn(null), //
defaultButtons.defaultExportBtn({hasPermi:'wms:develop-purchasereceipt-request-main:export'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:purchasereceipt-request-main:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -403,10 +403,10 @@ const butttondata = (row,$index) => {
return []
}
return [
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:develop-purchasereceipt-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:develop-purchasereceipt-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:develop-purchasereceipt-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:develop-purchasereceipt-request-main:agree'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:purchasereceipt-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:purchasereceipt-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:purchasereceipt-request-main:agree'}), //
// defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-request-main:update'}), //
{
label: '生成标签',
@ -419,8 +419,8 @@ const butttondata = (row,$index) => {
link: true //
},
defaultButtons.mainListPointBtn({ hide: isASNShowMainButton(row, ['3','6','8']) }), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:develop-purchasereceipt-request-main:handle'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:develop-purchasereceipt-request-main:close'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:purchasereceipt-request-main:handle'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:purchasereceipt-request-main:close'}), //
defaultButtons.mainListPlanCheckQualityReportBtn({hide:isShowSourceTypeButton(row)}), //
]
}
@ -462,6 +462,10 @@ const buttonTableClick = async (val, row) => {
})
}
await getDetailList()
detatableData.tableList.forEach(item=>{
item.packQty = item.defaultPackQty
item.packUnit = item.defaultPackUnit
})
formLabelRef.value.open('create', row, null,'createLabel')// createLabel
}else if (val == 'point') {
//

24
src/views/wms/purchasereceiptManage/developpurchasereceipt/developPurchasereceiptRequestMain/purchasereceiptRequestMain.data.ts

@ -564,6 +564,25 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
isTable: false,
isSearch: false,
},
{
label: '是否上架',
field: 'isPutaway',
sort: 'custom',
dictClass: 'string',
isForm: false,
isTableForm: false,
isTable: false,
detail:{
dictType:'primary',
valueFilter:(value)=>{
if(value==1){
return ``
}else{
return '否'
}
}
}
},
{
label: '操作',
field: 'action',
@ -785,6 +804,11 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
isTableForm: false,
isForm: false,
isSearch: true,
search:{
componentProps:{
multiple:true,
}
}
},
{

9
src/views/wms/purchasereceiptManage/jispurchasereceipt/jisPurchasereceiptRecordMain/index.vue

@ -161,7 +161,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultExportBtn({ hasPermi: 'wms:jis-purchasereceipt-record-main:export' }), //
defaultButtons.defaultExportBtn({ hasPermi: 'wms:purchasereceipt-record-main:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null) //
@ -235,15 +235,14 @@ const butttondata = (row, $index) => {
}
return [
defaultButtons.mainInspectRequestBtn({
hasPermi: 'wms:jis-purchasereceipt-record-main:createInspectRequest',
hasPermi: 'wms:purchasereceipt-record-main:createInspectRequest',
hide: isShowputawayRequestFlagButton(row)
}), //
defaultButtons.mainPutawayRequestBtn({
hasPermi: 'wms:jis-purchasereceipt-record-main:createPutawayRequest',
hide: row.isPutaway==1?row.putawayRequestFlag == 'FALSE':'TRUE'
hide: (row.isPutaway==1 || row.putawayRequestFlag == 'FALSE')?false:true
}), //
defaultButtons.mainPurchasereturnRecordBtn({
hasPermi: 'wms:jis-purchasereceipt-record-main:createPurchasereturnRecord',
hasPermi: 'wms:purchasereceipt-record-main:createPurchasereturnRecord',
hide: row.purchasereturnRecordFlag == 'FALSE'
}), // 退
//defaultButtons.mainListPlanCheckQualityReportBtn({hide:row.orderTypeM == "2"}), //

23
src/views/wms/purchasereceiptManage/jispurchasereceipt/jisPurchasereceiptRecordMain/purchasereceiptRecordMain.data.ts

@ -483,6 +483,25 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
},
sortTableDefault:12,
},
{
label: '是否上架',
field: 'isPutaway',
sort: 'custom',
dictClass: 'string',
isForm: false,
isTableForm: false,
isTable: false,
detail:{
dictType:'primary',
valueFilter:(value)=>{
if(value==1){
return ``
}else{
return '否'
}
}
}
},
{
label: '创建时间',
field: 'createTime',
@ -710,8 +729,10 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
dictType: DICT_TYPE.ITEM_TYPE,
dictClass: 'string',
isSearch: true,
isTable:false,
isDetail:false,
table: {
width: 150
},
search:{
componentProps:{
multiple:true,

22
src/views/wms/purchasereceiptManage/jispurchasereceipt/jisPurchasereceiptRequestMain/index.vue

@ -92,7 +92,7 @@
<!-- 导入 -->
<ImportForm
ref="importFormRef"
url="/wms/purchasereceipt-request-main/import"
url="/wms/purchasereceipt-request-main/importJIS"
:importTemplateData="importTemplateData"
@success="importSuccess"
:updateIsDisable="true"
@ -318,9 +318,9 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn(null), //
//defaultButtons.defaultAddBtn(null), //
defaultButtons.defaultImportBtn(null), //
defaultButtons.defaultExportBtn({hasPermi:'wms:jis-purchasereceipt-request-main:export'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:purchasereceipt-request-main:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -403,10 +403,10 @@ const butttondata = (row,$index) => {
return []
}
return [
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:jis-purchasereceipt-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:jis-purchasereceipt-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:jis-purchasereceipt-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:jis-purchasereceipt-request-main:agree'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:purchasereceipt-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:purchasereceipt-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:purchasereceipt-request-main:agree'}), //
// defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-request-main:update'}), //
{
label: '生成标签',
@ -419,8 +419,8 @@ const butttondata = (row,$index) => {
link: true //
},
defaultButtons.mainListPointBtn({ hide: isASNShowMainButton(row, ['3','6','8']) }), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:jis-purchasereceipt-request-main:handle'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:jis-purchasereceipt-request-main:close'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:purchasereceipt-request-main:handle'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:purchasereceipt-request-main:close'}), //
defaultButtons.mainListPlanCheckQualityReportBtn({hide:isShowSourceTypeButton(row)}), //
]
}
@ -462,6 +462,10 @@ const buttonTableClick = async (val, row) => {
})
}
await getDetailList()
detatableData.tableList.forEach(item=>{
item.packQty = item.defaultPackQty
item.packUnit = item.defaultPackUnit
})
formLabelRef.value.open('create', row, null,'createLabel')// createLabel
}else if (val == 'point') {
//

24
src/views/wms/purchasereceiptManage/jispurchasereceipt/jisPurchasereceiptRequestMain/purchasereceiptRequestMain.data.ts

@ -564,6 +564,25 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
isTable: false,
isSearch: false,
},
{
label: '是否上架',
field: 'isPutaway',
sort: 'custom',
dictClass: 'string',
isForm: false,
isTableForm: false,
isTable: false,
detail:{
dictType:'primary',
valueFilter:(value)=>{
if(value==1){
return ``
}else{
return '否'
}
}
}
},
{
label: '操作',
field: 'action',
@ -785,6 +804,11 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
isTableForm: false,
isForm: false,
isSearch: true,
search:{
componentProps:{
multiple:true,
}
}
},
{

26
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/purchasereceiptJobMain.data.ts

@ -375,6 +375,25 @@ export const PurchasereceiptJobMain = useCrudSchemas(
},
isTable: false
},
{
label: '是否上架',
field: 'isPutaway',
sort: 'custom',
dictClass: 'string',
isForm: false,
isTableForm: false,
isTable: false,
detail:{
dictType:'primary',
valueFilter:(value)=>{
if(value==1){
return ``
}else{
return '否'
}
}
}
},
{
label: '备注',
field: 'remark',
@ -996,7 +1015,12 @@ export const PurchasereceiptJobDetail = useCrudSchemas(
dictType: DICT_TYPE.ITEM_TYPE,
dictClass: 'string',
sortTableDefault: 7,
isSearch: true
isSearch: true,
search:{
componentProps:{
multiple:true,
}
}
},
{
label: '物料描述1',

3
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue

@ -248,8 +248,7 @@ const butttondata = (row, $index) => {
hide: isShowputawayRequestFlagButton(row)
}), //
defaultButtons.mainPutawayRequestBtn({
hasPermi: 'wms:purchasereceipt-record-main:createPutawayRequest',
hide: row.isPutaway==1?row.putawayRequestFlag == 'FALSE':'TRUE'
hide: (row.isPutaway==1 || row.putawayRequestFlag == 'FALSE')?false:true
}), //
defaultButtons.mainPurchasereturnRecordBtn({
hasPermi: 'wms:purchasereceipt-record-main:createPurchasereturnRecord',

23
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/purchasereceiptRecordMain.data.ts

@ -483,6 +483,25 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
},
sortTableDefault:12,
},
{
label: '是否上架',
field: 'isPutaway',
sort: 'custom',
dictClass: 'string',
isForm: false,
isTableForm: false,
isTable: false,
detail:{
dictType:'primary',
valueFilter:(value)=>{
if(value==1){
return ``
}else{
return '否'
}
}
}
},
{
label: '创建时间',
field: 'createTime',
@ -710,8 +729,10 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
dictType: DICT_TYPE.ITEM_TYPE,
dictClass: 'string',
isSearch: true,
isTable:false,
isDetail:false,
table: {
width: 150
},
search:{
componentProps:{
multiple:true,

4
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue

@ -462,6 +462,10 @@ const buttonTableClick = async (val, row) => {
})
}
await getDetailList()
detatableData.tableList.forEach(item=>{
item.packQty = item.defaultPackQty
item.packUnit = item.defaultPackUnit
})
formLabelRef.value.open('create', row, null,'createLabel')// createLabel
}else if (val == 'point') {
//

24
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts

@ -564,6 +564,25 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
isTable: false,
isSearch: false,
},
{
label: '是否上架',
field: 'isPutaway',
sort: 'custom',
dictClass: 'string',
isForm: false,
isTableForm: false,
isTable: false,
detail:{
dictType:'primary',
valueFilter:(value)=>{
if(value==1){
return ``
}else{
return '否'
}
}
}
},
{
label: '操作',
field: 'action',
@ -785,6 +804,11 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
isTableForm: false,
isForm: false,
isSearch: true,
search:{
componentProps:{
multiple:true,
}
}
},
{

2
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

@ -1185,7 +1185,7 @@ const clearInput = async (field, row, index) => {
}
const BASE_URL = getJmreportBaseUrl()
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
const src = ref(BASE_URL + '/jmreport/view/1016548504713515008?token=' + getAccessToken())
getListApi: PurchasePlanDetailApi.getPurchasePlanDetailPage //
//

6
src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptJobMain/index.vue

@ -189,7 +189,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultExportBtn({ hasPermi: 'wms:tool-purchasereceipt-job-main:export' }), //
defaultButtons.defaultExportBtn({ hasPermi: 'wms:purchasereceipt-job-main:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null) //
@ -252,7 +252,7 @@ const butttondata = (row, $index) => {
defaultButtons.mainListJobAccBtn({ hide: isShowMainButton(row, ['1']) }), //
defaultButtons.mainListJobCloBtn({
hide: isShowMainButton(row, ['1']),
hasPermi: 'wms:tool-purchasereceipt-job-main:close'
hasPermi: 'wms:purchasereceipt-job-main:close'
}), //
defaultButtons.mainListJobAbaBtn({ hide: isShowMainButton(row, ['2']) }), //
// defaultButtons.mainListJobExeBtn({hide:isShowMainButton(row,['2'])}), //
@ -263,7 +263,7 @@ const butttondata = (row, $index) => {
type: 'primary',
icon: '',
color: '',
hasPermi: 'wms:tool-purchasereceipt-job-main:refusal',
hasPermi: 'wms:purchasereceipt-job-main:refusal',
link: true //
},
defaultButtons.mainListPlanCheckQualityReportBtn({ hide: isShowSourceTypeButton(row) }) //

26
src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptJobMain/purchasereceiptJobMain.data.ts

@ -375,6 +375,25 @@ export const PurchasereceiptJobMain = useCrudSchemas(
},
isTable: false
},
{
label: '是否上架',
field: 'isPutaway',
sort: 'custom',
dictClass: 'string',
isForm: false,
isTableForm: false,
isTable: false,
detail:{
dictType:'primary',
valueFilter:(value)=>{
if(value==1){
return ``
}else{
return '否'
}
}
}
},
{
label: '备注',
field: 'remark',
@ -996,7 +1015,12 @@ export const PurchasereceiptJobDetail = useCrudSchemas(
dictType: DICT_TYPE.ITEM_TYPE,
dictClass: 'string',
sortTableDefault: 7,
isSearch: true
isSearch: true,
search:{
componentProps:{
multiple:true,
}
}
},
{
label: '物料描述1',

10
src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptRecordMain/index.vue

@ -161,7 +161,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultExportBtn({ hasPermi: 'wms:tool-purchasereceipt-record-main:export' }), //
defaultButtons.defaultExportBtn({ hasPermi: 'wms:purchasereceipt-record-main:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null) //
@ -235,15 +235,15 @@ const butttondata = (row, $index) => {
}
return [
defaultButtons.mainInspectRequestBtn({
hasPermi: 'wms:tool-purchasereceipt-record-main:createInspectRequest',
hasPermi: 'wms:purchasereceipt-record-main:createInspectRequest',
hide: isShowputawayRequestFlagButton(row)
}), //
defaultButtons.mainPutawayRequestBtn({
hasPermi: 'wms:tool-purchasereceipt-record-main:createPutawayRequest',
hide: row.isPutaway==1?row.putawayRequestFlag == 'FALSE':'TRUE'
// hasPermi: 'wms:tool-purchasereceipt-record-main:createPutawayRequest',
hide: (row.isPutaway==1 || row.putawayRequestFlag == 'FALSE')?false:true
}), //
defaultButtons.mainPurchasereturnRecordBtn({
hasPermi: 'wms:tool-purchasereceipt-record-main:createPurchasereturnRecord',
hasPermi: true,
hide: row.purchasereturnRecordFlag == 'FALSE'
}), // 退
//defaultButtons.mainListPlanCheckQualityReportBtn({hide:row.orderTypeM == "2"}), //

23
src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptRecordMain/purchasereceiptRecordMain.data.ts

@ -483,6 +483,25 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
},
sortTableDefault:12,
},
{
label: '是否上架',
field: 'isPutaway',
sort: 'custom',
dictClass: 'string',
isForm: false,
isTableForm: false,
isTable: false,
detail:{
dictType:'primary',
valueFilter:(value)=>{
if(value==1){
return ``
}else{
return '否'
}
}
}
},
{
label: '创建时间',
field: 'createTime',
@ -710,8 +729,10 @@ export const PurchasereceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
dictType: DICT_TYPE.ITEM_TYPE,
dictClass: 'string',
isSearch: true,
isTable:false,
isDetail:false,
table: {
width: 150
},
search:{
componentProps:{
multiple:true,

20
src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptRequestMain/index.vue

@ -318,9 +318,9 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn(null), //
// defaultButtons.defaultAddBtn(null), //
defaultButtons.defaultImportBtn(null), //
defaultButtons.defaultExportBtn({hasPermi:'wms:tool-purchasereceipt-request-main:export'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:purchasereceipt-request-main:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -403,10 +403,10 @@ const butttondata = (row,$index) => {
return []
}
return [
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:tool-purchasereceipt-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:tool-purchasereceipt-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:tool-purchasereceipt-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:tool-purchasereceipt-request-main:agree'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:purchasereceipt-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:purchasereceipt-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:purchasereceipt-request-main:agree'}), //
// defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-request-main:update'}), //
{
label: '生成标签',
@ -419,8 +419,8 @@ const butttondata = (row,$index) => {
link: true //
},
defaultButtons.mainListPointBtn({ hide: isASNShowMainButton(row, ['3','6','8']) }), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:tool-purchasereceipt-request-main:handle'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:tool-purchasereceipt-request-main:close'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:purchasereceipt-request-main:handle'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:purchasereceipt-request-main:close'}), //
defaultButtons.mainListPlanCheckQualityReportBtn({hide:isShowSourceTypeButton(row)}), //
]
}
@ -462,6 +462,10 @@ const buttonTableClick = async (val, row) => {
})
}
await getDetailList()
detatableData.tableList.forEach(item=>{
item.packQty = item.defaultPackQty
item.packUnit = item.defaultPackUnit
})
formLabelRef.value.open('create', row, null,'createLabel')// createLabel
}else if (val == 'point') {
//

24
src/views/wms/purchasereceiptManage/toolpurchasereceipt/toolPurchasereceiptRequestMain/purchasereceiptRequestMain.data.ts

@ -564,6 +564,25 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
isTable: false,
isSearch: false,
},
{
label: '是否上架',
field: 'isPutaway',
sort: 'custom',
dictClass: 'string',
isForm: false,
isTableForm: false,
isTable: false,
detail:{
dictType:'primary',
valueFilter:(value)=>{
if(value==1){
return ``
}else{
return '否'
}
}
}
},
{
label: '操作',
field: 'action',
@ -785,6 +804,11 @@ export const PurchasereceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]
isTableForm: false,
isForm: false,
isSearch: true,
search:{
componentProps:{
multiple:true,
}
}
},
{

349
src/views/wms/supplierManage/purchaseClaim/purchaseClaimRecord/PurchaseClaimRecordMain.data.ts

@ -0,0 +1,349 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as SupplierApi from '@/api/wms/supplier'
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data'
import * as ItembasicApi from "@/api/wms/itembasic";
import {
Supplieritem
} from "@/views/wms/basicDataManage/supplierManage/supplieritem/supplieritem.data";
import * as SupplieritemApi from "@/api/wms/supplieritem";
// 表单校验
export const PurchaseClaimRecordMainRules = reactive({
supplierCode: [
{ required: true, message: '请选择供应商代码', trigger: 'blur' }
],
supplierName: [
{ required: true, message: '请输入供应商名称', trigger: 'blur' }
],
})
export const PurchaseClaimRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
sort: 'custom',
isSearch: true,
isForm: false,
table: {
width: 150
},
},
{
label: '供应商代码',
field: 'supplierCode',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {    
enterSearch:true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '供应商信息', // 查询弹窗标题
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
searchPage: SupplierApi.getSupplierPageSCP, // 查询弹窗所需分页方法
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: 'true',
isFormModel: true
}], // 失去焦点校验参数
}
}
},
{
label: '供应商名称',
field: 'supplierName',
isDetail: true,
isSearch: true,
table: {
width: 180
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
disabled:true,
}
}
},
{
label: '索赔时间',
field: 'claimTime',
sort: 'custom',
formatter: dateFormatter,
table: {
width: 180
},
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '供应商发票申请单号',
field: 'supplierinvoiceNumber',
sort: 'custom',
isSearch: true,
isForm:false,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 180
},
},
{
label: '状态',
field: 'status',
dictType: DICT_TYPE.PURCHASECLAIM_REQUEST_STATUS,
dictClass: 'string',
isTable: true,
isForm:false,
sort: 'custom',
table: {
width: 150
},
isSearch: true,
form: {
value: '1',
componentProps: {
disabled: true
}
}
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
isForm:false,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
isSearch: false,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
isForm:false,
table: {
width: 150
},
},
{
label: '操作',
field: 'action',
isForm: false,
isDetail: false,
table: {
width: 150,
fixed: 'right'
}
}
]))
// 表单校验
export const PurchaseClaimRecordDetailRules = reactive({
itemCode: [
{ required: true, message: '请输入物料代码', trigger: 'blur' }
],
claimQty: [
{ required: true, message: '请输入索赔数量', trigger: 'blur' }
],
claimAmount: [
{ required: true, message: '请输入索赔金额', trigger: 'blur' }
],
})
export const PurchaseClaimRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
isSearch: false,
table: {
width: 150,
},
tableForm:{
multiple:false,//多选
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码',// 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '供应商物料信息', // 查询弹窗标题
searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类
searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
action: '==',
isSearch: true,
isMainValue: false
},{
key: 'supplierCode',
value: 'supplierCode',
action: '==',
message: '供应商代码不能为空!',
isFormModel:true, // filters中添加筛选的数据--取于formModel
required:true, // 前置添加必有,和isFormModel结合使用
isSearch: true,
isMainValue: false
}],
verificationPage: ItembasicApi.getItemListByCodes, // tableForm下方输入框校验失去焦点之后是否正确的方法
isShowTableFormSearch: false, //tableForm下方是否出现输入框
verificationParams: [{
key: 'itemCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
disabled:true,
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '供应商物料信息', // 查询弹窗标题
searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类
searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'supplierCode',
value: 'supplierCode',
message: '供应商代码不能为空!',
isMainValue:true
}
],
verificationParams: [
{
key: 'itemCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled:true,
type: 'Select'
},
},
{
label: '计量单位',
field: 'uom',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: false,
isTable: true,
table: {
width: 110
},
tableForm: {
disabled:true,
type: 'Select'
},
},
{
label: '索赔数量',
field: 'claimQty',
sort: 'custom',
isSearch: false,
isTable: true,
table: {
width: 110
},
tableForm: {
type: 'InputNumber',
min: 0,
precision: 0
}
},
{
label: '索赔金额',
field: 'claimAmount',
sort: 'custom',
isSearch: false,
isTable: true,
table: {
width: 110
},
tableForm: {
type: 'InputNumber',
min: 0,
precision: 5
}
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
hiddenInMain:true,
table: {
width: 150,
fixed: 'right'
},
isTableForm: false,
}
]))

453
src/views/wms/supplierManage/purchaseClaim/purchaseClaimRecord/index.vue

@ -0,0 +1,453 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search
:schema="[
...PurchaseClaimRecordMain.allSchemas.searchSchema,
...PurchaseClaimRecordDetail.allSchemas.searchSchema
]"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="PurchaseClaimRecordMain.allSchemas"
:detailAllSchemas="PurchaseClaimRecordDetail.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #number="{ row }">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row, $index }">
<ButtonBase
:Butttondata="butttondata(row, $index)"
@button-base-click="buttonTableClick($event, row)"
/>
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
:isOpenSearchTable="false"
fieldTableColumn="itemCode"
:rules="PurchaseClaimRecordMainRules"
:formAllSchemas="PurchaseClaimRecordMain.allSchemas"
:tableAllSchemas="PurchaseClaimRecordDetail.allSchemas"
:tableFormRules="PurchaseClaimRecordDetailRules"
:tableData="tableData"
:apiUpdate="PurchaseClaimRecordMainApi.updatePurchaseClaimRecordMain"
:apiCreate="PurchaseClaimRecordMainApi.createPurchaseClaimRecordMain"
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
/>
<!-- 详情 -->
<Detail
ref="detailRef"
:isBasic="false"
:allSchemas="PurchaseClaimRecordMain.allSchemas"
:detailAllSchemas="PurchaseClaimRecordDetail.allSchemas"
:detailAllSchemasRules="PurchaseClaimRecordDetailRules"
:apiCreate="PurchaseClaimRecordDetailApi.createPurchaseClaimRecordDetail"
:apiUpdate="PurchaseClaimRecordDetailApi.updatePurchaseClaimRecordDetail"
:apiPage="PurchaseClaimRecordDetailApi.getPurchaseClaimRecordDetailPage"
:apiDelete="PurchaseClaimRecordDetailApi.deletePurchaseClaimRecordDetail"
/>
<!-- 导入 -->
<ImportForm
ref="importFormRef"
url="/wms/deliver-plan-main/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
:updateIsDisable="true"
:coverIsDisable="true"
:mode="2"
:extend="businessType"
/>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import {
PurchaseClaimRecordMain,
PurchaseClaimRecordMainRules,
PurchaseClaimRecordDetailRules,
PurchaseClaimRecordDetail
} from './PurchaseClaimRecordMain.data'
import * as PurchaseClaimRecordMainApi from '@/api/wms/PurchaseClaimRecordMain'
import * as PurchaseClaimRecordDetailApi from '@/api/wms/purchaseClaimRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { formatDate } from '@/utils/formatTime'
import { usePageLoading } from '@/hooks/web/usePageLoading'
const { loadStart, loadDone } = usePageLoading()
defineOptions({ name: 'purchaseClaimRecordMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const businessType = ref()
const tableColumns = ref([
...PurchaseClaimRecordMain.allSchemas.tableColumns,
...PurchaseClaimRecordDetail.allSchemas.tableMainColumns
])
const { tableObject, tableMethods } = useTable({
getListApi: PurchaseClaimRecordDetailApi.getPurchaseClaimRecordDetailPage //
})
//
const { getList, setSearchParams } = tableMethods
const tableData = ref([])
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(async () => {
if (type == 'tableForm') {
if(formField == 'itemCode'){
let itemCodes = val.filter(item=>tableData.value.find(item1=>item1['itemCode']==item['itemCode']))
if(itemCodes.length>0){
itemCodes = itemCodes.map(item=>(item['itemCode']))
message.warning(`物料${itemCodes.join(',')}已经存在`)
}
val = val.filter(item=>!tableData.value.find(item1=>item1['itemCode']==item['itemCode']))
if(val.length==0){
return
}
let newVal = val.filter(item=>!tableData.value.find(item1=>item1['itemCode']==item['itemCode']))
newVal.forEach(item=>{
let tfk = JSON.parse(JSON.stringify(tableFormKeys))
tfk['itemCode'] = item['itemCode']
tfk['itemName'] = item['itemName']
tfk['uom'] = item['supplierUom']
tableData.value.push(tfk)
})
}
}
const setV = {}
if(formField === 'supplierCode'){
setV['supplierCode'] = val[0]['code']
setV['supplierName'] = val[0]['name']
tableData.value = []
}
formRef.setValues(setV)
})
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
setV['remark'] = val[0]['remark']
setV['uom'] = val[0]['customerUom']
formRef.setValues(setV)
})
}
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({ hasPermi: `wms:purchaseClaimRecord:create` }), //
defaultButtons.defaultImportBtn({ hasPermi: `wms:purchaseClaimRecord:import` }), //
defaultButtons.defaultExportBtn({ hasPermi: `wms:purchaseClaimRecord:export` }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null) //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') {
//
openForm('create')
} else if (val == 'import') {
//
handleImport()
} else if (val == 'export') {
//
handleExport()
} else if (val == 'refresh') {
//
if (tableObject.params.filters && tableObject.params.filters.length > 0) {
searchFormClick({
filters: tableObject.params.filters
})
} else {
getList()
}
} else if (val == 'filtrate') {
//
} else {
//
console.log('其他按钮', item)
}
}
//
const isShowMainButton = (row, val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
// -
const butttondata = (row, $index) => {
const findIndex = row['masterId']
? tableObject.tableList.findIndex((item) => item['masterId'] == row['masterId'])
: -1
if (findIndex > -1 && findIndex < $index) {
return []
}
return [
defaultButtons.mainListPlanSubBtn({
hide: isShowMainButton(row, ['0']),
hasPermi: `wms:purchaseClaimRecord:sub`
}), //
defaultButtons.mainListPlanTurBtn({
hide: isShowMainButton(row, ['3']),
hasPermi: `wms:purchaseClaimRecord:reject`
}), //
defaultButtons.mainListPlanAppBtn({
hide: isShowMainButton(row, ['3']),
hasPermi: `wms:purchaseClaimRecord:agree`
}), //
defaultButtons.mainListEditBtn({
hide: isShowMainButton(row, ['0']),
hasPermi: `wms:purchaseClaimRecord:update`
}) //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') {
//
openForm('update', row)
} else if (val == 'mainPlanSub') {
//
handleSub(row.masterId)
}
else if (val == 'delete') {
//
handleDelete(row.masterId)
}
}
/** 提交审批按钮操作 */
const handleSub = async (masterId: number) => {
try {
//
await message.confirm(t('ts.是否提交审批所选中数据?'))
tableObject.loading = true
//
await PurchaseClaimRecordMainApi.subPurchaseClaimRecordMain(masterId)
message.success(t('ts.提交审批成功!'))
tableObject.loading = false
//
await getList()
} catch {
} finally {
tableObject.loading = false
}
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = async (type: string, row?: number) => {
tableData.value = [] //
formRef.value.open(type, row)
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'planDeliverMain')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
tableObject.loading = true
//
await PurchaseClaimRecordMainApi.deletePurchaseClaimRecordMain(id)
tableObject.loading = false
message.success(t('common.delSuccess'))
//
buttonBaseClick('refresh', null)
} catch {}
}
/** 导出按钮操作 */
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
loadStart()
const excelTitle = ref(route.meta.title)
const data = await PurchaseClaimRecordMainApi.exportPurchaseClaimRecordMain(
tableObject.params
)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
loadDone()
}
}
/**
* tableForm方法
*/
const tableFormKeys = {}
PurchaseClaimRecordDetail.allSchemas.tableFormColumns.forEach((item) => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
//
const handleAddTable = () => {
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
}
//
const handleDeleteTable = (item, index) => {
let itemIndex = tableData.value.indexOf(item)
if (itemIndex > -1) {
tableData.value.splice(itemIndex, 1)
}
}
const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter((item) => !selection.includes(item))
}
//true0
const flag = ref(false)
//
const submitForm = async (formType, submitData) => {
let data = { ...submitData }
if (data.masterId) {
data.id = data.masterId
}
data.subList = tableData.value //
data.subList.forEach((item) => {
item.toWarehouseCode = data.toWarehouseCode
item.toLocationCode = data.toLocationCode
})
data.businessType = businessType.value
//
let isExist = false
tableData.value.forEach((item) => {
let rs = tableData.value.filter((filterItem) => filterItem.itemCode == item.itemCode)
if (rs.length > 1) isExist = true
})
if (isExist) {
formRef.value.formLoading = false
return message.warning('物料代码重复')
}
data.subList.forEach((obj) => {
if (obj.claimQty == 0) {
message.error(`索赔数量不能为0!`)
flag.value = true
return
}
if (obj.claimAmount == 0) {
message.error(`索赔金额不能为0!`)
flag.value = true
return
}
})
if (flag.value) {
return
}
formRef.value.formLoading = true
try {
if (formType === 'create') {
await PurchaseClaimRecordMainApi.createPurchaseClaimRecordMain(data)
message.success(t('common.createSuccess'))
} else {
await PurchaseClaimRecordMainApi.updatePurchaseClaimRecordMain(data)
message.success(t('common.updateSuccess'))
}
formRef.value.dialogVisible = false
//
if (formType === 'create') {
getList()
} else {
buttonBaseClick('refresh', null)
}
} finally {
formRef.value.formLoading = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await PurchaseClaimRecordMainApi.importTemplate()
})
</script>

22
src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/PurchaseClaimRequestMain.data.ts

@ -66,6 +66,12 @@ export const PurchaseClaimRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 180
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
disabled:true,
}
}
},
{
label: '索赔时间',
@ -170,7 +176,7 @@ export const PurchaseClaimRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false,
isDetail: false,
table: {
width: 150,
width: 250,
fixed: 'right'
}
}
@ -195,8 +201,6 @@ export const PurchaseClaimRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
sort: 'custom',
isSearch: false,
table: {
width: 150,
},
tableForm:{
multiple:false,//多选
@ -275,7 +279,10 @@ export const PurchaseClaimRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled:true,
type: 'Select'
},
},
{
@ -287,11 +294,11 @@ export const PurchaseClaimRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
isSearch: false,
isTable: true,
table: {
width: 110
},
tableForm: {
disabled:true,
type: 'Select'
}
},
},
{
label: '索赔数量',
@ -300,7 +307,6 @@ export const PurchaseClaimRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
isSearch: false,
isTable: true,
table: {
width: 110
},
tableForm: {
type: 'InputNumber',
@ -315,7 +321,6 @@ export const PurchaseClaimRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
isSearch: false,
isTable: true,
table: {
width: 110
},
tableForm: {
type: 'InputNumber',
@ -330,7 +335,6 @@ export const PurchaseClaimRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
isForm: false,
hiddenInMain:true,
table: {
width: 150,
fixed: 'right'
},
isTableForm: false,

56
src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/index.vue

@ -242,16 +242,16 @@ const butttondata = (row, $index) => {
hide: isShowMainButton(row, ['0']),
hasPermi: `wms:purchaseClaimRequest:sub`
}), //
defaultButtons.mainListPlanTurBtn({
hide: isShowMainButton(row, ['3']),
hasPermi: `wms:purchaseClaimRequest:reject`
}), //
defaultButtons.mainListPlanAppBtn({
hide: isShowMainButton(row, ['3']),
hide: isShowMainButton(row, ['2']),
hasPermi: `wms:purchaseClaimRequest:agree`
}), //
defaultButtons.mainListPlanTurBtn({
hide: isShowMainButton(row, ['2']),
hasPermi: `wms:purchaseClaimRequest:reject`
}), //
defaultButtons.mainListEditBtn({
hide: isShowMainButton(row, ['0']),
hide: isShowMainButton(row, ['0','2']),
hasPermi: `wms:purchaseClaimRequest:update`
}) //
]
@ -266,6 +266,14 @@ const buttonTableClick = async (val, row) => {
//
handleSub(row.masterId)
}
else if (val == 'mainPlanApp') {
//
handleAgree(row.masterId)
}
else if (val == 'mainPlanTur') {
//
handleReject(row.masterId)
}
else if (val == 'delete') {
//
handleDelete(row.masterId)
@ -291,6 +299,42 @@ const handleSub = async (masterId: number) => {
}
}
/** 审批通过按钮操作 */
const handleAgree = async (masterId: number) => {
try {
//
await message.confirm(t('ts.是否审批通过所选中数据?'))
tableObject.loading = true
//
await PurchaseClaimRequestMainApi.agreePurchaseClaimRequestMain(masterId)
message.success(t('ts.审批通过成功!'))
tableObject.loading = false
//
await getList()
} catch {
} finally {
tableObject.loading = false
}
}
/** 审批驳回按钮操作 */
const handleReject = async (masterId: number) => {
try {
//
await message.confirm(t('是否审批驳回所选中数据?'))
tableObject.loading = true
//
await PurchaseClaimRequestMainApi.rejectPurchaseClaimRequestMain(masterId)
message.success(t('审批驳回成功!'))
tableObject.loading = false
//
await getList()
} catch {
} finally {
tableObject.loading = false
}
}
/** 添加/修改操作 */
const formRef = ref()

Loading…
Cancel
Save