陈薪名 11 months ago
parent
commit
e2242afbce
  1. 7
      src/api/wms/bomDismantle/index.ts
  2. 5
      src/api/wms/countRecordMain/index.ts
  3. 12
      src/api/wms/countRequestMain/index.ts
  4. 32
      src/api/wms/countadjustRequestMain/index.ts
  5. 32
      src/api/wms/productrepairRequestMain/index.ts
  6. 6
      src/components/Detail/src/Detail.vue
  7. 2
      src/components/UploadFile/src/UploadFile.vue
  8. 2
      src/components/XButton/src/ButtonBase.vue
  9. 13
      src/utils/disposition/defaultButtons.ts
  10. 2
      src/views/infra/apiAccessLog/index.vue
  11. 2
      src/views/infra/apiErrorLog/index.vue
  12. 2
      src/views/infra/config/index.vue
  13. 2
      src/views/infra/job/index.vue
  14. 2
      src/views/infra/job/logger/index.vue
  15. 2
      src/views/system/dict/data/index.vue
  16. 2
      src/views/system/dict/index.vue
  17. 2
      src/views/system/errorCode/index.vue
  18. 2
      src/views/system/loginlog/index.vue
  19. 2
      src/views/system/operatelog/index.vue
  20. 2
      src/views/system/post/index.vue
  21. 2
      src/views/system/role/index.vue
  22. 2
      src/views/system/sensitiveWord/index.vue
  23. 2
      src/views/system/serialNumber/index.vue
  24. 2
      src/views/system/sms/log/index.vue
  25. 2
      src/views/system/sms/template/index.vue
  26. 2
      src/views/system/tenant/index.vue
  27. 2
      src/views/system/user/UserImportForm.vue
  28. 2
      src/views/system/user/index.vue
  29. 4
      src/views/wms/basicDataManage/labelManage/barbasic/index.vue
  30. 53
      src/views/wms/basicDataManage/strategySetting/strategy/arrivalInspectionStrategy/AddForm.vue
  31. 54
      src/views/wms/basicDataManage/strategySetting/strategy/batchStrategy/AddForm.vue
  32. 54
      src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue
  33. 54
      src/views/wms/basicDataManage/strategySetting/strategy/inspectStrategy/AddForm.vue
  34. 55
      src/views/wms/basicDataManage/strategySetting/strategy/manageAccuracyStrategy/AddForm.vue
  35. 54
      src/views/wms/basicDataManage/strategySetting/strategy/purchaseReceiptStrategy/AddForm.vue
  36. 52
      src/views/wms/basicDataManage/strategySetting/strategy/repairMaterialStrategy/AddForm.vue
  37. 53
      src/views/wms/basicDataManage/strategySetting/strategy/storageCapacityStrategy/AddForm.vue
  38. 362
      src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/AddForm.vue
  39. 2
      src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/index.vue
  40. 56
      src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/AddForm.vue
  41. 52
      src/views/wms/basicDataManage/strategySetting/strategy/utensilCapacityStrategy/AddForm.vue
  42. 53
      src/views/wms/basicDataManage/strategySetting/strategy/warehouseStorageStrategy/AddForm.vue
  43. 20
      src/views/wms/countManage/count/countJobMain/countJobMain.data.ts
  44. 16
      src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts
  45. 74
      src/views/wms/countManage/count/countPlanMain/index.vue
  46. 10
      src/views/wms/countManage/count/countRecordMain/countRecordMain.data.ts
  47. 14
      src/views/wms/countManage/count/countRecordMain/index.vue
  48. 56
      src/views/wms/countManage/count/countRequestMain/index.vue
  49. 73
      src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue
  50. 111
      src/views/wms/productionManage/productrepair/productrepairRecordMain/index.vue
  51. 294
      src/views/wms/productionManage/productrepair/productrepairRecordMain/productrepairRecordMain.data.ts
  52. 105
      src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue
  53. 262
      src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts
  54. 2
      src/views/wms/purchasereceiptManage/inspect/inspectJobMain/index.vue
  55. 2
      src/views/wms/purchasereceiptManage/inspect/inspectRecordMain/index.vue
  56. 2
      src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/index.vue
  57. 2
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue
  58. 2
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/index.vue
  59. 2
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue
  60. 2
      src/views/wms/purchasereceiptManage/putaway/putawayJobMain/index.vue
  61. 2
      src/views/wms/purchasereceiptManage/putaway/putawayRecordMain/index.vue
  62. 5
      src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue
  63. 21
      src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/putawayRequestMain.data.ts
  64. 4
      src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue
  65. 2
      src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue
  66. 26
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue
  67. 5
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts
  68. 2
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue
  69. 191
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/supplierdeliverRecordMain.data.ts
  70. 15
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue
  71. 565
      src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/index.vue

7
src/api/wms/bomDismantle/index.ts

@ -3,4 +3,9 @@ import request from '@/config/axios'
// 查询制品返修申请子列表
export const getBomDismantlePage = async (params) => {
return await request.get({ url: `/wms/productrepair-request-main/bomPage`, params })
}
}
// 查询制品返修记录子列表
export const getBomDismantleRecordPage = async (params) => {
return await request.get({ url: `/wms/productrepair-record-main/bomPage`, params })
}

5
src/api/wms/countRecordMain/index.ts

@ -62,4 +62,9 @@ export const exportCountRecordMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/count-record-main/get-import-template' })
}
// 生成盘点调整
export const generateCountRecordMain = async (id) => {
return await request.put({ url: `/wms/count-record-main/generate?id=` + id})
}

12
src/api/wms/countRequestMain/index.ts

@ -64,31 +64,31 @@ export const importTemplate = () => {
}
// 关闭盘点申请主 Excel
export const closeCountRequestMain = async (id) => {
export const close = async (id) => {
return await request.put({ url: `/wms/count-request-main/close?id=` + id })
}
// 重新添加盘点申请主 Excel
export const reAddCountRequestMain = async (id) => {
export const reAdd = async (id) => {
return await request.put({ url: `/wms/count-request-main/reAdd?id=` + id })
}
// 提交盘点申请主 Excel
export const submitCountRequestMain = async (id) => {
export const submit = async (id) => {
return await request.put({ url: `/wms/count-request-main/submit?id=` + id })
}
// 审批通过盘点申请主 Excel
export const agreeCountRequestMain = async (id) => {
export const agree = async (id) => {
return await request.put({ url: `/wms/count-request-main/agree?id=` + id })
}
// 审批驳回盘点申请主 Excel
export const refusedCountRequestMain = async (id) => {
export const refused = async (id) => {
return await request.put({ url: `/wms/count-request-main/refused?id=` + id })
}
// 处理盘点申请主 Excel
export const handleCountRequestMain = async (id) => {
export const handle = async (id) => {
return await request.put({ url: `/wms/count-request-main/handle?id=` + id })
}

32
src/api/wms/countadjustRequestMain/index.ts

@ -60,4 +60,34 @@ export const exportCountadjustRequestMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/countadjust-request-main/get-import-template' })
}
}
// 关闭盘点申请主 Excel
export const close = async (id) => {
return await request.put({ url: `/wms/countadjust-request-main/close?id=` + id })
}
// 重新添加盘点申请主 Excel
export const reAdd = async (id) => {
return await request.put({ url: `/wms/countadjust-request-main/reAdd?id=` + id })
}
// 提交盘点申请主 Excel
export const submit = async (id) => {
return await request.put({ url: `/wms/countadjust-request-main/submit?id=` + id })
}
// 审批通过盘点申请主 Excel
export const agree = async (id) => {
return await request.put({ url: `/wms/countadjust-request-main/agree?id=` + id })
}
// 审批驳回盘点申请主 Excel
export const refused = async (id) => {
return await request.put({ url: `/wms/countadjust-request-main/refused?id=` + id })
}
// 处理盘点申请主 Excel
export const handle = async (id) => {
return await request.put({ url: `/wms/countadjust-request-main/handle?id=` + id })
}

32
src/api/wms/productrepairRequestMain/index.ts

@ -63,4 +63,34 @@ export const exportProductrepairRequestMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/productrepair-request-main/get-import-template' })
}
}
// 关闭-制品返修申请
export const closeProductrepairRequestMain = async (id) => {
return await request.put({ url: `/wms/productrepair-request-main/close?id=` + id })
}
// 重新添加-制品返修申请
export const reAddProductrepairRequestMain = async (id) => {
return await request.put({ url: `/wms/productrepair-request-main/reAdd?id=` + id })
}
// 提交审批-制品返修申请
export const submitProductrepairRequestMain = async (id) => {
return await request.put({ url: `/wms/productrepair-request-main/submit?id=` + id })
}
// 审批驳回-制品返修申请
export const refusedProductrepairRequestMain = async (id) => {
return await request.put({ url: `/wms/productrepair-request-main/refused?id=` + id })
}
// 审批通过-制品返修申请
export const agreeProductrepairRequestMain = async (id) => {
return await request.put({ url: `/wms/productrepair-request-main/agree?id=` + id })
}
// 处理-制品返修申请
export const handleProductrepairRequestMain = async (id) => {
return await request.put({ url: `/wms/productrepair-request-main/handle?id=` + id })
}

6
src/components/Detail/src/Detail.vue

@ -369,6 +369,12 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
}) //
]
}
//
if (props.fromeWhere == 'putawayRequest') {
HeadButttondata.value = [
defaultButtons.defaultFilterBtn(null) //
]
}
}
//

2
src/components/UploadFile/src/UploadFile.vue

@ -56,7 +56,7 @@ const props = defineProps({
title: propTypes.string.def('文件上传'),
updateUrl: propTypes.string.def(import.meta.env.VITE_UPLOAD_URL),
upData: propTypes.object.def(),
fileType: propTypes.array.def(['doc', 'xls', 'ppt', 'txt', 'pdf']), // , ['png', 'jpg', 'jpeg']
fileType: propTypes.array.def(['doc', 'xls', 'ppt', 'txt', 'pdf', 'pdf','png', 'jpg', 'jpeg']), // , ['png', 'jpg', 'jpeg']
fileSize: propTypes.number.def(5), // (MB)
limit: propTypes.number.def(5), //
autoUpload: propTypes.bool.def(true), //

2
src/components/XButton/src/ButtonBase.vue

@ -5,6 +5,7 @@
:type="item.type"
:color="item.color"
:link="item.link ? item.link : false"
:disabled="item.disabled"
v-hasPermi="[item.hasPermi] || []"
v-if="item.name != 'set'"
@click="buttonBaseClick(item.name, item, $event)"
@ -32,6 +33,7 @@
v-show="!item.hide"
:type="item.type"
:color="item.color"
:disabled="item.disabled"
:link="item.link ? item.link : false"
v-hasPermi="[item.hasPermi] || []"
@click="buttonBaseClick(item.name, item, $event)"

13
src/utils/disposition/defaultButtons.ts

@ -687,10 +687,23 @@ export function mainPutawayRequestBtn(option:any) {
hasPermi: ''
})
}
// 主列表-生成盘点调整申请
export function mainCountAdjustRequesttBtn(option:any) {
return __defaultBtnOption(option,{
label: '生成盘点调整申请',
name: 'countAdjustRequest',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 默认按钮规则
function __defaultBtnOption(option:any,specific:any){
return {
type:option && option.type ? option.type : specific.type,
disabled:option && option.disabled ? option.disabled : specific.disabled,
plain:option && option.plain ? option.plain : specific.plain,
icon:option && option.icon ? option.icon : specific.icon,
label:option && option.label ? option.label : specific.label,

2
src/views/infra/apiAccessLog/index.vue

@ -153,7 +153,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await ApiAccessLogApi.exportApiAccessLog(queryParams)
download.excel(data, 'API 访问日志.xls')
download.excel(data, 'API 访问日志.xlsx')
} catch {
} finally {
exportLoading.value = false

2
src/views/infra/apiErrorLog/index.vue

@ -235,7 +235,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await ApiErrorLogApi.exportApiErrorLog(queryParams)
download.excel(data, '异常日志.xls')
download.excel(data, '异常日志.xlsx')
} catch {
} finally {
exportLoading.value = false

2
src/views/infra/config/index.vue

@ -155,7 +155,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await ConfigApi.exportConfig(queryParams)
download.excel(data, '参数配置.xls')
download.excel(data, '参数配置.xlsx')
} catch {
} finally {
exportLoading.value = false

2
src/views/infra/job/index.vue

@ -155,7 +155,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await JobApi.exportJob(queryParams)
download.excel(data, '定时任务.xls')
download.excel(data, '定时任务.xlsx')
} catch {
} finally {
exportLoading.value = false

2
src/views/infra/job/logger/index.vue

@ -182,7 +182,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await JobLogApi.exportJobLog(queryParams)
download.excel(data, '定时任务执行日志.xls')
download.excel(data, '定时任务执行日志.xlsx')
} catch {
} finally {
exportLoading.value = false

2
src/views/system/dict/data/index.vue

@ -194,7 +194,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await DictDataApi.exportDictData(queryParams)
download.excel(data, '字典数据.xls')
download.excel(data, '字典数据.xlsx')
} catch {
} finally {
exportLoading.value = false

2
src/views/system/dict/index.vue

@ -161,7 +161,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await DictTypeApi.exportDictType(queryParams)
download.excel(data, '字典类型.xls')
download.excel(data, '字典类型.xlsx')
} catch {
} finally {
exportLoading.value = false

2
src/views/system/errorCode/index.vue

@ -157,7 +157,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await ErrorCodeApi.excelErrorCode(queryParams)
download.excel(data, '错误码.xls')
download.excel(data, '错误码.xlsx')
} catch {
} finally {
exportLoading.value = false

2
src/views/system/loginlog/index.vue

@ -126,7 +126,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await LoginLogApi.exportLoginLog(queryParams)
download.excel(data, '登录日志.xls')
download.excel(data, '登录日志.xlsx')
} catch {
} finally {
exportLoading.value = false

2
src/views/system/operatelog/index.vue

@ -145,7 +145,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await OperateLogApi.exportOperateLog(queryParams)
download.excel(data, '操作日志.xls')
download.excel(data, '操作日志.xlsx')
} catch {
} finally {
exportLoading.value = false

2
src/views/system/post/index.vue

@ -143,7 +143,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await PostApi.exportPost(queryParams)
download.excel(data, '岗位列表.xls')
download.excel(data, '岗位列表.xlsx')
} catch {
} finally {
exportLoading.value = false

2
src/views/system/role/index.vue

@ -250,7 +250,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await RoleApi.exportRole(queryParams)
download.excel(data, '角色列表.xls')
download.excel(data, '角色列表.xlsx')
} catch {
} finally {
exportLoading.value = false

2
src/views/system/sensitiveWord/index.vue

@ -175,7 +175,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await SensitiveWordApi.exportSensitiveWord(queryParams)
download.excel(data, '敏感词.xls')
download.excel(data, '敏感词.xlsx')
} catch {
} finally {
exportLoading.value = false

2
src/views/system/serialNumber/index.vue

@ -168,7 +168,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await SerialNumberApi.exportSerialNumber(queryParams)
download.excel(data, '流水号规则.xls')
download.excel(data, '流水号规则.xlsx')
} catch {
} finally {
exportLoading.value = false

2
src/views/system/sms/log/index.vue

@ -171,7 +171,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await SmsLogApi.exportSmsLog(queryParams)
download.excel(data, '短信日志.xls')
download.excel(data, '短信日志.xlsx')
} catch {
} finally {
exportLoading.value = false

2
src/views/system/sms/template/index.vue

@ -197,7 +197,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await SmsTemplateApi.exportSmsTemplate(queryParams)
download.excel(data, '短信模板.xls')
download.excel(data, '短信模板.xlsx')
} catch {
} finally {
exportLoading.value = false

2
src/views/system/tenant/index.vue

@ -177,7 +177,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await TenantApi.exportTenant(queryParams)
download.excel(data, '租户列表.xls')
download.excel(data, '租户列表.xlsx')
} catch {
} finally {
exportLoading.value = false

2
src/views/system/user/UserImportForm.vue

@ -130,6 +130,6 @@ const importTemplate = async () => {
console.log(await UserApi.importUserTemplate());
const res = await UserApi.importUserTemplate()
download.excel(res, '用户导入模版.xls')
download.excel(res, '用户导入模版.xlsx')
}
</script>

2
src/views/system/user/index.vue

@ -195,7 +195,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await UserApi.exportUser(queryParams)
download.excel(data, '用户数据.xls')
download.excel(data, '用户数据.xlsx')
} catch {
} finally {
exportLoading.value = false

4
src/views/wms/basicDataManage/labelManage/barbasic/index.vue

@ -191,7 +191,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await BarbasicApi.exportBarbasic(setSearchParams)
download.excel(data, '条码实体基类.xls')
download.excel(data, '条码实体基类.xlsx')
} catch {
} finally {
exportLoading.value = false
@ -206,7 +206,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '条码实体基类导入模版.xls'
templateTitle: '条码实体基类导入模版.xlsx'
})
//
const importSuccess = () => {

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

@ -229,6 +229,22 @@ const options = reactive({
{ value: 3, label: '供应商3' }
]
})
//
const Butttondata = ref([
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
])
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
//
const querySupplierParams = ref({
type: ''
@ -265,6 +281,17 @@ const open = async (type: string, strategyCode: string, id?: number) => {
formData.value.description = data.description
formData.value.priority = data.priority
formData.value.status = data.status == 0 ? true : false
if (formData.value.priority == 0) {
Butttondata.value = [
defaultButtons.formSaveBtn({disabled:true}), //
defaultButtons.formCloseBtn(null) //
]
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
if (data.condition) {
formData.value.condition = JSON.parse(data.condition)
}
@ -277,6 +304,11 @@ const open = async (type: string, strategyCode: string, id?: number) => {
} finally {
formLoading.value = false
}
}else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
}
defineExpose({ open }) // open
@ -288,6 +320,10 @@ const submitForm = async () => {
if (!formRef) return
const valid = await formRef.value.validate()
if (!valid) return
if(formData.value.priority == 0){
message.error('优先级不可以为0')
return
}
let list = Object.values(formData.value.configuration)
let onlyOne = list.filter((item) => {
return item == 'TRUE'
@ -350,22 +386,7 @@ const resetForm = () => {
}
}
//
const Butttondata = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
</script>
<style scoped lang="scss">
.item {

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

@ -228,7 +228,22 @@ const options = reactive({
itemTypeOptions: [{ value: 'ItemType', label: '物品类型' }, { value: 'ItemGroup', label: '物品分组' }, { value: 'ItemCode', label: '物品' }, { value: 'Project', label: '项目' }, { value: 'AbcClass', label: 'ABC类' }],
})
//
const Butttondata = ref([
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
])
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
//
const getFormSupplierList = async () => {
options.supplierList = await getSupplierList();
@ -270,6 +285,17 @@ const open = async (type: string, strategyCode: string, id?: number) => {
formData.value.description = data.description
formData.value.priority = data.priority
formData.value.status = data.status == 0 ? true : false
if (formData.value.priority == 0) {
Butttondata.value = [
defaultButtons.formSaveBtn({disabled:true}), //
defaultButtons.formCloseBtn(null) //
]
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
if (data.condition) {
formData.value.condition = JSON.parse(data.condition)
}
@ -285,6 +311,11 @@ const open = async (type: string, strategyCode: string, id?: number) => {
} finally {
formLoading.value = false
}
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
}
defineExpose({ open }) // open
@ -297,7 +328,10 @@ const submitForm = async () => {
if (!formRef) return
const valid = await formRef.value.validate()
if (!valid) return
if(formData.value.priority == 0){
message.error('优先级不可以为0')
return
}
//
formLoading.value = true
try {
@ -355,22 +389,6 @@ const resetForm = () => {
}
}
//
const Butttondata = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null), //
]
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
//
const handleAddTable = (item) => {
item.push({

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

@ -413,6 +413,22 @@ const options = reactive({
//
sortOptions: [{ value: 'ASC', label: '从小到大' }, { value: 'DESC', label: '从大到小' }],
})
//
const Butttondata = ref([
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
])
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
//
const getFormSupplierList = async () => {
@ -492,6 +508,17 @@ const open = async (type: string, strategyCode: string, id?: number) => {
formData.value.description = data.description
formData.value.priority = data.priority
formData.value.status = data.status == 0 ? true : false
if (formData.value.priority == 0) {
Butttondata.value = [
defaultButtons.formSaveBtn({disabled:true}), //
defaultButtons.formCloseBtn(null) //
]
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
if (data.condition) {
formData.value.condition = JSON.parse(data.condition)
}
@ -521,6 +548,11 @@ const open = async (type: string, strategyCode: string, id?: number) => {
} finally {
formLoading.value = false
}
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
}
defineExpose({ open }) // open
@ -532,6 +564,10 @@ const submitForm = async () => {
if (!formRef) return
const valid = await formRef.value.validate()
if (!valid) return
if(formData.value.priority == 0){
message.error('优先级不可以为0')
return
}
//
formLoading.value = true
try {
@ -624,24 +660,6 @@ const resetForm = () => {
}
}
}
//
const Butttondata = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null), //
]
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
</script>
<style scoped lang="scss">
.item {

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

@ -334,6 +334,23 @@ const options = reactive({
const querySupplierParams = ref({
type: ''
})
//
const Butttondata = ref([
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
])
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
//
const getFormSupplierList = async () => {
options.supplierList = await getSupplierList(querySupplierParams.value)
@ -385,6 +402,17 @@ const open = async (type: string, strategyCode: string, id?: number) => {
formData.value.description = data.description
formData.value.priority = data.priority
formData.value.status = data.status == 0 ? true : false
if (formData.value.priority == 0) {
Butttondata.value = [
defaultButtons.formSaveBtn({disabled:true}), //
defaultButtons.formCloseBtn(null) //
]
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
if (data.condition) {
formData.value.condition = JSON.parse(data.condition)
}
@ -397,6 +425,11 @@ const open = async (type: string, strategyCode: string, id?: number) => {
} finally {
formLoading.value = false
}
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
}
defineExpose({ open }) // open
@ -409,6 +442,10 @@ const submitForm = async () => {
if (!formRef) return
const valid = await formRef.value.validate()
if (!valid) return
if(formData.value.priority == 0){
message.error('优先级不可以为0')
return
}
//
formLoading.value = true
if(formData.value.configuration.InspectType != 'SAMPLING'){
@ -478,23 +515,6 @@ const resetForm = () => {
}
}
//
const Butttondata = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
//
const handleAddTable = (item) => {
item.push({

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

@ -243,7 +243,22 @@ const options = reactive({
//
warehouseList: [],
})
//
const Butttondata = ref([
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
])
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
//
const getFormSupplierList = async () => {
options.supplierList = await getSupplierList();
@ -315,6 +330,17 @@ const open = async (type: string, strategyCode: string, id?: number) => {
formData.value.description = data.description
formData.value.priority = data.priority
formData.value.status = data.status == 0 ? true : false
if (formData.value.priority == 0) {
Butttondata.value = [
defaultButtons.formSaveBtn({disabled:true}), //
defaultButtons.formCloseBtn(null) //
]
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
if (data.condition) {
formData.value.condition = JSON.parse(data.condition)
}
@ -341,6 +367,11 @@ const open = async (type: string, strategyCode: string, id?: number) => {
} finally {
formLoading.value = false
}
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
}
defineExpose({ open }) // open
@ -352,6 +383,11 @@ const submitForm = async () => {
if (!formRef) return
const valid = await formRef.value.validate()
if (!valid) return
if(formData.value.priority == 0){
message.error('优先级不可以为0')
return
}
//
formLoading.value = true
try {
@ -410,23 +446,6 @@ const resetForm = () => {
}
}
//
const Butttondata = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null), //
]
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
</script>
<style scoped lang="scss">
.item {

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

@ -241,6 +241,22 @@ const options = reactive({
{ value: 3, label: '供应商3' }
]
})
//
const Butttondata =ref( [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
])
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
//
const querySupplierParams = ref({
type: ''
@ -277,6 +293,18 @@ const open = async (type: string, strategyCode: string, id?: number) => {
formData.value.description = data.description
formData.value.priority = data.priority
formData.value.status = data.status == 0 ? true : false
if (formData.value.priority == 0) {
Butttondata.value = [
defaultButtons.formSaveBtn({disabled:true}), //
defaultButtons.formCloseBtn(null) //
]
console.log(Butttondata)
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
if (data.condition) {
formData.value.condition = JSON.parse(data.condition)
}
@ -289,6 +317,11 @@ const open = async (type: string, strategyCode: string, id?: number) => {
} finally {
formLoading.value = false
}
}else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
}
defineExpose({ open }) // open
@ -300,6 +333,10 @@ const submitForm = async () => {
if (!formRef) return
const valid = await formRef.value.validate()
if (!valid) return
if(formData.value.priority == 0){
message.error('优先级不可以为0')
return
}
let list = Object.values(formData.value.configuration)
let onlyOne = list.filter((item) => {
return item == 'TRUE'
@ -366,22 +403,7 @@ const resetForm = () => {
}
}
//
const Butttondata = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
</script>
<style scoped lang="scss">
.item {

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

@ -232,6 +232,22 @@ const options = reactive({
overflowWarehouseList: []
})
//
const Butttondata = ref([
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
])
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
// //abc//
const changeItemsType = () => {
formData.value.condition[0].Value = ''
@ -294,6 +310,17 @@ const open = async (type: string, strategyCode: string, id?: number) => {
formData.value.description = data.description
formData.value.priority = data.priority
formData.value.status = data.status == 0 ? true : false
if (formData.value.priority == 0) {
Butttondata.value = [
defaultButtons.formSaveBtn({disabled:true}), //
defaultButtons.formCloseBtn(null) //
]
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
if (data.condition) {
formData.value.condition = JSON.parse(data.condition)
}
@ -314,6 +341,11 @@ const open = async (type: string, strategyCode: string, id?: number) => {
} finally {
formLoading.value = false
}
}else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
}
defineExpose({ open }) // open
@ -325,6 +357,10 @@ const submitForm = async () => {
if (!formRef) return
const valid = await formRef.value.validate()
if (!valid) return
if(formData.value.priority == 0){
message.error('优先级不可以为0')
return
}
//
formLoading.value = true
try {
@ -383,22 +419,6 @@ const resetForm = () => {
}
}
//
const Butttondata = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
const validatorNum = (rule: any, value: any, callback: any) => {
if (value && formData.value.configuration.MaxQty != -1) {

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

@ -370,7 +370,22 @@ const options = reactive({
//
overflowWarehouseList: []
})
//
const Butttondata = ref([
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
])
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
// //abc//
const changeItemsType = () => {
formData.value.condition[0].Value = ''
@ -433,6 +448,17 @@ const open = async (type: string, strategyCode: string, id?: number) => {
formData.value.description = data.description
formData.value.priority = data.priority
formData.value.status = data.status == 0 ? true : false
if (formData.value.priority == 0) {
Butttondata.value = [
defaultButtons.formSaveBtn({disabled:true}), //
defaultButtons.formCloseBtn(null) //
]
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
if (data.condition) {
formData.value.condition = JSON.parse(data.condition)
}
@ -453,6 +479,11 @@ const open = async (type: string, strategyCode: string, id?: number) => {
} finally {
formLoading.value = false
}
}else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
}
defineExpose({ open }) // open
@ -464,6 +495,10 @@ const submitForm = async () => {
if (!formRef) return
const valid = await formRef.value.validate()
if (!valid) return
if(formData.value.priority == 0){
message.error('优先级不可以为0')
return
}
//
formLoading.value = true
try {
@ -526,22 +561,6 @@ const resetForm = () => {
}
}
//
const Butttondata = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
</script>
<style scoped lang="scss">
.item {

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

@ -1,16 +1,27 @@
<!-- 供应商送货策略弹出层 -->
<!-- 采购计划策略弹出层 -->
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible" style="width: 800px;">
<div class="p-20px m--10px" style="max-height: 50vh;overflow-y: auto;">
<el-form ref="formRef" :model="formData" :rules="rules" label-width="120px" label-position="left">
<Dialog :title="dialogTitle" v-model="dialogVisible" style="width: 800px">
<div class="p-20px m--10px" style="max-height: 50vh; overflow-y: auto">
<el-form
ref="formRef"
:model="formData"
:rules="rules"
label-width="120px"
label-position="left"
>
<!-- 规则 -->
<div class="item">
<div class="title">规则</div>
<el-row>
<el-col :span="24">
<el-form-item label="代码" prop="strategyCode">
<el-input v-model="formData.strategyCode" placeholder="请输入代码" clearable disabled />
<el-input
v-model="formData.strategyCode"
placeholder="请输入代码"
clearable
disabled
/>
</el-form-item>
</el-col>
<el-col :span="24">
@ -41,36 +52,95 @@
<el-row>
<el-col :span="24" v-for="(item, index) in formData.condition" :key="index">
<!-- 供应商类型 -->
<el-form-item v-if="item.ParamCode == 'SupplierType'" label="供应商类型" class="flex-top err-120">
<el-select v-model="item.Operator" placeholder="请选择范围" style="width: 110px;;margin-right: 10px;">
<el-option :label="cur.label" :value="cur.value" v-for="cur in options.supplierTypeRangeOptions"
:key="cur.value" />
<el-form-item
v-if="item.ParamCode == 'SupplierType'"
label="供应商类型"
class="flex-top err-120"
>
<el-select
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
>
<el-option
:label="cur.label"
:value="cur.value"
v-for="cur in options.supplierTypeRangeOptions"
:key="cur.value"
/>
</el-select>
<el-select v-model="item.Value" placeholder="请选择供应商类型" style="flex: 1;" clearable
@change="changeSupplierType">
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.SUPPLIER_TYPE)" :key="dict.value"
:label="dict.label" :value="dict.value" />
<el-select
v-model="item.Value"
placeholder="请选择供应商类型"
style="flex: 1"
clearable
@change="changeSupplierType"
>
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.SUPPLIER_TYPE)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<!-- 供应商 -->
<el-form-item v-else-if="item.ParamCode == 'SupplierCode'" label="供应商" class="err-120">
<el-select v-model="item.Operator" placeholder="请选择范围" style="width: 110px;margin-right: 10px;">
<el-option :label="cur.label" :value="cur.value" v-for="cur in options.supplierRangeOptions"
:key="cur.value" />
<el-form-item
v-else-if="item.ParamCode == 'SupplierCode'"
label="供应商"
class="err-120"
>
<el-select
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
>
<el-option
:label="cur.label"
:value="cur.value"
v-for="cur in options.supplierRangeOptions"
:key="cur.value"
/>
</el-select>
<el-select v-model="item.Value" placeholder="请选择供应商" style="flex: 1;" clearable>
<el-option v-for="cur in options.supplierList" :key="cur.id" :label="cur.name" :value="cur.id" />
<el-select
v-model="item.Value"
placeholder="请选择供应商"
style="flex: 1"
clearable
>
<el-option
v-for="cur in options.supplierList"
:key="cur.id"
:label="cur.name"
:value="cur.id"
/>
</el-select>
</el-form-item>
<!-- 星期几 -->
<el-form-item v-else-if="item.ParamCode == 'Weekday'" label="星期几" class="flex-top err-120">
<el-select v-model="item.Operator" placeholder="请选择范围" style="width: 110px;;margin-right: 10px;">
<el-option :label="cur.label" :value="cur.value" v-for="cur in options.weekRangeOptions"
:key="cur.value" />
<el-form-item
v-else-if="item.ParamCode == 'Weekday'"
label="星期几"
class="flex-top err-120"
>
<el-select
v-model="item.Operator"
placeholder="请选择范围"
style="width: 110px; margin-right: 10px"
>
<el-option
:label="cur.label"
:value="cur.value"
v-for="cur in options.weekRangeOptions"
:key="cur.value"
/>
</el-select>
<div class="checkbox">
<el-checkbox-group v-model="item.Value">
<el-checkbox :label="cur.label" v-for="cur in options.weekOptions" :key="cur.value" />
<el-checkbox
:label="cur.label"
v-for="cur in options.weekOptions"
:key="cur.value"
/>
</el-checkbox-group>
</div>
</el-form-item>
@ -84,33 +154,80 @@
<!-- 开始时间 -->
<el-col :span="24">
<!-- 开始时间 -->
<el-form-item label="开始时间" prop="BeginTime">
<el-time-select v-model="formData.configuration.BeginTime" start="00:00" end="23:59" step="00:15" placeholder="请选择开始时间"
style="width: 100%;" />
<el-form-item label="开始时间" prop="BeginTime">
<el-time-select
v-model="formData.configuration.BeginTime"
start="00:00"
end="23:59"
step="00:15"
placeholder="请选择开始时间"
style="width: 100%"
/>
</el-form-item>
<!-- 结束时间 -->
<el-form-item label="结束时间" prop="EndTime">
<el-time-select v-model="formData.configuration.EndTime" start="00:00" end="23:59" step="00:15" placeholder="请选择结束时间"
style="width: 100%;" />
<el-form-item label="结束时间" prop="EndTime">
<el-time-select
v-model="formData.configuration.EndTime"
start="00:00"
end="23:59"
step="00:15"
placeholder="请选择结束时间"
style="width: 100%"
/>
</el-form-item>
<!-- 仓库 -->
<el-form-item label="仓库" prop="WarehouseCode">
<el-select v-model="formData.configuration.WarehouseCode"
:placeholder="`请选择${formData.configuration.WarehouseCode == 'WarehouseCode' ? '仓库' : formData.configuration.WarehouseCode== 'AreaCode' ? '库区' : formData.configuration.WarehouseCode == 'LocationGroupCode' ? '库位组' : formData.configuration.WarehouseCode == 'LocationCode' ? '库位' : ''}`"
clearable>
<el-option v-for="cur in options.warehouseList" :key="cur.code" :label="cur.name" :value="cur.code" />
<el-select
v-model="formData.configuration.WarehouseCode"
:placeholder="`请选择${
formData.configuration.WarehouseCode == 'WarehouseCode'
? '仓库'
: formData.configuration.WarehouseCode == 'AreaCode'
? '库区'
: formData.configuration.WarehouseCode == 'LocationGroupCode'
? '库位组'
: formData.configuration.WarehouseCode == 'LocationCode'
? '库位'
: ''
}`"
clearable
>
<el-option
v-for="cur in options.warehouseList"
:key="cur.code"
:label="cur.name"
:value="cur.code"
/>
</el-select>
</el-form-item>
<!-- 月台 -->
<el-form-item label="月台" prop="DockCode" >
<el-select v-model="formData.configuration.DockCode" placeholder="请选择月台" clearable>
<el-option v-for="cur in options.dockList" :key="cur.code" :label="cur.name" :value="cur.code" />
<el-form-item label="月台" prop="DockCode">
<el-select
v-model="formData.configuration.DockCode"
placeholder="请选择月台"
clearable
>
<el-option
v-for="cur in options.dockList"
:key="cur.code"
:label="cur.name"
:value="cur.code"
/>
</el-select>
</el-form-item>
<!-- 在途库位 -->
<el-form-item label="在途库位" prop="OnTheWayLocationCode" >
<el-select v-model="formData.configuration.OnTheWayLocationCode" placeholder="请选择在途库位" clearable>
<el-option v-for="cur in options.locationList" :key="cur.code" :label="cur.name" :value="cur.code" />
<el-form-item label="在途库位" prop="OnTheWayLocationCode">
<el-select
v-model="formData.configuration.OnTheWayLocationCode"
placeholder="请选择在途库位"
clearable
>
<el-option
v-for="cur in options.locationList"
:key="cur.code"
:label="cur.name"
:value="cur.code"
/>
</el-select>
</el-form-item>
</el-col>
@ -134,8 +251,6 @@ import { getDockList } from '@/api/wms/dock'
import { getLocationList } from '@/api/wms/location'
import * as RuleApi from '@/api/wms/rule'
const { t } = useI18n() //
const message = useMessage() //
@ -149,31 +264,31 @@ const formStrategyCode = ref('')
// form
const formData = ref({
id: '',
strategyCode: formStrategyCode.value,//id
name: '',//
description: '',//
priority: '',//
status: true,//
strategyCode: formStrategyCode.value, //id
name: '', //
description: '', //
priority: '', //
status: true, //
//
condition: [
//
{ ParamCode: 'SupplierType', Operator: "==", Value: "" },
{ ParamCode: 'SupplierType', Operator: '==', Value: '' },
//
{ ParamCode: 'SupplierCode', Operator: "IN", Value: "" },
{ ParamCode: 'SupplierCode', Operator: 'IN', Value: '' },
//
{ ParamCode: 'Weekday', Operator: "IN", Value: [] }
{ ParamCode: 'Weekday', Operator: 'IN', Value: [] }
],
configuration: {
//
BeginTime:"",
BeginTime: '',
//
EndTime:"",
EndTime: '',
//
WarehouseCode:"",
WarehouseCode: '',
//
DockCode:"",
DockCode: '',
//
OnTheWayLocationCode:"",
OnTheWayLocationCode: ''
}
})
@ -182,7 +297,7 @@ const rules = ref({
strategyCode: [{ required: true, message: '请输入代码', trigger: 'blur' }],
name: [{ required: true, message: '请输入名字', trigger: 'blur' }],
description: [{ required: true, message: '请输入描述', trigger: 'blur' }],
priority: [{ required: true, message: '请输入优先级', trigger: 'blur' }],
priority: [{ required: true, message: '请输入优先级', trigger: 'blur' }]
})
//
@ -196,11 +311,11 @@ const rangeOptions = [
{ value: 'IN', label: '包含' },
{ value: 'NOT IN', label: '不包含' },
{ value: 'NULL', label: '为空' },
{ value: 'NOT NULL', label: '不为空' },
{ value: 'NOT NULL', label: '不为空' }
]
const formatRangeOptions = (...rest) => {
//
let result = rangeOptions.filter(aItem => rest.some(bItem => aItem.value === bItem));
let result = rangeOptions.filter((aItem) => rest.some((bItem) => aItem.value === bItem))
return result
}
//
@ -216,21 +331,47 @@ const options = reactive({
//
weekRangeOptions: formatRangeOptions('IN', 'NOT IN'),
//
weekOptions: [{ value: 1, label: '星期一' }, { value: 2, label: '星期二' }, { value: 3, label: '星期三' }, { value: 4, label: '星期四' }, { value: 5, label: '星期五' }, { value: 6, label: '星期六' }, { value: 7, label: '星期日' }],
weekOptions: [
{ value: 1, label: '星期一' },
{ value: 2, label: '星期二' },
{ value: 3, label: '星期三' },
{ value: 4, label: '星期四' },
{ value: 5, label: '星期五' },
{ value: 6, label: '星期六' },
{ value: 7, label: '星期日' }
],
//
warehouseList: [],
//
dockList: [],
//
locationList: [],
locationList: []
})
//
const Butttondata = ref([
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
])
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
//
const querySupplierParams = ref({
type: ''
})
//
const getFormSupplierList = async () => {
options.supplierList = await getSupplierList(querySupplierParams.value);
options.supplierList = await getSupplierList(querySupplierParams.value)
}
//
@ -242,16 +383,15 @@ const changeSupplierType = (e) => {
//
const getFormWarehouseList = async () => {
options.warehouseList = await getWarehouseList();
options.warehouseList = await getWarehouseList()
}
//
const getFormDockList = async () => {
options.dockList = await getDockList();
options.dockList = await getDockList()
}
//
const getFormLocationList = async () => {
options.locationList = await getLocationList({ type: 'TRANSPORT' });
options.locationList = await getLocationList({ type: 'TRANSPORT' })
}
getFormSupplierList()
@ -269,6 +409,7 @@ const open = async (type: string, strategyCode: string, id?: number) => {
//
if (id) {
formLoading.value = true
try {
let data = await RuleApi.getRule(id)
formData.value.id = data.id
@ -277,19 +418,33 @@ const open = async (type: string, strategyCode: string, id?: number) => {
formData.value.description = data.description
formData.value.priority = data.priority
formData.value.status = data.status == 0 ? true : false
if (formData.value.priority == 0) {
Butttondata.value = [
defaultButtons.formSaveBtn({disabled:true}), //
defaultButtons.formCloseBtn(null) //
]
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
if (data.condition) {
formData.value.condition = JSON.parse(data.condition)
}
if (data.configuration) {
formData.value.configuration = JSON.parse(data.configuration)
formData.value.configuration = JSON.parse(data.configuration)
}
querySupplierParams.value.type = formData.value?.condition[0]?.Value || ''
getFormSupplierList()
} finally {
formLoading.value = false
}
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
}
defineExpose({ open }) // open
@ -301,16 +456,21 @@ const submitForm = async () => {
if (!formRef) return
const valid = await formRef.value.validate()
if (!valid) return
if(formData.value.priority == 0){
message.error('优先级不可以为0')
return
}
//
formLoading.value = true
try {
let data = {
id: formData.value.id,
strategyCode: formData.value.strategyCode,//
name: formData.value.name,//
description: formData.value.description,//
priority: formData.value.priority,//
status: formData.value.status ? 0 : 1,//
strategyCode: formData.value.strategyCode, //
name: formData.value.name, //
description: formData.value.description, //
priority: formData.value.priority, //
status: formData.value.status ? 0 : 1, //
//
condition: JSON.stringify(formData.value.condition),
configuration: JSON.stringify(formData.value.configuration)
@ -334,52 +494,34 @@ const submitForm = async () => {
const resetForm = () => {
formData.value = {
id: '',
strategyCode: formStrategyCode.value,//
name: '',//
description: '',//
priority: '',//
status: true,//
strategyCode: formStrategyCode.value, //
name: '', //
description: '', //
priority: '', //
status: true, //
//
condition: [
//
{ ParamCode: 'SupplierType', Operator: "==", Value: "" },
{ ParamCode: 'SupplierType', Operator: '==', Value: '' },
//
{ ParamCode: 'SupplierCode', Operator: "IN", Value: "" },
{ ParamCode: 'SupplierCode', Operator: 'IN', Value: '' },
//
{ ParamCode: 'Weekday', Operator: "IN", Value: [] }
{ ParamCode: 'Weekday', Operator: 'IN', Value: [] }
],
configuration: {
//
BeginTime:"",
//
EndTime:"",
//
WarehouseCode:"",
//
DockCode:"",
//
OnTheWayLocationCode:"",
}
}
}
//
const Butttondata = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null), //
]
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
//
BeginTime: '',
//
EndTime: '',
//
WarehouseCode: '',
//
DockCode: '',
//
OnTheWayLocationCode: ''
}
}
}
</script>
<style scoped lang="scss">
.item {

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

@ -1,5 +1,5 @@
<!-- 供应商送货策略 -->
<!-- 采购计划策略 -->
<template>
<!-- 搜索工作栏 -->
<ContentWrap>

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

@ -35,7 +35,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="优先级" prop="priority">
<el-input-number v-model="formData.priority" :min="0" />
<el-input-number v-model="formData.priority" :min="0" />
</el-form-item>
</el-col>
<el-col :span="12">
@ -629,7 +629,22 @@ const options = reactive({
//
warehouseList: []
})
//
const Butttondata = ref([
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
])
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
//
const getFormSupplierList = async () => {
options.supplierList = await getSupplierList()
@ -708,6 +723,18 @@ const open = async (type: string, strategyCode: string, id?: number) => {
formData.value.description = data.description
formData.value.priority = data.priority
formData.value.status = data.status == 0 ? true : false
if (formData.value.priority == 0) {
Butttondata.value = [
defaultButtons.formSaveBtn({disabled:true}), //
defaultButtons.formCloseBtn(null) //
]
console.log(Butttondata)
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
if (data.condition) {
formData.value.condition = JSON.parse(data.condition)
}
@ -749,6 +776,11 @@ const open = async (type: string, strategyCode: string, id?: number) => {
} finally {
formLoading.value = false
}
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
}
defineExpose({ open }) // open
@ -760,6 +792,10 @@ const submitForm = async () => {
if (!formRef) return
const valid = await formRef.value.validate()
if (!valid) return
if(formData.value.priority == 0){
message.error('优先级不可以为0')
return
}
//
formLoading.value = true
try {
@ -844,22 +880,6 @@ const resetForm = () => {
}
}
//
const Butttondata = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
</script>
<style scoped lang="scss">
.item {

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

@ -183,6 +183,22 @@ const options = reactive({
//
itemTypeOptions: [{ value: 'ItemGroup', label: '物品分组' }, { value: 'ItemCode', label: '物品' }, { value: 'Project', label: '项目' }],
})
//
const Butttondata = ref([
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
])
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
// //abc//
const changeItemsType = () => {
@ -206,6 +222,17 @@ const open = async (type: string, strategyCode: string, id?: number) => {
formData.value.description = data.description
formData.value.priority = data.priority
formData.value.status = data.status == 0 ? true : false
if (formData.value.priority == 0) {
Butttondata.value = [
defaultButtons.formSaveBtn({disabled:true}), //
defaultButtons.formCloseBtn(null) //
]
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
if (data.condition) {
formData.value.condition = JSON.parse(data.condition)
}
@ -216,6 +243,11 @@ const open = async (type: string, strategyCode: string, id?: number) => {
} finally {
formLoading.value = false
}
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
}
defineExpose({ open }) // open
@ -227,6 +259,10 @@ const submitForm = async () => {
if (!formRef) return
const valid = await formRef.value.validate()
if (!valid) return
if(formData.value.priority == 0){
message.error('优先级不可以为0')
return
}
//
formLoading.value = true
try {
@ -279,22 +315,6 @@ const resetForm = () => {
}
}
//
const Butttondata = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null), //
]
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
const validatorNum = (rule: any, value: any, callback: any) => {
if (value && formData.value.configuration[0].Value != -1) {

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

@ -324,6 +324,22 @@ const options = reactive({
//
overflowWarehouseList: []
})
//
const Butttondata = ref([
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
])
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
//
const getFormWarehouseList = async () => {
@ -382,6 +398,17 @@ const open = async (type: string, strategyCode: string, id?: number) => {
formData.value.description = data.description
formData.value.priority = data.priority
formData.value.status = data.status == 0 ? true : false
if (formData.value.priority == 0) {
Butttondata.value = [
defaultButtons.formSaveBtn({disabled:true}), //
defaultButtons.formCloseBtn(null) //
]
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
if (data.condition) {
formData.value.condition = JSON.parse(data.condition)
}
@ -402,6 +429,11 @@ const open = async (type: string, strategyCode: string, id?: number) => {
} finally {
formLoading.value = false
}
} else {
Butttondata.value = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
}
}
defineExpose({ open }) // open
@ -413,6 +445,10 @@ const submitForm = async () => {
if (!formRef) return
const valid = await formRef.value.validate()
if (!valid) return
if(formData.value.priority == 0){
message.error('优先级不可以为0')
return
}
//
formLoading.value = true
try {
@ -490,22 +526,7 @@ const resetForm = () => {
}
}
//
const Butttondata = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
//
const buttonBaseClick = (val, item) => {
//
if (val == 'save') {
submitForm()
}
//
else if (val == 'close') {
dialogVisible.value = false
}
}
</script>
<style scoped lang="scss">
.item {

20
src/views/wms/countManage/count/countJobMain/countJobMain.data.ts

@ -518,16 +518,16 @@ export const CountJobMain = useCrudSchemas(reactive<CrudSchema[]>([
// width: 150
// },
// },
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 120,
fixed: 'right'
},
}
// {
// label: '操作',
// field: 'action',
// isDetail: false,
// isForm: false,
// table: {
// width: 120,
// fixed: 'right'
// },
// }
]))
//表单校验

16
src/views/wms/countManage/count/countPlanMain/countPlanMain.data.ts

@ -91,14 +91,14 @@ export const CountPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '盘点范围列表',
field: 'scopeList',
sort: 'custom',
table: {
width: 150
},
},
// {
// label: '盘点范围列表',
// field: 'scopeList',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '快照盘点',
field: 'isSnapshot',

74
src/views/wms/countManage/count/countPlanMain/index.vue

@ -272,30 +272,64 @@ const butttondata = (row) => {
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') {
//
console.log('列表-操作按钮事件-关闭')
} else if (val == 'mainReAdd') {
//
console.log('列表-操作按钮事件-重新添加')
} else if (val == 'mainSubmit') {
//
console.log('列表-操作按钮事件-提交审批')
} else if (val == 'mainTurnDown') {
//
console.log('列表-操作按钮事件-驳回')
} else if (val == 'mainApprove') {
//
console.log('列表-操作按钮事件-审批通过')
} else if (val == 'edit') {
//
if (val == 'mainPlanOpe') { //
CountPlanMainApi.open(row.id).then(() => {
message.success(t('打开成功'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainPlanClo') { //
await message.confirm('确认要关闭吗?')
CountPlanMainApi.close(row.id).then(() => {
message.success(t('关闭成功'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainPlanSub') { //
await message.confirm(t('common.confirmSubmit'))
await CountPlanMainApi.submit(row.id)
message.success(t('提交审批成功'))
await getList()
} else if (val == 'mainPlanTur') { //
await message.confirm('确认要驳回吗?')
CountPlanMainApi.reject(row.id).then(() => {
message.success(t('驳回成功'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainPlanApp') { //
await message.confirm('确认要审批通过吗?')
CountPlanMainApi.agree(row.id).then(() => {
message.success(t('审批已通过'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainPlanPub') { //
await message.confirm('确认要发布吗?')
CountPlanMainApi.publish(row.id).then(() => {
message.success(t('发布成功'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainPlanRes') { //
await message.confirm('确认要重置吗?')
CountPlanMainApi.resetting(row.id).then(() => {
message.success(t('common.updateSuccess'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') {
//
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = async (type: string, row?: number) => {

10
src/views/wms/countManage/count/countRecordMain/countRecordMain.data.ts

@ -247,6 +247,16 @@ export const CountRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 180,
fixed: 'right'
},
}
]))
//表单校验

14
src/views/wms/countManage/count/countRecordMain/index.vue

@ -120,11 +120,23 @@ const buttonBaseClick = (val, item) => {
// -
const butttondata = (row) => {
return []
return [
defaultButtons.mainCountAdjustRequesttBtn({
hasPermi: 'wms:count-record-main:generate'
}), //
]
}
// -
const buttonTableClick = async (val, row) => {
if(val == 'countAdjustRequest'){
CountRecordMainApi.generateCountRecordMain(row.id).then(()=>{
message.success(t('生成成功'))
getList()
}).catch(err => {
console.log(err)
})
}
}
/** 详情操作 */

56
src/views/wms/countManage/count/countRequestMain/index.vue

@ -148,8 +148,8 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:count-request-main:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:count-request-main:import'}), //
// defaultButtons.defaultAddBtn({hasPermi:'wms:count-request-main:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'wms:count-request-main:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:count-request-main:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
@ -205,19 +205,57 @@ const butttondata = (row) => {
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { //
handleClose(row.id)
await message.confirm('确认要关闭吗?')
CountRequestMainApi.close(row.id).then(() => {
message.success(t('关闭成功'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainReAdd') { //
handleReAdd(row.id)
await message.confirm('确认要重新添加吗?')
CountRequestMainApi.reAdd(row.id).then(() => {
message.success(t('添加成功'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainSubmit') { //
handleSubmit(row.id)
await message.confirm('确认要提交审批吗?')
CountRequestMainApi.submit(row.id).then(() => {
message.success(t('提交审批成功'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainTurnDown') { //
handleRefused(row.id)
await message.confirm('确认要驳回吗?')
CountRequestMainApi.refused(row.id).then(() => {
message.success(t('驳回成功'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainApprove') { //
handleAgree(row.id)
await message.confirm('确认要审批通过吗?')
CountRequestMainApi.agree(row.id).then(() => {
message.success(t('审批已通过'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainHandle') { //
handleHandle(row.id)
} else if (val == 'edit') { //
await message.confirm('确认要处理吗?')
CountRequestMainApi.handle(row.id).then(() => {
message.success(t('处理成功'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}

73
src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue

@ -134,8 +134,8 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:countadjust-request-main:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:countadjust-request-main:import'}), //
// defaultButtons.defaultAddBtn({hasPermi:'wms:countadjust-request-main:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'wms:countadjust-request-main:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:countadjust-request-main:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
@ -178,37 +178,73 @@ const isShowMainButton = (row,val) => {
// -
const butttondata = (row) => {
return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6'])}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListEditBtn({hasPermi:'wms:countadjust-request-main:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'wms:countadjust-request-main:delete'}), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:countadjust-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:countadjust-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:countadjust-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:countadjust-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:countadjust-request-main:agree'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:countadjust-request-main:handle'}), //
defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:countadjust-request-main:delete'}), //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭')
await message.confirm('确认要关闭吗?')
CountadjustRequestMainApi.close(row.id).then(() => {
message.success(t('关闭成功'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加')
await message.confirm('确认要重新添加吗?')
CountadjustRequestMainApi.reAdd(row.id).then(() => {
message.success(t('添加成功'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批')
await message.confirm('确认要提交审批吗?')
CountadjustRequestMainApi.submit(row.id).then(() => {
message.success(t('提交审批成功'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回')
await message.confirm('确认要驳回吗?')
CountadjustRequestMainApi.refused(row.id).then(() => {
message.success(t('驳回成功'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过')
} else if (val == 'edit') { //
await message.confirm('确认要审批通过吗?')
CountadjustRequestMainApi.agree(row.id).then(() => {
message.success(t('审批已通过'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'mainHandle') { //
await message.confirm('确认要处理吗?')
CountadjustRequestMainApi.handle(row.id).then(() => {
message.success(t('处理成功'))
getList()
}).catch(err => {
console.log(err)
})
} else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const formRef = ref()
const openForm =async (type: string, row?: number) => {
@ -317,6 +353,5 @@ const searchFormClick = (searchData) => {
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await CountadjustRequestMainApi.importTemplate()
})
</script>

111
src/views/wms/productionManage/productrepair/productrepairRecordMain/index.vue

@ -47,6 +47,7 @@
:tableAllSchemas="ProductrepairRecordDetail.allSchemas"
:tableFormRules="ProductrepairRecordDetailRules"
:isBusiness="true"
@buttonOperationClick="buttonOperationClick"
/>
<!-- 详情 -->
@ -57,15 +58,42 @@
:detailAllSchemas="ProductrepairRecordDetail.allSchemas"
:detailAllSchemasRules="ProductrepairRecordDetailRules"
:apiPage="ProductrepairRecordDetailApi.getProductrepairRecordDetailPage"
:buttondataTable="buttondataTable"
@tableFormButton="tableFormButton"
/>
<!-- bom列表 -->
<Dialog
:title="DialogTitle"
v-model="bomModelVisible"
width="80%"
:scroll="true"
max-height="450px"
>
<TableForm
ref="tableFormRef"
class="w-[100%]"
:tableFields="BomDismantle.allSchemas.tableColumns"
:tableData="detatableDataBom.tableList"
:isShowButton="false"
:isShowReduceButton="false"
/>
<template #footer>
<ButtonBase :Butttondata="ButttondataBom" @button-base-click="buttonBaseClickBom" />
</template>
</Dialog>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { ProductrepairRecordMain,ProductrepairRecordMainRules,ProductrepairRecordDetail,ProductrepairRecordDetailRules } from './productrepairRecordMain.data'
import { ProductrepairRecordMain,ProductrepairRecordMainRules,ProductrepairRecordDetail,ProductrepairRecordDetailRules, BomDismantle } from './productrepairRecordMain.data'
import * as ProductrepairRecordMainApi from '@/api/wms/productrepairRecordMain'
import * as ProductrepairRecordDetailApi from '@/api/wms/productrepairRecordDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as BomDismantleApi from "@/api/wms/bomDismantle";
import {getBomDismantleRecordPage} from "@/api/wms/bomDismantle";
//
defineOptions({ name: 'ProductrepairRecordMain' })
@ -78,6 +106,87 @@ const routeName = ref()
routeName.value = route.name
const tableColumns = ref(ProductrepairRecordMain.allSchemas.tableColumns)
// table
const buttondataTable = ref([{
label: 'Bom',
name: 'bom',
hide: false,
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true, //
}])
// Bom
const DialogTitle = ref('Bom信息')
const bomModelVisible = ref(false)
const tableListBom = ref()
const { tableObject: detatableDataBom, tableMethods: detatableMethodsBom } =useTable({
getListApi: BomDismantleApi.getBomDismantleRecordPage
})
const { getList:getDetailListBom } = detatableMethodsBom
// tableform
const buttonOperationClick = async (row, label, index)=> {
if (row.itemCode == '') {
message.warning('请选择物品代码!')
return
}
detatableDataBom.params.itemCode = row.itemCode
DialogTitle.value = '物品代码:【' + row.itemCode + '】 Bom 信息'
bomModelVisible.value = true
await getDetailListBom()
detatableDataBom.tableList.map(item => {
item.rowId = index
if(tableData.value[index].childList) {
tableData.value[index].childList.forEach(itemChild => {
if (itemChild.itemCode == item.itemCode) {
item.qty = itemChild.qty
}
})
}
})
}
/** bom 列表 表单 按钮 */
const ButttondataBom = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
]
// bom
const buttonBaseClickBom = (val) => {
//
if (val == 'save') {
//
tableListBom.value = detatableDataBom.tableList.filter(item => (item.qty!=0))
tableData.value.forEach((item, index) => {
if(tableListBom.value[0].rowId == index) {
item.childList = tableListBom.value
}
})
console.log(157, tableData.value)
bomModelVisible.value = false
}
//
else if (val == 'close') {
bomModelVisible.value = false
}
}
// Bom
const tableFormButton = async (val , row) => {
if (val == 'bom') { // bom
bomModelVisible.value = true
DialogTitle.value = '物品代码【' + row.itemCode + '】——Bom信息'
detatableDataBom.params = {
masterId: row.id
}
await getDetailListBom()
}
}
//
const updataTableColumns = (val) => {
tableColumns.value = val

294
src/views/wms/productionManage/productrepair/productrepairRecordMain/productrepairRecordMain.data.ts

@ -1,5 +1,7 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import {Bom} from "@/views/wms/basicDataManage/itemManage/bom/bom.data";
import * as BomApi from "@/api/wms/bom";
/**
* @returns {Array}
@ -581,6 +583,69 @@ export const ProductrepairRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
},
{
label: 'Bom版本',
field: 'bomVersion',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择Bom版本', // 输入框占位文本
searchField: 'version', // 查询弹窗赋值字段
searchTitle: '物料清单信息', // 查询弹窗标题
searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类
searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法
searchCondition: [{
key:'productItemCode',
value:'itemCode',
isMainValue: true
},{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
disabled: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Bom版本', // 输入框占位文本
searchField: 'version', // 查询弹窗赋值字段
searchTitle: '物料清单信息', // 查询弹窗标题
searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类
searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法
searchCondition: [{
key:'productItemCode',
value:'itemCode',
isMainValue: true
},{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 150,
fixed: 'right'
},
isTableForm: true,
tableForm: {
type: 'action',
buttonText: 'Bom',
buttonName: 'Bom'
}
},
]))
//表单校验
@ -624,4 +689,231 @@ export const ProductrepairRecordDetailRules = reactive({
creator: [
{ required: true, message: '请输入创建者', trigger: 'blur' }
],
})
})
/**
* @returns {Array} bom
*/
export const BomDismantle = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '行标记',
field: 'rowId',
isTableForm: false,
isForm: false,
tableForm:{
disabled: true
},
table: {
show: false
}
},
{
label: '物品代码',
field: 'itemCode',
tableForm:{
disabled: true
}
},
{
label: '数量',
field: 'qty',
tableForm: {
disabled: true,
type: 'InputNumber',
min: 0,
precision: 6
}
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
tableForm:{
type: 'Select',
disabled: true
}
},
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '包装号',
field: 'packingNumber',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '从库位代码',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '物品名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '物品描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '物品描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
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',
}
},
tableForm:{
disabled: true
}
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '最后更新时间',
field: 'updateTime',
formatter: dateFormatter,
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',
}
},
tableForm:{
disabled: true
}
},
{
label: '最后更新者',
field: 'updater',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
}
]))

105
src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue

@ -69,6 +69,8 @@
:apiPage="ProductrepairRequestDetailApi.getProductrepairRequestDetailaPage"
:apiDelete="ProductrepairRequestDetailApi.deleteProductrepairRequestDetaila"
@searchTableSuccessDetail="searchTableSuccessDetail"
:buttondataTable="buttondataTable"
@tableFormButton="tableFormButton"
/>
<!-- bom列表 -->
@ -117,6 +119,18 @@ const routeName = ref()
routeName.value = route.name
const tableColumns = ref(ProductrepairRequestMain.allSchemas.tableColumns)
// table
const buttondataTable = ref([{
label: 'Bom',
name: 'bom',
hide: false,
type: 'primary',
icon: '',
color: '',
hasPermi: '',
link: true, //
}])
// Bom
const DialogTitle = ref('Bom信息')
const bomModelVisible = ref(false)
@ -171,7 +185,6 @@ const buttonOperationClick = async (row, label, index)=> {
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
@ -190,6 +203,12 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['uom'] = val[0]['uom']
row['inventoryStatus'] = val[0]['inventoryStatus']
row['fromLocationCode'] = val[0]['locationCode']
} else if(formField == 'productionLineCode'){
row['productionLineCode'] = val[0]['code']
} else if(formField == 'workStationCode'){
row['workStationCode'] = val[0]['code']
} else if(formField == 'formField'){
row['workStationCode'] = val[0]['code']
} else {
row[formField] = val[0][searchField]
}
@ -226,7 +245,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:productrepair-request-main:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:productrepair-request-main:import'}), //
// defaultButtons.defaultImportBtn({hasPermi:'wms:productrepair-request-main:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:productrepair-request-main:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
@ -284,14 +303,22 @@ const butttondata = (row) => {
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭')
handleClose(row.id)
} else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加')
handleReAdd(row.id)
} else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批')
handleSubmit(row.id)
} else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回')
handleRefused(row.id)
} else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过')
handleAgree(row.id)
} else if (val == 'mainHandle') { //
console.log('列表-操作按钮事件-处理')
handleHandle(row.id)
} else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
@ -299,6 +326,66 @@ const buttonTableClick = async (val, row) => {
}
}
/** 关闭按钮操作 */
const handleClose = async (id: number) => {
try {
await message.confirm(t('common.confirmColse'))
await ProductrepairRequestMainApi.closeProductrepairRequestMain(id)
message.success(t('common.closeSuccess'))
await getList()
} catch {}
}
/** 重新添加按钮操作 */
const handleReAdd = async (id: number) => {
try {
await message.confirm(t('common.confirmReAdd'))
await ProductrepairRequestMainApi.reAddProductrepairRequestMain(id)
message.success(t('common.reAddSuccess'))
await getList()
} catch {}
}
/** 提交按钮操作 */
const handleSubmit = async (id: number) => {
try {
await message.confirm(t('common.confirmSubmit'))
await ProductrepairRequestMainApi.submitProductrepairRequestMain(id)
message.success(t('common.submitSuccess'))
await getList()
} catch {}
}
/** 审批驳回按钮操作 */
const handleRefused = async (id: number) => {
try {
await message.confirm(t('common.confirmRefused'))
await ProductrepairRequestMainApi.refusedProductrepairRequestMain(id)
message.success(t('common.refusedSuccess'))
await getList()
} catch {}
}
/** 审批通过按钮操作 */
const handleAgree = async (id: number) => {
try {
await message.confirm(t('common.confirmAgree'))
await ProductrepairRequestMainApi.agreeProductrepairRequestMain(id)
message.success(t('common.agreeSuccess'))
await getList()
} catch {}
}
/** 处理按钮操作 */
const handleHandle = async (id: number) => {
try {
await message.confirm(t('common.confirmHandle'))
await ProductrepairRequestMainApi.handleProductrepairRequestMain(id)
message.success(t('common.handleSuccess'))
await getList()
} catch {}
}
/** 添加/修改操作 */
const formRef = ref()
const openForm =async (type: string, row?: number) => {
@ -404,7 +491,19 @@ const searchFormClick = (searchData) => {
getList() //
}
// Bom
const tableFormButton = async (val , row) => {
if (val == 'bom') { // bom
bomModelVisible.value = true
DialogTitle.value = '物品代码【' + row.itemCode + '】——Bom信息'
detatableDataBom.params = {
itemCode: row.itemCode,
bomVersion: row.bomVersion,
masterId: row.id
}
await getDetailListBom()
}
}
/** 初始化 **/
onMounted(async () => {

262
src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts

@ -36,6 +36,8 @@ const queryParams = {
// 获取当前操作人的部门
import { useUserStore } from '@/store/modules/user'
import {Bom} from "@/views/wms/basicDataManage/itemManage/bom/bom.data";
import * as BomApi from "@/api/wms/bom";
const userStore = useUserStore()
const userDept = userStore.userSelfInfo.dept
@ -830,6 +832,51 @@ export const ProductrepairRequestDetaila = useCrudSchemas(reactive<CrudSchema[]>
isTableForm: false,
isForm: false
},
{
label: 'Bom版本',
field: 'bomVersion',
sort: 'custom',
table: {
width: 150
},
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择Bom版本', // 输入框占位文本
searchField: 'version', // 查询弹窗赋值字段
searchTitle: '物料清单信息', // 查询弹窗标题
searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类
searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法
searchCondition: [{
key:'productItemCode',
value:'itemCode',
isMainValue: true
},{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Bom版本', // 输入框占位文本
searchField: 'version', // 查询弹窗赋值字段
searchTitle: '物料清单信息', // 查询弹窗标题
searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类
searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法
searchCondition: [{
key:'productItemCode',
value:'itemCode',
isMainValue: true
},{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
},
{
label: '操作',
field: 'action',
@ -1056,34 +1103,6 @@ export const ConsumereRequestDetailb = useCrudSchemas(reactive<CrudSchema[]>([
}
]))
//表单校验
export const ConsumereRequestDetailbRules = reactive({
inventoryStatus: [
{ required: true, message: '请选择库存状态', trigger: 'change' }
],
packingNumber: [
{ required: true, message: '请选择包装号', trigger: 'change' }
],
batch: [
{ required: true, message: '请输入批次', trigger: 'blur' }
],
fromLocationCode: [
{ required: true, message: '请选择从库位代码', trigger: 'change' }
],
number: [
{ required: true, message: '请输入单据号', trigger: 'blur' }
],
itemCode: [
{ required: true, message: '请选择物品代码', trigger: 'change' }
],
createTime: [
{ required: true, message: '请输入创建时间', trigger: 'blur' }
],
creator: [
{ required: true, message: '请输入创建者', trigger: 'blur' }
],
})
/**
* @returns {Array} bom
@ -1096,6 +1115,9 @@ export const BomDismantle = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false,
tableForm:{
disabled: true
},
table: {
show: false
}
},
{
@ -1124,4 +1146,186 @@ export const BomDismantle = useCrudSchemas(reactive<CrudSchema[]>([
disabled: true
}
},
]))
{
label: '库存状态',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '包装号',
field: 'packingNumber',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '从库位代码',
field: 'fromLocationCode',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '物品名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '物品描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '物品描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '创建时间',
field: 'createTime',
formatter: dateFormatter,
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',
}
},
tableForm:{
disabled: true
}
},
{
label: '创建者',
field: 'creator',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
},
{
label: '最后更新时间',
field: 'updateTime',
formatter: dateFormatter,
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',
}
},
tableForm:{
disabled: true
}
},
{
label: '最后更新者',
field: 'updater',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled: true
}
}
]))

2
src/views/wms/purchasereceiptManage/inspect/inspectJobMain/index.vue

@ -219,7 +219,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await InspectJobMainApi.exportInspectJobMain(setSearchParams)
download.excel(data, '检验任务主.xls')
download.excel(data, '检验任务主.xlsx')
} catch {
} finally {
exportLoading.value = false

2
src/views/wms/purchasereceiptManage/inspect/inspectRecordMain/index.vue

@ -144,7 +144,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await InspectRecordMainApi.exportInspectRecordMain(setSearchParams)
download.excel(data, '检验记录主.xls')
download.excel(data, '检验记录主.xlsx')
} catch {
} finally {
exportLoading.value = false

2
src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/index.vue

@ -307,7 +307,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await InspectRequestMainApi.exportInspectRequestMain(setSearchParams)
download.excel(data, '检验申请主.xls')
download.excel(data, '检验申请主.xlsx')
} catch {
} finally {
exportLoading.value = false

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

@ -350,7 +350,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '采购收货申请主导入模版.xls'
templateTitle: '采购收货申请主导入模版.xlsx'
})
//

2
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/index.vue

@ -219,7 +219,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await PurchasereturnJobMainApi.exportPurchasereturnJobMain(setSearchParams)
download.excel(data, '采购退货任务主.xls')
download.excel(data, '采购退货任务主.xlsx')
} catch {
} finally {
exportLoading.value = false

2
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue

@ -142,7 +142,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await PurchasereturnRecordMainApi.exportPurchasereturnRecordMain(setSearchParams)
download.excel(data, '采购退货记录主.xls')
download.excel(data, '采购退货记录主.xlsx')
} catch {
} finally {
exportLoading.value = false

2
src/views/wms/purchasereceiptManage/putaway/putawayJobMain/index.vue

@ -219,7 +219,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await PutawayJobMainApi.exportPutawayJobMain(setSearchParams)
download.excel(data, '上架任务主.xls')
download.excel(data, '上架任务主.xlsx')
} catch {
} finally {
exportLoading.value = false

2
src/views/wms/purchasereceiptManage/putaway/putawayRecordMain/index.vue

@ -142,7 +142,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await PutawayRecordMainApi.exportPutawayRecordMain(setSearchParams)
download.excel(data, '上架记录主.xls')
download.excel(data, '上架记录主.xlsx')
} catch {
} finally {
exportLoading.value = false

5
src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue

@ -68,6 +68,7 @@
:apiPage="PutawayRequestDetailApi.getPutawayRequestDetailPage"
:apiDelete="PutawayRequestDetailApi.deletePutawayRequestDetail"
:Echo="Echo"
fromeWhere="putawayRequest"
@searchTableSuccessDetail="searchTableSuccessDetail"
/>
@ -311,7 +312,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await PutawayRequestMainApi.exportPutawayRequestMain(setSearchParams)
download.excel(data, '上架申请主.xls')
download.excel(data, '上架申请主.xlsx')
} catch {
} finally {
exportLoading.value = false
@ -364,7 +365,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '上架申请主导入模版.xls'
templateTitle: '上架申请主导入模版.xlsx'
})
//

21
src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/putawayRequestMain.data.ts

@ -37,26 +37,6 @@ const userDept = userStore.userSelfInfo.dept
* @returns {Array}
*/
export const PutawayRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '到货检验记录单号',
field: 'inspectRecordNumber',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择到货检验记录单号', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '到货检验信息', // 查询弹窗标题
searchAllSchemas: InspectRequestMain.allSchemas, // 查询弹窗所需类
searchPage: InspectRequestMainApi.getInspectRequestMainPage // 查询弹窗所需分页方法
}
}
},
{
label: '从仓库代码',
field: 'fromWarehouseCode',
@ -756,6 +736,7 @@ export const PutawayRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'action',
isDetail: false,
isForm: false ,
isTable: false ,
table: {
width: 150,
fixed: 'right'

4
src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue

@ -245,7 +245,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await DemandforecastingMainApi.exportDemandforecastingMain(setSearchParams)
download.excel(data, '要货预测主.xls')
download.excel(data, '要货预测主.xlsx')
} catch {
} finally {
exportLoading.value = false
@ -298,7 +298,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '要货预测主导入模版.xls'
templateTitle: '要货预测主导入模版.xlsx'
})
//

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

@ -273,7 +273,7 @@
//
exportLoading.value = true
const data = await PurchaseMainApi.exportPurchaseMain(setSearchParams)
download.excel(data, '采购订单主.xls')
download.excel(data, '采购订单主.xlsx')
} catch {
} finally {
exportLoading.value = false

26
src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue

@ -76,21 +76,27 @@
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(async () => {
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
row['itemCode'] = val[0]['code']
row['poNumber'] = val[0]['number']
row['poLine'] = val[0]['lineNumber']
await PurchaseDetailApi.getPurchaseDetailPage({
number: row['poNumber'],
poLine: row['lineNumber'],
available: 'TRUE',
// poLine: row['lineNumber'],
}).then(res => {
if (res.list.length == 1) {
row['itemCode'] = res.list[0].itemCode
row['poLine'] = res.list[0].lineNumber
row['uom'] = res.list[0].uom
}
// if (formField == 'poLine') {
// row['itemCode'] = res.list[0].itemCode
// row['uom'] = res.list[0].uom
// }
if (res) tableData.value = res.list;
tableData.value.forEach(item => {
item.poNumber = item.number
item.poLine = item.lineNumber
item.planQty =item.orderQty-item.plannedQty
})
})
} else {
const setV = {}
@ -112,7 +118,7 @@
lineNumber: setV['poLine'],
}).then(res => {
if (res.list.length == 1) {
//
//
setV['itemCode'] = res.list[0].itemCode
}
})
@ -317,7 +323,7 @@
//
exportLoading.value = true
const data = await PurchasePlanMainApi.exportPurchasePlanMain(setSearchParams)
download.excel(data, '要货计划主.xls')
download.excel(data, '要货计划主.xlsx')
} catch {
} finally {
exportLoading.value = false
@ -403,7 +409,7 @@
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '要货计划主导入模版.xls'
templateTitle: '要货计划主导入模版.xlsx'
})
//

5
src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts

@ -279,8 +279,6 @@ export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
value: 2,
isMainValue: false
}
]
},
form: {
@ -478,9 +476,8 @@ export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
tableForm: {
type: 'Select',
default: 'TRUE',
inactiveValue: 'FALSE',
activeValue: 'TRUE'
disabled: true
},
form: {
component: 'Switch',

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

@ -144,7 +144,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await SupplierdeliverRecordMainApi.exportSupplierdeliverRecordMain(setSearchParams)
download.excel(data, '供应商发货记录主.xls')
download.excel(data, '供应商发货记录主.xlsx')
} catch {
} finally {
exportLoading.value = false

191
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/supplierdeliverRecordMain.data.ts

@ -391,57 +391,136 @@ export const SupplierdeliverRecordMainRules = reactive({
* @returns {Array}
*/
export const SupplierdeliverRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
// {
// label: '从包装号',
// field: 'fromPackingNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// },
// {
// label: '到包装号',
// field: 'toPackingNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// },
// {
// label: '从批次',
// field: 'fromBatch',
// sort: 'custom',
// table: {
// width: 150
// },
// },
// {
// label: '到批次',
// field: 'toBatch',
// sort: 'custom',
// table: {
// width: 150
// },
// },
// {
// label: '替代批次',
// field: 'altBatch',
// sort: 'custom',
// table: {
// width: 150
// },
// },
// {
// label: '从器具号',
// field: 'fromContainerNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// },
// {
// label: '到器具号',
// field: 'toContainerNumber',
// sort: 'custom',
// table: {
// width: 150
// },
// },
{
label: '订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '从包装号',
field: 'fromPackingNumber',
label: '订单行',
field: 'poLine',
sort: 'custom',
table: {
width: 150
},
},
{
label: '到包装号',
field: 'toPackingNumber',
label: '物品代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '从批次',
field: 'fromBatch',
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '到批次',
field: 'toBatch',
label: '标包数量',
field: 'stdPackQty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '替代批次',
field: 'altBatch',
label: '标包单位',
field: 'stdPackUnit',
dictType: DICT_TYPE.PACK_UNIT,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '从器具号',
field: 'fromContainerNumber',
label: '供应商计量数量',
field: 'supplierQty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '到器具号',
field: 'toContainerNumber',
label: '供应商计量单位',
field: 'supplierUom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
@ -507,66 +586,7 @@ export const SupplierdeliverRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
}
},
},
{
label: '订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '订单行',
field: 'poLine',
sort: 'custom',
table: {
width: 150
},
},
{
label: '标包数量',
field: 'stdPackQty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '标包单位',
field: 'stdPackUnit',
dictType: DICT_TYPE.PACK_UNIT,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '供应商计量数量',
field: 'supplierQty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '供应商计量单位',
field: 'supplierUom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
},
{
label: '从库位代码',
field: 'fromLocationCode',
@ -631,14 +651,7 @@ export const SupplierdeliverRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
width: 150
},
},
{
label: '物品代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
},
{
label: '物品名称',
field: 'itemName',
@ -671,17 +684,7 @@ export const SupplierdeliverRecordDetail = useCrudSchemas(reactive<CrudSchema[]>
width: 150
},
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
}
},
{
label: '计量单位',
field: 'uom',
@ -803,4 +806,4 @@ export const SupplierdeliverRecordDetailRules = reactive({
creator: [
{ required: true, message: '请输入创建者', trigger: 'blur' }
],
})
})

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

@ -109,9 +109,14 @@
if(formField=='ppNumber'){
// getBomDisassemble
PurchasePlanDetailApi.getPurchasePlanDetailList({ number: val[0]['number']}).then(res => { if (res) tableData.value = res; tableData.value.forEach(item=>{ item.batch = item.toBatch
item.qty = 1
}) }).catch(err => { console.log(err) })
PurchasePlanDetailApi.getPurchasePlanDetailList({
number: val[0]['number']}).then(res => {
if (res) tableData.value = res;
tableData.value.forEach(item=>{
item.batch = item.toBatch
item.qty = 1
})
}).catch(err => { console.log(err) })
}
formRef.setValues(setV)
}
@ -341,7 +346,7 @@
//
exportLoading.value = true
const data = await SupplierdeliverRequestMainApi.exportSupplierdeliverRequestMain(setSearchParams)
download.excel(data, '供应商发货申请主.xls')
download.excel(data, '供应商发货申请主.xlsx')
} catch {
} finally {
exportLoading.value = false
@ -520,7 +525,7 @@
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '供应商发货申请主导入模版.xls'
templateTitle: '供应商发货申请主导入模版.xlsx'
})
//

565
src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/index.vue

@ -7,19 +7,13 @@
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="PurchaseclaimRequestMain.allSchemas"
/>
<TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName"
@updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick"
:allSchemas="PurchaseclaimRequestMain.allSchemas" />
<!-- 列表 -->
<ContentWrap>
<Table :columns="tableColumns" :data="tableObject.tableList"
:loading="tableObject.loading" :pagination="{
<Table :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">
@ -34,317 +28,324 @@
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="formRef"
@success="getList"
:rules="PurchaseclaimRequestMainRules"
:formAllSchemas="PurchaseclaimRequestMain.allSchemas"
:tableAllSchemas="PurchaseclaimRequestDetail.allSchemas"
:tableFormRules="PurchaseclaimRequestDetailRules"
:tableData="tableData"
:apiUpdate="PurchaseclaimRequestMainApi.updatePurchaseclaimRequestMain"
:apiCreate="PurchaseclaimRequestMainApi.createPurchaseclaimRequestMain"
:isBusiness="true"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
/>
<!-- 表单弹窗添加/修改 -->
<BasicForm ref="formRef" @success="getList" :rules="PurchaseclaimRequestMainRules"
:formAllSchemas="PurchaseclaimRequestMain.allSchemas" :tableAllSchemas="PurchaseclaimRequestDetail.allSchemas"
:tableFormRules="PurchaseclaimRequestDetailRules" :tableData="tableData"
:apiUpdate="PurchaseclaimRequestMainApi.updatePurchaseclaimRequestMain"
:apiCreate="PurchaseclaimRequestMainApi.createPurchaseclaimRequestMain" :isBusiness="true"
@handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable" @searchTableSuccess="searchTableSuccess"
@submitForm="submitForm" />
<!-- 详情 -->
<Detail
ref="detailRef"
:isBasic="false"
:allSchemas="PurchaseclaimRequestMain.allSchemas"
:detailAllSchemas="PurchaseclaimRequestDetail.allSchemas"
:detailAllSchemasRules="PurchaseclaimRequestDetailRules"
<Detail ref="detailRef" :isBasic="false" :allSchemas="PurchaseclaimRequestMain.allSchemas"
:detailAllSchemas="PurchaseclaimRequestDetail.allSchemas" :detailAllSchemasRules="PurchaseclaimRequestDetailRules"
:apiCreate="PurchaseclaimRequestDetailApi.createPurchaseclaimRequestDetail"
:apiUpdate="PurchaseclaimRequestDetailApi.updatePurchaseclaimRequestDetail"
:apiPage="PurchaseclaimRequestDetailApi.getPurchaseclaimRequestDetailPage"
:apiDelete="PurchaseclaimRequestDetailApi.deletePurchaseclaimRequestDetail"
@searchTableSuccessDetail="searchTableSuccessDetail"
/>
@searchTableSuccessDetail="searchTableSuccessDetail" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/purchaseclaim-request-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
<ImportForm ref="importFormRef" url="/wms/purchaseclaim-request-main/import" :importTemplateData="importTemplateData"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
</template>
<script setup lang="ts">
import { getAccessToken } from '@/utils/auth'
import download from '@/utils/download'
import * as PurchaseclaimRequestMainApi from '@/api/wms/purchaseclaimRequestMain'
import * as PurchaseclaimRequestDetailApi from '@/api/wms/purchaseclaimRequestDetail'
import { PurchaseclaimRequestMain, PurchaseclaimRequestMainRules, PurchaseclaimRequestDetail, PurchaseclaimRequestDetailRules } from './purchaseclaimRequestMain.data'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import BasicForm from '@/components/BasicForm/src/BasicForm.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import { getAccessToken } from '@/utils/auth'
import download from '@/utils/download'
import * as PurchaseclaimRequestMainApi from '@/api/wms/purchaseclaimRequestMain'
import * as PurchaseclaimRequestDetailApi from '@/api/wms/purchaseclaimRequestDetail'
import { PurchaseclaimRequestMain, PurchaseclaimRequestMainRules, PurchaseclaimRequestDetail, PurchaseclaimRequestDetailRules } from './purchaseclaimRequestMain.data'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import BasicForm from '@/components/BasicForm/src/BasicForm.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue'
//
defineOptions({ name: 'PurchaseclaimRequestMain' })
//
defineOptions({ name: 'PurchaseclaimRequestMain' })
const message = useMessage() //
const { t } = useI18n() //
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(PurchaseclaimRequestMain.allSchemas.tableColumns)
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(PurchaseclaimRequestMain.allSchemas.tableColumns)
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => {
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
row['poLine'] = val[0]['poLine']
row['batch'] = val[0]['toBatch']
row['altBatch'] = val[0]['altBatch']
row['itemCode'] = val[0]['itemCode']
row['itemName'] = val[0]['itemName']
row['itemDesc1'] = val[0]['itemDesc1']
row['itemDesc2'] = val[0]['itemDesc2']
row['projectCode'] = val[0]['projectCode']
row['qty'] = val[0]['qty']
row['uom'] = val[0]['uom']
} else {
//
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => {
if (type == 'tableForm') {
//
row[formField] = val[0][searchField]
row['poLine'] = val[0]['poLine']
row['batch'] = val[0]['toBatch']
row['altBatch'] = val[0]['altBatch']
row['itemCode'] = val[0]['itemCode']
row['itemName'] = val[0]['itemName']
row['itemDesc1'] = val[0]['itemDesc1']
row['itemDesc2'] = val[0]['itemDesc2']
row['projectCode'] = val[0]['projectCode']
row['qty'] = val[0]['qty']
row['uom'] = val[0]['uom']
} else {
//
const setV = {}
setV[formField] = val[0][searchField]
if(formField=='asnNumber'){
// getBomDisassemble
PurchasePlanDetailApi.getPurchasePlanDetailList({
number: val[0]['asnNumber']}).then(res => {
if (res) tableData.value = res;
tableData.value.forEach(item=>{
item.batch = item.toBatch
item.qty = 1
})
}).catch(err => {
console.log(err)
})
}
setV['ppNumber'] = val[0]['ppNumber']
setV['supplierCode'] = val[0]['supplierCode']
formRef.setValues(setV)
}
})
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
console.log(456)
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
setV['ppNumber'] = val[0]['ppNumber']
setV['supplierCode'] = val[0]['supplierCode']
setV['poLine'] = val[0]['poLine']
setV['batch'] = val[0]['toBatch']
setV['altBatch'] = val[0]['altBatch']
setV['itemCode'] = val[0]['itemCode']
setV['itemName'] = val[0]['itemName']
setV['itemDesc1'] = val[0]['itemDesc1']
setV['itemDesc2'] = val[0]['itemDesc2']
setV['projectCode'] = val[0]['projectCode']
setV['qty'] = val[0]['qty']
setV['uom'] = val[0]['uom']
formRef.setValues(setV)
}
})
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
setV['poLine'] = val[0]['poLine']
setV['batch'] = val[0]['toBatch']
setV['altBatch'] = val[0]['altBatch']
setV['itemCode'] = val[0]['itemCode']
setV['itemName'] = val[0]['itemName']
setV['itemDesc1'] = val[0]['itemDesc1']
setV['itemDesc2'] = val[0]['itemDesc2']
setV['projectCode'] = val[0]['projectCode']
setV['qty'] = val[0]['qty']
setV['uom'] = val[0]['uom']
formRef.setValues(setV)
})
}
})
}
const exportLoading = ref(false) //
const { tableObject, tableMethods } = useTable({
getListApi: PurchaseclaimRequestMainApi.getPurchaseclaimRequestMainPage //
})
const exportLoading = ref(false) //
const { tableObject, tableMethods } = useTable({
getListApi: PurchaseclaimRequestMainApi.getPurchaseclaimRequestMainPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({ hasPermi: 'wms:purchaseclaim-request-main:create' }), //
defaultButtons.defaultImportBtn({ hasPermi: 'wms:purchaseclaim-request-main:import' }), //
defaultButtons.defaultExportBtn({ hasPermi: 'wms:purchaseclaim-request-main:export' }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({ hasPermi: 'wms:purchaseclaim-request-main:create' }), //
defaultButtons.defaultImportBtn({ hasPermi: 'wms:purchaseclaim-request-main:import' }), //
defaultButtons.defaultExportBtn({ hasPermi: 'wms:purchaseclaim-request-main: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') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
}
// -
const buttondata = (row) => {
return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6'])}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5'])}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2'])}), //
defaultButtons.mainListEditBtn({ hide:isShowMainButton(row,['1']),hasPermi: 'wms:purchaseclaim-request-main:update' }), //
defaultButtons.mainListDeleteBtn({ hide:isShowMainButton(row,['1']),hasPermi: 'wms:purchaseclaim-request-main:delete' }), //
defaultButtons.mainListPointBtn(null), //
]
}
// -
const buttondata = (row) => {
return [
defaultButtons.mainListCloseBtn({ hide: isShowMainButton(row, ['1', '2', '3', '4', '6']) }), //
defaultButtons.mainListReAddBtn({ hide: isShowMainButton(row, ['4', '5']) }), //
defaultButtons.mainListSubmitBtn({ hide: isShowMainButton(row, ['1']) }), //
defaultButtons.mainListTurnDownBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListApproveBtn({ hide: isShowMainButton(row, ['2']) }), //
defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:purchaseclaim-request-main:update' }), //
defaultButtons.mainListDeleteBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:purchaseclaim-request-main:delete' }), //
defaultButtons.mainListPointBtn(null), //
]
}
//
const isShowMainButton = (row,val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
//
const isShowMainButton = (row, val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭')
} else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加')
} else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批')
} else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回')
} else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过')
} else if (val == 'edit') { //
// const res = await ItempackagingApi.getItempackaging(row.id)
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
} else if (val == 'point') { //
handlePoint(row.id)
// -
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭')
} else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加')
} else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批')
} else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回')
} else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过')
} else if (val == 'edit') { //
// const res = await ItempackagingApi.getItempackaging(row.id)
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
} else if (val == 'point') { //
handlePoint(row.id)
}
}
}
/** 添加/修改操作 */
const formRef = ref()
const openForm =async (type: string, row?: number) => {
tableData.value = [] //
//  if (row?.id) {
// const data= await PurchaseclaimRequestMainApi.getPurchaseclaimRequestMain(row.id)
// tableData.value = data.subList
// }
formRef.value.open(type, row)
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = async (type : string, row ?: number) => {
tableData.value = [] //
//  if (row?.id) {
// const data= await PurchaseclaimRequestMainApi.getPurchaseclaimRequestMain(row.id)
// tableData.value = data.subList
// }
formRef.value.open(type, row)
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue)
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row : any, titleName : any, titleValue : any) => {
detailRef.value.openDetail(row, titleName, titleValue)
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await PurchaseclaimRequestMainApi.deletePurchaseclaimRequestMain(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch { }
}
/** 删除按钮操作 */
const handleDelete = async (id : number) => {
try {
//
await message.delConfirm()
//
await PurchaseclaimRequestMainApi.deletePurchaseclaimRequestMain(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch { }
}
/** 导出按钮操作 */
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await PurchaseclaimRequestMainApi.exportPurchaseclaimRequestMain(setSearchParams)
download.excel(data, '采购索赔申请主.xlsx')
} catch {
} finally {
exportLoading.value = false
/** 导出按钮操作 */
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await PurchaseclaimRequestMainApi.exportPurchaseclaimRequestMain(setSearchParams)
download.excel(data, '采购索赔申请主.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
}
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL
const src = ref(BASE_URL + '/jmreport/view/882550592342003712?token=' + getAccessToken())
console.log(src)
//
const handlePoint = async (id) => {
window.open(src.value+'&id='+id)
}
/**
* tableForm方法
*/
const tableFormKeys = {}
PurchaseclaimRequestDetail.allSchemas.tableFormColumns.forEach(item => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
const tableData = ref([])
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL
const src = ref(BASE_URL + '/jmreport/view/882550592342003712?token=' + getAccessToken())
console.log(src)
//
const handlePoint = async (id) => {
window.open(src.value + '&id=' + id)
}
/**
* tableForm方法
*/
const tableFormKeys = {}
PurchaseclaimRequestDetail.allSchemas.tableFormColumns.forEach(item => {
tableFormKeys[item.field] = item.default ? item.default : ''
})
const tableData = ref([])
//
const handleAddTable = () => {
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
}
//
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
//
const handleAddTable = () => {
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
}
//
const handleDeleteTable = (item, index) => {
tableData.value.splice(index, 1)
}
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //
try {
if (formType === 'create') {
await PurchaseclaimRequestMainApi.createPurchaseclaimRequestMain(data)
message.success(t('common.createSuccess'))
} else {
await PurchaseclaimRequestMainApi.updatePurchaseclaimRequestMain(data)
message.success(t('common.updateSuccess'))
//
const submitForm = async (formType, data) => {
data.subList = tableData.value //
try {
if (formType === 'create') {
await PurchaseclaimRequestMainApi.createPurchaseclaimRequestMain(data)
message.success(t('common.createSuccess'))
} else {
await PurchaseclaimRequestMainApi.updatePurchaseclaimRequestMain(data)
message.success(t('common.updateSuccess'))
}
formRef.value.dialogVisible = false
//
getList()
} finally {
formRef.value.formLoading = false
}
formRef.value.dialogVisible = false
//
getList()
} finally {
formRef.value.formLoading = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '采购索赔申请信息导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '采购索赔申请信息导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await PurchaseclaimRequestMainApi.importTemplate()
})
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await PurchaseclaimRequestMainApi.importTemplate()
})
</script>

Loading…
Cancel
Save