Browse Source

Merge branch 'hella_online_20240803' into master_hella

hella_online_20240829
陈薪名 3 months ago
parent
commit
69bf4a5d05
  1. 5
      src/api/wms/productreceiptRecordMain/index.ts
  2. 15
      src/components/BasicForm/src/BasicForm.vue
  3. 6
      src/components/ImportForm/src/ImportForm.vue
  4. 2
      src/locales/en-US.ts
  5. 1
      src/locales/zh-CN.ts
  6. 12
      src/utils/disposition/defaultButtons.ts
  7. 10
      src/views/login/components/LoginForm.vue
  8. 12
      src/views/qms/inspectionJob/index.vue
  9. 79
      src/views/qms/inspectionQ1/index.vue
  10. 234
      src/views/qms/inspectionQ1/inspectionQ1.data.ts
  11. 132
      src/views/qms/inspectionQ2/index.vue
  12. 343
      src/views/qms/inspectionQ2/inspectionQ2.data.ts
  13. 4
      src/views/qms/inspectionScheme/addForm.vue
  14. 15
      src/views/wms/agvManage/agvLocationrelation/agvLocationrelation.data.ts
  15. 11
      src/views/wms/basicDataManage/documentSetting/recordsetting/recordsetting.data.ts
  16. 2
      src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts
  17. 27
      src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts
  18. 15
      src/views/wms/buttMesManage/mesBarCode/mesBarCode.data.ts
  19. 1
      src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRecordMain/customerreceiptRecordMain.data.ts
  20. 1
      src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/customerreceiptRequestMain.data.ts
  21. 1
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRecordMain/customerreturnRecordMain.data.ts
  22. 1
      src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts
  23. 106
      src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts
  24. 108
      src/views/wms/inventoryManage/package/index.vue
  25. 140
      src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts
  26. 140
      src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts
  27. 22
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue
  28. 267
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts
  29. 2
      src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRecordMain/sparepartReturnRecordMain.data.ts
  30. 4
      src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRequestMain/index.vue
  31. 60
      src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRequestMain/sparepartReturnRequestMain.data.ts
  32. 1
      src/views/wms/inventoryjobManage/transferissue/transferissueRecordMain/transferissueRecordMain.data.ts
  33. 1
      src/views/wms/inventoryjobManage/transferreceipt/transferreceiptJobMain/transferreceiptJobMain.data.ts
  34. 1
      src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRecordMain/transferreceiptRecordMain.data.ts
  35. 1
      src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/transferreceiptRequestMain.data.ts
  36. 1
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts
  37. 2
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue
  38. 22
      src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue
  39. 26
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue
  40. 2
      src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts
  41. 17
      src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/index.vue
  42. 4
      src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/inventorymoveRecordRequestMain.data.ts
  43. 20
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue
  44. 3
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts
  45. 16
      src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue
  46. 2
      src/views/wms/productionManage/productreceipt/productreceiptRecordMain/productreceiptRecordMain.data.ts
  47. 366
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue
  48. 19
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts
  49. 13
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue
  50. 72
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue
  51. 24
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts
  52. 29
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue
  53. 3
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts
  54. 2
      src/views/wms/productionManage/productredress/productredressRecordMain/productredressRecordMain.data.ts
  55. 1
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordRefuseMain/purchasereceiptRecordMain.data.ts
  56. 4
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/index.vue
  57. 1
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/purchasereturnJobMain.data.ts
  58. 2
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/purchasereturnRecordMain.data.ts
  59. 1
      src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/sparereceiptJobMain.data.ts
  60. 1
      src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/sparereceiptRecordMain.data.ts
  61. 21
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/purchasePlanMain.data.ts
  62. 12
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/labelForm.vue
  63. 18
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts
  64. 8
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts
  65. 8
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts
  66. 8
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/supplierinvoiceRequestMainDifference.data.ts

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

@ -126,3 +126,8 @@ export const createPutawayRequest = async (number:string) => {
export const createInspectRequest = async (number:string) => { export const createInspectRequest = async (number:string) => {
return await request.post({ url: `/wms/productreceipt-record-main/createInspectRequest?number=`+number }) return await request.post({ url: `/wms/productreceipt-record-main/createInspectRequest?number=`+number })
} }
//制品收货记录子执行回收操作
export const handleRecoveryProductreceiptRecord = async (data: ProductreceiptRecordMainVO) => {
return await request.put({ url: `/wms/productreceipt-record-main/handleRecovery`, data })
}

15
src/components/BasicForm/src/BasicForm.vue

@ -78,14 +78,14 @@
<el-input v-model="formSchema.value" v-if="isDetail && formTypeDetail == 'InputString'" /> <el-input v-model="formSchema.value" v-if="isDetail && formTypeDetail == 'InputString'" />
</template> </template>
</Form> </Form>
<Tabs ref="tabRef" v-if="formType=='create'&&tableAllSchemas&&tableAllSchemas.tableFormColumns.find(item=>item.field == 'itemCode')" :tabsList="[{ <Tabs ref="tabRef" v-if="includeCollectionTable&&formType=='create'&&tableAllSchemas&&tableAllSchemas.tableFormColumns.find(item=>item.field == 'itemCode')" :tabsList="[{
label: '明细', label: '明细',
prop: 'TableForm' prop: 'TableForm'
},{ },{
label: '汇总', label: '汇总',
prop: 'CollectionTable' prop: 'CollectionTable'
}]" v-model="tabSheet" @change="tabChange"/> }]" v-model="tabSheet" @change="tabChange"/>
<div class="table" v-if="(tabSheet=='TableForm'&&isBusiness && formType == 'create' && fromeWhere != 'countPlan')||(tabSheet=='TableForm'&&isBusiness && formType == 'update' && updateTypeEdiltSubList && fromeWhere != 'countPlan')"> <div class="table" v-if="tableAllSchemas&&tableAllSchemas.tableFormColumns&& fromeWhere != 'countPlan'" v-show="(tabSheet=='TableForm'&&isBusiness && formType == 'create' && fromeWhere != 'countPlan')||(tabSheet=='TableForm'&&isBusiness && formType == 'update' && updateTypeEdiltSubList && fromeWhere != 'countPlan')">
<TableForm <TableForm
ref="tableFormRef" ref="tableFormRef"
class="w-[100%]" class="w-[100%]"
@ -123,7 +123,7 @@
</template> </template>
</TableForm> </TableForm>
</div> </div>
<div v-if="tabSheet=='TableForm'&&isBusiness && formType == 'create' && fromeWhere == 'countPlan'"> <div v-if="tableAllSchemas&&tableAllSchemas.tableFormColumns&& fromeWhere == 'countPlan'" v-show="tabSheet=='TableForm'&&isBusiness && formType == 'create' && fromeWhere == 'countPlan'">
<TableFormCountPlan <TableFormCountPlan
:tableFields="tableAllSchemas.tableFormColumns" :tableFields="tableAllSchemas.tableFormColumns"
:tableData="tableData" :tableData="tableData"
@ -135,7 +135,7 @@
@handleDeleteTable="handleDeleteTable" @handleDeleteTable="handleDeleteTable"
/> />
</div> </div>
<div v-if="formType=='create'&&tableAllSchemas&&tableAllSchemas.tableFormColumns.find(item=>item.field == 'itemCode')" v-show="tabSheet=='CollectionTable'"> <div v-if="includeCollectionTable&&formType=='create'&&tableAllSchemas&&tableAllSchemas.tableFormColumns.find(item=>item.field == 'itemCode')" v-show="tabSheet=='CollectionTable'">
<CollectionTable <CollectionTable
:tableFields="tableAllSchemas?tableAllSchemas.tableFormColumns:[]" :tableFields="tableAllSchemas?tableAllSchemas.tableFormColumns:[]"
:tableData="tableData" :tableData="tableData"
@ -369,7 +369,12 @@ const props = defineProps({
isCheckStrictly:{ isCheckStrictly:{
type:Boolean, type:Boolean,
default:false default:false
} },
// true ; false
includeCollectionTable:{
type:Boolean,
default:false
},
}) })
const { t } = useI18n() // const { t } = useI18n() //

6
src/components/ImportForm/src/ImportForm.vue

@ -16,7 +16,8 @@
outFile + outFile +
'&extend=' + extend + '&extend=' + extend +
'&fromInventoryStatus=' + fromInventoryStatus + '&fromInventoryStatus=' + fromInventoryStatus +
'&toInventoryStatus=' + toInventoryStatus '&toInventoryStatus=' + toInventoryStatus +
dataType
" "
:auto-upload="false" :auto-upload="false"
:disabled="formLoading" :disabled="formLoading"
@ -229,6 +230,9 @@ const props = defineProps({
} }
}) })
const importTemplateData = ref(props.importTemplateData) const importTemplateData = ref(props.importTemplateData)
console.log(333,props.importTemplateData.dataType)
const dataType = ref('')
dataType.value = props.importTemplateData.dataType ?'&dataType=' + props.importTemplateData.dataType :''
const accept = ref(props.accept) const accept = ref(props.accept)
const mode = ref(props.mode) //.1 const mode = ref(props.mode) //.1
const updateIsDisable = ref(props.updateIsDisable) //, const updateIsDisable = ref(props.updateIsDisable) //,

2
src/locales/en-US.ts

@ -1280,7 +1280,7 @@ export default {
:'Rule configuration', :'Rule configuration',
:'Please enter a contact number', :'Please enter a contact number',
:'Please enter a name', :'Please enter a name',
'确认撤销报工吗?':'Are you sure to cancel the job application?',
}, },

1
src/locales/zh-CN.ts

@ -1277,6 +1277,7 @@ export default {
:'规则配置', :'规则配置',
:'请输入联系电话', :'请输入联系电话',
:'请选择范围', :'请选择范围',
'确认撤销报工吗?':"确认撤销报工吗?",
}, },
} }

12
src/utils/disposition/defaultButtons.ts

@ -1054,6 +1054,18 @@ export function mainListPointBtn(option: any) {
hasPermi: '' hasPermi: ''
}) })
} }
// 主列表-回收
export function mainListRecoveryBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.撤销报工`).replace('ts.', ''),
name: 'recovery',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-批量打印 // 主列表-批量打印
export function mainLisSelectiontPointBtn(option: any) { export function mainLisSelectiontPointBtn(option: any) {
return __defaultBtnOption(option, { return __defaultBtnOption(option, {

10
src/views/login/components/LoginForm.vue

@ -30,7 +30,7 @@
<el-col :span="24" style="padding-right: 10px; padding-left: 10px"> <el-col :span="24" style="padding-right: 10px; padding-left: 10px">
<el-form-item prop="password"> <el-form-item prop="password">
<el-input v-model="loginData.loginForm.password" :placeholder="t('login.passwordPlaceholder')" <el-input v-model="loginData.loginForm.password" :placeholder="t('login.passwordPlaceholder')"
:prefix-icon="iconLock" show-password type="password" @keyup.enter="getCode()" style="height: 42px;" /> :prefix-icon="iconLock" show-password type="password" @keyup.enter="passwordEnter" style="height: 42px;" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" style="padding-right: 10px; padding-left: 10px" v-if="needCode"> <el-col :span="24" style="padding-right: 10px; padding-left: 10px" v-if="needCode">
@ -173,6 +173,14 @@
// verify.value.show() // verify.value.show()
// } // }
// } // }
const passwordEnter = ()=>{
if(!needCode.value){
handleLogin()
return
}else{
getCode()
}
}
function getCode() { function getCode() {
if(!needCode.value){ if(!needCode.value){
return return

12
src/views/qms/inspectionJob/index.vue

@ -238,6 +238,14 @@ const isShowMainButton = (row, val) => {
} }
} }
const isShowMainButton3 = (row) => {
if (row.asnNumber) {
return false
} else {
return true
}
}
// //
const isShowMainButton2 = (row, val) => { const isShowMainButton2 = (row, val) => {
if (val.indexOf(row.isStaging) > -1) { if (val.indexOf(row.isStaging) > -1) {
@ -283,7 +291,9 @@ const butttondata = (row) => {
hasPermi: 'qms:inspection-job-main:execute' hasPermi: 'qms:inspection-job-main:execute'
}), // }), //
defaultButtons.mainListPackageBtn(null), // defaultButtons.mainListPackageBtn(null), //
defaultButtons.mainListPlanCheckQualityReportBtn({}) // defaultButtons.mainListPlanCheckQualityReportBtn({
hide: isShowMainButton3(row)
}) //
] ]
} }
const listTableRef = ref() const listTableRef = ref()

79
src/views/qms/inspectionQ1/index.vue

@ -74,12 +74,15 @@
import download from '@/utils/download' import download from '@/utils/download'
import { Q1, Q1Rules } from './inspectionQ1.data' import { Q1, Q1Rules } from './inspectionQ1.data'
import * as Q1Api from '@/api/qms/inspectionQ1' import * as Q1Api from '@/api/qms/inspectionQ1'
import * as ItembasicApi from '@/api/wms/itembasic'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import * as StdcostpriceApi from '@/api/wms/stdcostprice' import * as StdcostpriceApi from '@/api/wms/stdcostprice'
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
import * as CustomeritemApi from '@/api/wms/customeritem'
import * as CustomerApi from '@/api/wms/customer'
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore() const userStore = useUserStore()
@ -99,28 +102,62 @@ const priceObj = ref()
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(async () => { nextTick(async () => {
const setV = {} const setV = {}
if (formField == 'customerCode') {
setV['itemCode'] = ''
}
if (formField == 'itemCode') { if (formField == 'itemCode') {
setV['customerCode'] = ''
setV['customerName'] = ''
setV['itemName'] = ''
setV['standardCostPrice'] = ''
setV['qty'] = ''
setV['claimAmount'] = ''
setV['uom'] = val[0]['customerUom'] setV['uom'] = val[0]['customerUom']
console.log(333,val[0].code) CustomeritemApi.getCustomerItemListByCodes({
const params = { itemCodes: val[0].itemCode,
by: "ASC", customerCode: ''
filters: [{column: "itemCode", action: "==", value: val[0].itemCode}], }).then((res) => {
if (res?.length > 0) {
formRef.formModel.customerCode = res[0].customerCode
formRef.formModel.customerName = res[0].customerName
Q1.allSchemas.formSchema.forEach((item) => {
if (item.field == 'customerCode') {
item.componentProps.options = res
}
})
}
})
const paramsItembasic = {
by: 'ASC',
filters: [{ column: 'code', action: '==', value: val[0].itemCode }],
pageNo: 1, pageNo: 1,
pageSize: 500, pageSize: 500,
sort: "" sort: ''
} }
params.isSearch = true paramsItembasic.isSearch = true
StdcostpriceApi.getStdcostpricePage(params).then((res) => { ItembasicApi.getItembasicPage(paramsItembasic).then((res) => {
if (res.list?.length > 0) { if (res.list?.length > 0) {
priceObj.value = res.list[0] priceObj.value = res.list[0]
formRef.setValues({ formRef.setValues({
claimAmount: (parseFloat(formRef.formModel.qty) * parseFloat(priceObj.value.price)).toFixed(6) itemName: priceObj.value.name
}) })
} }
})
const paramsStdcostprice = {
by: 'ASC',
filters: [{ column: 'itemCode', action: '==', value: val[0].itemCode }],
pageNo: 1,
pageSize: 500,
sort: ''
}
paramsStdcostprice.isSearch = true
StdcostpriceApi.getStdcostpricePage(paramsStdcostprice).then((res) => {
if (res.list?.length > 0) {
priceObj.value = res.list[0]
formRef.setValues({
standardCostPrice: priceObj.value.price
})
}
}) })
} }
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
@ -130,7 +167,25 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
const onChange = (field, e) => { const onChange = (field, e) => {
if (field == 'qty') { if (field == 'qty') {
basicFormRef.value.formRef.formModel.claimAmount = (parseFloat( basicFormRef.value.formRef.formModel.qty) * parseFloat( priceObj.value.price)).toFixed(6) basicFormRef.value.formRef.formModel.claimAmount = (
parseFloat(basicFormRef.value.formRef.formModel.qty) * parseFloat(basicFormRef.value.formRef.formModel.standardCostPrice)
).toFixed(6)
}
if (field == 'customerCode') {
basicFormRef.value.formRef.formModel.customerName = ''
const paramsCustomer = {
by: 'ASC',
filters: [{ column: 'code', action: '==', value: basicFormRef.value.formRef.formModel.customerCode }],
pageNo: 1,
pageSize: 500,
sort: ''
}
paramsCustomer.isSearch = true
CustomerApi.getCustomerPage(paramsCustomer).then((res) => {
if (res.list?.length > 0) {
basicFormRef.value.formRef.formModel.customerName = res.list[0].name
}
})
} }
} }

234
src/views/qms/inspectionQ1/inspectionQ1.data.ts

@ -15,16 +15,16 @@ const userStore = useUserStore()
// 表单校验 // 表单校验
export const Q1Rules = reactive({ export const Q1Rules = reactive({
customerCode: [required], itemCode: [{ required: true, message: '请选择物料代码', trigger: 'change' }],
costCode: [required], customerCode: [{ required: true, message: '请选择客户代码', trigger: 'change' }],
itemCode: [required], qty: [{ required: true, message: '请输入数量', trigger: 'change' }],
qty: [required], claimAmount: [{ required: true, message: '请输入索赔金额', trigger: 'change' }],
code: [required], code: [{ required: true, message: '请选择缺陷代码', trigger: 'change' }],
priority: [required], priority: [{ required: true, message: '请选择优先级', trigger: 'change' }],
claimAmount: [required], costCode: [{ required: true, message: '请选择选择成本中心代码', trigger: 'change' }],
claimReason: [required], claimTime: [{ required: true, message: '请选择选择索赔日期', trigger: 'change' }],
claimTime: [required], handleTime: [{ required: true, message: '请选择选择处理时间', trigger: 'change' }],
handleTime: [required] claimReason: [{ required: true, message: '请选择选择索赔原因', trigger: 'change' }]
}) })
export const Q1 = useCrudSchemas( export const Q1 = useCrudSchemas(
@ -41,40 +41,23 @@ export const Q1 = useCrudSchemas(
} }
}, },
{ {
label: '状态', label: '物料代码',
field: 'status', field: 'itemCode',
sort: 'custom',
dictType: DICT_TYPE.PUBLISHE_STATUS,
dictClass: 'string',
isForm: false,
isSearch: false,
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '客户代码',
field: 'customerCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
isSearch: true,
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
enterSearch: true, enterSearch: true,
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择客户代码', // 输入框占位文本 searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '客户信息', // 查询弹窗标题 searchTitle: '客户物料信息', // 查询弹窗标题
searchAllSchemas: Customer.allSchemas, // 查询弹窗所需类 searchAllSchemas: Customeritem.allSchemas, // 查询弹窗所需类
searchPage: CustomerApi.getCustomerPage, // 查询弹窗所需分页方法 searchPage: CustomeritemApi.getCustomeritemPage, // 查询弹窗所需分页方法
searchCondition: [ searchCondition: [
{ {
key: 'available', key: 'available',
@ -84,7 +67,7 @@ export const Q1 = useCrudSchemas(
], ],
verificationParams: [ verificationParams: [
{ {
key: 'code', key: 'itemCode',
action: '==', action: '==',
value: '', value: '',
isMainValue: false, isMainValue: false,
@ -93,50 +76,59 @@ export const Q1 = useCrudSchemas(
} }
] // 失去焦点校验参数 ] // 失去焦点校验参数
} }
}, }
isSearch: true
}, },
{ {
label: '物料代码', label: '物料名称',
field: 'itemCode', field: 'itemName',
sort: 'custom', sort: 'custom',
table: { dictClass: 'string',
width: 150 isSearch: false,
isTable: true,
tableForm: {
disabled: true
}, },
isSearch: true,
form: { form: {
// labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
enterSearch: true, disabled: true
isSearchList: true, // 开启查询弹窗 }
searchListPlaceholder: '请选择物料代码', // 输入框占位文本 }
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '客户物料信息', // 查询弹窗标题
searchAllSchemas: Customeritem.allSchemas, // 查询弹窗所需类
searchPage: CustomeritemApi.getCustomeritemPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}, },
{ {
key: 'customerCode', label: '客户代码',
value: 'customerCode', field: 'customerCode',
message: '请填写客户代码!', sort: 'custom',
isMainValue: true dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
disabled: true
},
form: {
component: 'Select',
componentProps: {
options: [],
optionsAlias: {
labelField: 'customerCode',
valueField: 'customerCode'
},
filterable: true
} }
],
verificationParams: [
{
key: 'itemCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
} }
] // 失去焦点校验参数 },
{
label: '客户名称',
field: 'customerName',
sort: 'custom',
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
} }
} }
}, },
@ -176,41 +168,18 @@ export const Q1 = useCrudSchemas(
} }
}, },
{ {
label: '编码', label: '标准成本价格',
field: 'code', field: 'standardCostPrice',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.QMS_Q1_CODE,
dictClass: 'string',
isSearch: false, isSearch: false,
isTable: true,
table: { table: {
width: 180 width: 150
},
tableForm: {
type: 'Select'
}
},
{
label: '优先级',
field: 'priority',
sort: 'custom',
dictType: DICT_TYPE.QUALITY_NOTIFICATION_PRIORITY,
dictClass: 'string',
isSearch: false,
isTable: false,
tableForm: {
type: 'Select'
}
}, },
{
label: '负责用户',
field: 'responUser',
sort: 'custom',
isSearch: false,
isForm: false,
form: { form: {
component: 'InputNumber',
componentProps: { componentProps: {
value: userStore.getUser.nickname, min: 0,
precision: 6,
disabled: true disabled: true
} }
} }
@ -232,6 +201,33 @@ export const Q1 = useCrudSchemas(
} }
} }
}, },
{
label: '缺陷编码',
field: 'code',
sort: 'custom',
dictType: DICT_TYPE.QMS_Q1_CODE,
dictClass: 'string',
isSearch: false,
isTable: true,
table: {
width: 180
},
tableForm: {
type: 'Select'
}
},
{
label: '优先级',
field: 'priority',
sort: 'custom',
dictType: DICT_TYPE.QUALITY_NOTIFICATION_PRIORITY,
dictClass: 'string',
isSearch: false,
isTable: false,
tableForm: {
type: 'Select'
}
},
{ {
label: '成本中心代码', label: '成本中心代码',
@ -303,6 +299,19 @@ export const Q1 = useCrudSchemas(
} }
} }
}, },
{
label: '负责用户',
field: 'responUser',
sort: 'custom',
isSearch: false,
isForm: true,
form: {
componentProps: {
value: userStore.getUser.nickname,
disabled: true
}
}
},
{ {
label: '处理时间', label: '处理时间',
field: 'handleTime', field: 'handleTime',
@ -325,6 +334,24 @@ export const Q1 = useCrudSchemas(
} }
} }
}, },
{
label: '状态',
field: 'status',
sort: 'custom',
dictType: DICT_TYPE.PUBLISHE_STATUS,
dictClass: 'string',
isForm: false,
isSearch: false,
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{ {
label: '描述', label: '描述',
field: 'desc', field: 'desc',
@ -392,8 +419,17 @@ export const Q1 = useCrudSchemas(
valueFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange', type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
}
}, },
{
label: '创建者',
field: 'creator',
table: {
width: 130
}, },
isForm: false,
isTable: true
}, },
{ {
label: '操作', label: '操作',

132
src/views/qms/inspectionQ2/index.vue

@ -55,6 +55,7 @@
:apiCreate="Q2Api.createQ2" :apiCreate="Q2Api.createQ2"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
:isBusiness="false" :isBusiness="false"
@onChange="onChange"
/> />
<!-- 详情 --> <!-- 详情 -->
@ -77,7 +78,11 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import * as StdcostpriceApi from '@/api/wms/stdcostprice'
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
import * as SupplieritemApi from '@/api/wms/supplieritem'
import * as SupplierApi from '@/api/wms/supplier'
import * as ItembasicApi from '@/api/wms/itembasic'
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore() const userStore = useUserStore()
@ -93,36 +98,125 @@ routeName.value = route.name
const tableColumns = ref(Q2.allSchemas.tableColumns) const tableColumns = ref(Q2.allSchemas.tableColumns)
// //
const priceObj = ref()
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => { nextTick(async () => {
const setV = {} const setV = {}
if (formField == 'supplierCode') { if (formField == 'supplierCode') {
setV['itemCode'] = '' const supplierParams = {
by: 'ASC',
filters: [{ column: 'code', action: '==', value: val[0].supplierCode }],
pageNo: 1,
pageSize: 500,
sort: ''
}
supplierParams.isSearch = true
SupplierApi.getSupplierPage(supplierParams).then((res) => {
if (res.list?.length > 0) {
formRef.setValues({
supplierName: res.list[0].name
})
}
})
} }
if (formField == 'itemCode') { if (formField == 'itemCode') {
setV['uom'] = val[0]['supplierUom'] setV['SupplierCode'] = ''
} setV['SupplierName'] = ''
// if (formField == 'q1Number') { setV['itemName'] = ''
// console.log(123) setV['standardCostPrice'] = ''
// setV['q1Number'] = val[0]['number'] setV['qty'] = ''
// } setV['claimAmount'] = ''
if (formField == 'purchaseReceiptNumber') {
setV['wmsQty'] = val[0]['qty'] setV['uom'] = val[0].supplierUom
} const supplieritemParams = {
if (formField == 'q1Number') { by: 'ASC',
//Q1 filters: [{ column: 'itemCode', action: '==', value: val[0].itemCode}],
let list = [] pageNo: 1,
val.forEach((item) => { pageSize: 500,
list.push(item[searchField]) sort: ''
}
supplieritemParams.isSearch = true
SupplieritemApi.getSupplieritemPage(supplieritemParams).then((res) => {
if (res.list?.length > 0) {
formRef.formModel.supplierCode = res.list[0].supplierCode
formRef.formModel.supplierName = res.list[0].supplierName
Q2.allSchemas.formSchema.forEach((item) => {
if (item.field == 'supplierCode') {
item.componentProps.options = res.list
}
}) })
setV[formField] = list.join(',') }
formRef.setValues(setV) })
} else { const itembasicParams = {
by: 'ASC',
filters: [{ column: 'code', action: '==', value: val[0].itemCode }],
pageNo: 1,
pageSize: 500,
sort: ''
}
itembasicParams.isSearch = true
ItembasicApi.getItembasicPage(itembasicParams).then((res) => {
if (res.list?.length > 0) {
formRef.setValues({
itemName: res.list[0].name
})
}
})
const params2 = {
by: 'ASC',
filters: [{ column: 'itemCode', action: '==', value: val[0].itemCode }],
pageNo: 1,
pageSize: 500,
sort: ''
}
params2.isSearch = true
StdcostpriceApi.getStdcostpricePage(params2).then((res) => {
if (res.list?.length > 0) {
priceObj.value = res.list[0]
formRef.setValues({
standardCostPrice: priceObj.value.price
})
}
})
}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
formRef.setValues(setV) formRef.setValues(setV)
})
}
const onChange = (field, e) => {
if (field == 'qty') {
basicFormRef.value.formRef.formModel.claimAmount = (
parseFloat(basicFormRef.value.formRef.formModel.qty) * parseFloat(basicFormRef.value.formRef.formModel.standardCostPrice)
).toFixed(6)
basicFormRef.value.formRef.formModel.summaryAmount = (
parseFloat(basicFormRef.value.formRef.formModel.claimAmount) + parseFloat(basicFormRef.value.formRef.formModel.otherclaimAmount)
).toFixed(6)
}
if (field == 'otherclaimAmount') {
basicFormRef.value.formRef.formModel.summaryAmount = (
parseFloat(basicFormRef.value.formRef.formModel.claimAmount) + parseFloat(basicFormRef.value.formRef.formModel.otherclaimAmount)
).toFixed(6)
}
if (field == 'supplierCode') {
basicFormRef.value.formRef.formModel.supplierName = ''
const paramsCustomer = {
by: 'ASC',
filters: [{ column: 'code', action: '==', value: basicFormRef.value.formRef.formModel.supplierCode }],
pageNo: 1,
pageSize: 500,
sort: ''
}
paramsCustomer.isSearch = true
SupplierApi.getSupplierPage(paramsCustomer).then((res) => {
if (res.list?.length > 0) {
basicFormRef.value.formRef.formModel.supplierName = res.list[0].name
} }
}) })
} }
}
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {

343
src/views/qms/inspectionQ2/inspectionQ2.data.ts

@ -49,70 +49,14 @@ export const Q2 = useCrudSchemas(
fixed: 'left' fixed: 'left'
} }
}, },
{
label: '状态',
field: 'status',
sort: 'custom',
dictType: DICT_TYPE.PUBLISHE_STATUS,
dictClass: 'string',
isForm: false,
isSearch: false,
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '供应商代码',
field: 'supplierCode',
sort: 'custom',
isSearch: true,
table: {
width: 175
},
form: {
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择供应商', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '供应商信息', // 查询弹窗标题
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
],
verificationParams: [
{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
}
}
},
{ {
label: '物料代码', label: '物料代码',
field: 'itemCode', field: 'itemCode',
sort: 'custom', sort: 'custom',
isSearch: true,
table: { table: {
width: 190 width: 150
}, },
isSearch: true,
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
@ -124,12 +68,6 @@ export const Q2 = useCrudSchemas(
searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类 searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类
searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法 searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法
searchCondition: [ searchCondition: [
{
key: 'supplierCode',
value: 'supplierCode',
message: '请填写供应商代码!',
isMainValue: true
},
{ {
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
@ -150,32 +88,51 @@ export const Q2 = useCrudSchemas(
} }
}, },
{ {
label: '数量', label: '物料名称',
field: 'qty', field: 'itemName',
sort: 'custom', sort: 'custom',
dictClass: 'string',
isSearch: false,
isTable: true, isTable: true,
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '供应商代码',
field: 'supplierCode',
sort: 'custom',
dictClass: 'string',
isSearch: false, isSearch: false,
table: { isTable: true,
width: 150 tableForm: {
disabled: true
}, },
form: { form: {
component: 'InputNumber', component: 'Select',
componentProps: { componentProps: {
min: 0, options: [],
precision: 2 optionsAlias: {
labelField: 'supplierCode',
valueField: 'supplierCode'
},
filterable: true
} }
} }
}, },
{ {
label: '单位', label: '供应商名称',
field: 'uom', field: 'supplierName',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string', dictClass: 'string',
isSearch: false, isSearch: false,
isTable: true, isTable: true,
tableForm: { tableForm: {
type: 'Select',
disabled: true disabled: true
}, },
form: { form: {
@ -188,7 +145,7 @@ export const Q2 = useCrudSchemas(
label: '采购收货单号', label: '采购收货单号',
field: 'purchaseReceiptNumber', field: 'purchaseReceiptNumber',
sort: 'custom', sort: 'custom',
isTable: false, isTable: true,
table: { table: {
width: 180 width: 180
}, },
@ -228,19 +185,99 @@ export const Q2 = useCrudSchemas(
} }
} }
}, },
{
label: '索赔日期',
field: 'claimTime',
isTable: true,
table: {
width: 180
},
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{ {
label: '采购收货数量', label: '数量',
field: 'wmsQty', field: 'qty',
sort: 'custom',
isTable: true,
isSearch: false,
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 2
}
}
},
{
label: '单位',
field: 'uom',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: false, isSearch: false,
isForm: false, isTable: true,
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '标准成本价格',
field: 'standardCostPrice',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6,
disabled: true
}
}
},
{
label: '索赔金额',
field: 'claimAmount',
sort: 'custom',
isTable: false, isTable: false,
isDetail: false isSearch: false,
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 2
}
}
}, },
{ {
label: '编码', label: '缺陷编码',
field: 'code', field: 'code',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.QMS_Q2_CODE, dictType: DICT_TYPE.QMS_Q2_CODE,
@ -254,7 +291,6 @@ export const Q2 = useCrudSchemas(
type: 'Select' type: 'Select'
} }
}, },
{ {
label: '优先级', label: '优先级',
field: 'priority', field: 'priority',
@ -268,26 +304,38 @@ export const Q2 = useCrudSchemas(
} }
}, },
{ {
label: '负责用户', label: '其他索赔描述',
field: 'responUser', field: 'otherClaimDesc',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
isForm: true,
table: { table: {
width: 120 width: '150'
},
form: {
component: 'Input',
componentProps: {}
}
},
{
label: '其他索赔金额',
field: 'otherclaimAmount',
sort: 'custom',
isSearch: false,
table: {
width: 150
}, },
form: { form: {
component: 'InputNumber',
componentProps: { componentProps: {
value: userStore.getUser.nickname, min: 0,
disabled: true precision: 6,
} }
} }
}, },
{ {
label: '索赔金额', label: '汇总金额',
field: 'claimAmount', field: 'summaryAmount',
sort: 'custom', sort: 'custom',
isTable: false,
isSearch: false, isSearch: false,
table: { table: {
width: 150 width: 150
@ -296,7 +344,8 @@ export const Q2 = useCrudSchemas(
component: 'InputNumber', component: 'InputNumber',
componentProps: { componentProps: {
min: 0, min: 0,
precision: 2 precision: 6,
disabled: true
} }
} }
}, },
@ -337,49 +386,6 @@ export const Q2 = useCrudSchemas(
} }
} }
}, },
{
label: '索赔日期',
field: 'claimTime',
isTable: true,
table: {
width: 180
},
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '处理时间',
field: 'handleTime',
isTable: false,
table: {
width: 180
},
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{ {
label: 'Q1通知单号', label: 'Q1通知单号',
field: 'q1Number', field: 'q1Number',
@ -424,6 +430,62 @@ export const Q2 = useCrudSchemas(
}, },
isSearch: true isSearch: true
}, },
{
label: '负责用户',
field: 'responUser',
sort: 'custom',
isSearch: false,
isForm: true,
table: {
width: 120
},
form: {
componentProps: {
value: userStore.getUser.nickname,
disabled: true
}
}
},
{
label: '处理时间',
field: 'handleTime',
isTable: false,
table: {
width: 180
},
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
style: { width: '100%' },
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x'
}
}
},
{
label: '状态',
field: 'status',
sort: 'custom',
dictType: DICT_TYPE.PUBLISHE_STATUS,
dictClass: 'string',
isForm: false,
isSearch: false,
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{ {
label: '描述', label: '描述',
field: 'desc', field: 'desc',
@ -478,6 +540,15 @@ export const Q2 = useCrudSchemas(
} }
} }
}, },
{
label: '创建者',
field: 'creator',
table: {
width: 130
},
isForm: false,
isTable: true
},
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',

4
src/views/qms/inspectionScheme/addForm.vue

@ -54,8 +54,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="描述" prop="description"> <el-form-item label="方案描述" prop="description">
<el-input v-model="data.description" placeholder="请填写描述" /> <el-input v-model="data.description" placeholder="请填写方案描述" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">

15
src/views/wms/agvManage/agvLocationrelation/agvLocationrelation.data.ts

@ -156,7 +156,16 @@ export const AgvLocationrelation = useCrudSchemas(reactive<CrudSchema[]>([
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x',
} }
} },
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
},
},
}, },
{ {
label: '创建者', label: '创建者',
@ -173,7 +182,7 @@ export const AgvLocationrelation = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -196,7 +205,7 @@ export const AgvLocationrelation = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater', field: 'updater',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
table: { table: {
width: 150 width: 150
} }

11
src/views/wms/basicDataManage/documentSetting/recordsetting/recordsetting.data.ts

@ -109,7 +109,16 @@ export const Recordsetting = useCrudSchemas(reactive<CrudSchema[]>([
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x',
} }
} },
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
},
},
}, },
{ {
label: '创建者', label: '创建者',

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

@ -48,7 +48,7 @@ export const Itembasic = useCrudSchemas(reactive<CrudSchema[]>([
}, },
}, },
{ {
label: '方案描述', label: '描述1',
field: 'desc1', field: 'desc1',
sort: 'custom', sort: 'custom',
table: { table: {

27
src/views/wms/basicDataManage/itemManage/packageunit/packageunit.data.ts

@ -525,11 +525,34 @@ export const Packageunit = useCrudSchemas(reactive<CrudSchema[]>([
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
sort: 'custom', sort: 'custom',
isDetail: true,
isSearch: true,
isForm: false,
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: { table: {
width: 180 width: 180
}, },
formatter: dateFormatter, form: {
isForm: false, component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
},
},
}, },
{ {
label: '创建者', label: '创建者',

15
src/views/wms/buttMesManage/mesBarCode/mesBarCode.data.ts

@ -222,6 +222,7 @@ export const MesBarCode = useCrudSchemas(reactive<CrudSchema[]>([
detail: { detail: {
dateFormat : 'YYYY-MM-DD HH:mm:ss' dateFormat : 'YYYY-MM-DD HH:mm:ss'
}, },
isSearch: true,
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -230,7 +231,15 @@ export const MesBarCode = useCrudSchemas(reactive<CrudSchema[]>([
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x',
} }
} },
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
},
},
}, },
{ {
label: '创建者', label: '创建者',
@ -247,7 +256,7 @@ export const MesBarCode = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -270,7 +279,7 @@ export const MesBarCode = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater', field: 'updater',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
table: { table: {
width: 150 width: 150
} }

1
src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRecordMain/customerreceiptRecordMain.data.ts

@ -84,6 +84,7 @@ export const CustomerreceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '运输方式', label: '运输方式',
field: 'transferMode', field: 'transferMode',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.TRANSFER_MODE,
table: { table: {
width: 150 width: 150
}, },

1
src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/customerreceiptRequestMain.data.ts

@ -98,6 +98,7 @@ export const CustomerreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
label: '运输方式', label: '运输方式',
field: 'transferMode', field: 'transferMode',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.TRANSFER_MODE,
table: { table: {
width: 150 width: 150
}, },

1
src/views/wms/deliversettlementManage/customerreturn/customerreturnRecordMain/customerreturnRecordMain.data.ts

@ -149,6 +149,7 @@ export const CustomerreturnRecordMain = useCrudSchemas(
{ {
label: '运输方式', label: '运输方式',
field: 'transferMode', field: 'transferMode',
dictType: DICT_TYPE.TRANSFER_MODE,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150

1
src/views/wms/deliversettlementManage/deliver/deliverRecordMain/deliverRecordMain.data.ts

@ -118,6 +118,7 @@ export const DeliverRecordMain = useCrudSchemas(
{ {
label: '运输方式', label: '运输方式',
field: 'transferMode', field: 'transferMode',
dictType: DICT_TYPE.TRANSFER_MODE,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150

106
src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts

@ -895,24 +895,24 @@ export const DeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{ // {
label: '承运商', // label: '承运商',
field: 'carrierCode', // field: 'carrierCode',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
}, // },
{ // {
label: '运输方式', // label: '运输方式',
field: 'transferMode', // field: 'transferMode',
sort: 'custom', // sort: 'custom',
dictType: DICT_TYPE.TRANSFER_MODE, // dictType: DICT_TYPE.TRANSFER_MODE,
dictClass: 'string', // dictClass: 'string',
table: { // table: {
width: 150 // width: 150
}, // },
}, // },
{ {
label: '库存状态', label: '库存状态',
field: 'inventoryStatus', field: 'inventoryStatus',
@ -997,41 +997,41 @@ export const DeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
isTableForm: false, isTableForm: false,
isForm: false, isForm: false,
}, },
{ // {
label: '备注', // label: '备注',
field: 'remark', // field: 'remark',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
isTable: false, // isTable: false,
}, // },
{ // {
label: '计划数量', // label: '计划数量',
field: 'planQty', // field: 'planQty',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
isTable: false, // isTable: false,
tableForm: { // tableForm: {
disabled: true // disabled: true
}, // },
isForm: false, // isForm: false,
}, // },
{ // {
label: '已收货数量', // label: '已收货数量',
field: 'shippedQty', // field: 'shippedQty',
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
isTable: false, // isTable: false,
tableForm: { // tableForm: {
disabled: true // disabled: true
}, // },
isForm: false, // isForm: false,
}, // },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',

108
src/views/wms/inventoryManage/package/index.vue

@ -16,7 +16,8 @@
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
<Table v-clientTable <Table ref="tableRef" :selection="true"
v-clientTable
:columns="tableColumns" :columns="tableColumns"
:data="tableObject.tableList" :data="tableObject.tableList"
:loading="tableObject.loading" :loading="tableObject.loading"
@ -26,6 +27,7 @@
v-model:pageSize="tableObject.pageSize" v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort" v-model:sort="tableObject.sort"
@getSelectionRows="getSelectionRows"
> >
<template #number="{row}"> <template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> <el-button type="primary" link @click="openDetail(row, '单据号', row.number)">
@ -69,7 +71,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { getJmreportBaseUrl } from '@/utils/systemParam' import { getJmreportBaseUrl } from '@/utils/systemParam'
import * as EquipmentInspectionRecordMainApi from "@/api/eam/equipmentInspectionRecordMain"; import * as EquipmentInspectionRecordMainApi from "@/api/eam/equipmentInspectionRecordMain";
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
//
defineOptions({ name: 'package' }) defineOptions({ name: 'package' })
const message = useMessage() // const message = useMessage() //
@ -125,6 +127,7 @@ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:package:create'}), // defaultButtons.defaultAddBtn({hasPermi:'wms:package:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'wms:package:import'}), // // defaultButtons.defaultImportBtn({hasPermi:'wms:package:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:package:export'}), // defaultButtons.defaultExportBtn({hasPermi:'wms:package:export'}), //
defaultButtons.mainLisSelectiontPointBtn(null), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //
@ -148,6 +151,8 @@ const buttonBaseClick = (val, item) => {
handleImport() handleImport()
} else if (val == 'export') { // } else if (val == 'export') { //
handleExport() handleExport()
} else if (val=='selection_point'){//
handleSelectionPoint()
} else if (val == 'refresh') { // } else if (val == 'refresh') { //
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { if (tableObject.params.filters && tableObject.params.filters.length > 0 ) {
searchFormClick({ searchFormClick({
@ -162,6 +167,55 @@ const buttonBaseClick = (val, item) => {
} }
} }
const selectionRows = ref<any>([])
const tableRef = ref()
const getSelectionRows = (currentPage,currentPageSelectionRows) => {
console.log("getSelectionRows",currentPage,currentPageSelectionRows)
const currentRows = selectionRows.value.find(item=>item.currentPage==currentPage)
if(currentRows){
currentRows.selectionRows = currentPageSelectionRows
}else{
selectionRows.value.push({
currentPage,
selectionRows:currentPageSelectionRows
})
}
}
const handleSelectionPoint = async ()=>{
let rows:any = []
selectionRows.value.forEach(item=>{
rows = [...rows,...item.selectionRows.map(item1=>item1.number)]
})
console.log('批量打印',rows.join(','))
let getLoading = ElLoading.service({
lock: true,
text: 'loading...',
background: 'rgba(0, 0, 0, 0.7)'
})
PackageApi.batchPrintingLable(rows).then(res => {
console.log('批量打印res',res);
getLoading?.close()
if(res.zzLabel){
//
const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken())
window.open(src.value+'&asn_number='+res.zzLabel)
}
if (res.cgLabel) {
//
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
window.open(src.value+'&asn_number='+res.cgLabel)
}
if(!res.cgLabel&&!res.zzLabel){
message.warning('包装不存在,无法打印或者是线边物料数据不生成包装!')
}
}).catch(err => {
console.log(err)
getLoading?.close()
})
}
// //
// const isShowMainButton = (row,val) => { // const isShowMainButton = (row,val) => {
// if (val.indexOf(row.status) > -1) { // if (val.indexOf(row.status) > -1) {
@ -305,28 +359,46 @@ const formsSuccess = async (formType,data) => {
const labelType = ref('') // const labelType = ref('') //
const handlePoint = async (row) => { const handlePoint = async (row) => {
console.log(row.packingNumber,445555555555555); console.log(row.packingNumber,445555555555555);
PackageApi.getBalanceToPackage(row.number).then(res => { PackageApi.batchPrintingLable([row.number]).then(res => {
console.log(777,res); console.log('批量打印res',res);
if (res.productionLineCode != null) { if(res.zzLabel){
labelType.value = 'zz' //
} else { const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken())
labelType.value = 'cg' window.open(src.value+'&asn_number='+res.zzLabel)
} }
PackageApi.batchPrintingLable((res.number)).then((resLable) =>{ if (res.cgLabel) {
console.log(159,resLable ) //
//
if (labelType.value == 'cg') {
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken()) const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
console.log(159,resLable ) window.open(src.value+'&asn_number='+res.cgLabel)
window.open(src.value+'&asn_number='+resLable) }
} else { if(!res.cgLabel&&!res.zzLabel){
const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken()) message.warning('包装不存在,无法打印或者是线边物料数据不生成包装!')
window.open(src.value+'&asn_number='+resLable)
} }
})
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
}) })
// PackageApi.getBalanceToPackage(row.number).then(res => {
// console.log(777,res);
// if (res.productionLineCode != null) {
// labelType.value = 'zz'
// } else {
// labelType.value = 'cg'
// }
// PackageApi.batchPrintingLable((res.number)).then((resLable) =>{
// console.log(159,resLable )
// //
// if (labelType.value == 'cg') {
// const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
// console.log(159,resLable )
// window.open(src.value+'&asn_number='+resLable)
// } else {
// const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken())
// window.open(src.value+'&asn_number='+resLable)
// }
// })
// }).catch(err => {
// console.log(err)
// })
} }
/** 导入 */ /** 导入 */

140
src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts

@ -1,6 +1,14 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import { TableColumn } from '@/types/table' import { TableColumn } from '@/types/table'
import { QadCostcentre } from '@/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data'
import * as QadCostcentreApi from '@/api/wms/qadCostcentre/index'
import { QadProject } from '@/views/wms/basicDataManage/subject/qadProject/qadProject.data'
import * as QadProjectApi from '@/api/wms/qadProject'
import * as SubjectAccountApi from '@/api/wms/subjectAccount'
import { SubjectAccount } from '@/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data'
/** /**
* @returns {Array} * @returns {Array}
@ -26,6 +34,138 @@ export const ScrapJobMain = useCrudSchemas(
}, },
isSearch: true isSearch: true
}, },
{
label: '成本中心代码',
field: 'costCenterCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心代码',
searchField: 'costcentreCode',
searchTitle: '成本中心代码',
searchAllSchemas: QadCostcentre.allSchemas,
searchPage: QadCostcentreApi.getQadCostcentrePage
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本
searchField: 'costcentreCode', // 查询弹窗赋值字段
searchTitle: '成本中心代码', // 查询弹窗标题
searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类
searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '成本中心类型',
field: 'costCenterType',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
},
{
label: '领用原因代码',
field: 'reasonCodeRequisition',
sort: 'custom',
table: {
width: 150
},
tableForm: {
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择成领用原因代码',
searchField: 'code',
searchTitle: '领用原因代码',
searchAllSchemas: SubjectAccount.allSchemas,
searchPage: SubjectAccountApi.getSubjectAccountPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'costcentreType',
value: 'costCenterType',
message: '成本中心类型不能为空!',
isMainValue: true
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '领用原因代码', // 查询弹窗标题
searchAllSchemas: SubjectAccount.allSchemas, // 查询弹窗所需类
searchPage: SubjectAccountApi.getSubjectAccountPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'costcentreType',
value: 'costCenterType',
message: '成本中心类型不能为空!',
isMainValue: true
}]
}
}
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择QAD项目信息',
searchField: 'projectCode',
searchTitle: '领用原因代码',
searchAllSchemas: QadProject.allSchemas,
searchPage: QadProjectApi.getQadProjectPage
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择QAD项目信息', // 输入框占位文本
searchField: 'projectCode', // 查询弹窗赋值字段
searchTitle: '领用原因代码', // 查询弹窗标题
searchAllSchemas: QadProject.allSchemas, // 查询弹窗所需类
searchPage: QadProjectApi.getQadProjectPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '工作中心',
field: 'workCenter',
sort: 'custom',
table: {
width: 150
},
},
{ {
label: 'Q1通知单号', label: 'Q1通知单号',
field: 'q1Number', field: 'q1Number',

140
src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts

@ -1,6 +1,14 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime' import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
import { TableColumn } from '@/types/table' import { TableColumn } from '@/types/table'
import { QadCostcentre } from '@/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data'
import * as QadCostcentreApi from '@/api/wms/qadCostcentre/index'
import { QadProject } from '@/views/wms/basicDataManage/subject/qadProject/qadProject.data'
import * as QadProjectApi from '@/api/wms/qadProject'
import * as SubjectAccountApi from '@/api/wms/subjectAccount'
import { SubjectAccount } from '@/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data'
/** /**
* @returns {Array} * @returns {Array}
@ -35,6 +43,138 @@ export const ScrapRecordMain = useCrudSchemas(
}, },
isSearch: true isSearch: true
}, },
{
label: '成本中心代码',
field: 'costCenterCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心代码',
searchField: 'costcentreCode',
searchTitle: '成本中心代码',
searchAllSchemas: QadCostcentre.allSchemas,
searchPage: QadCostcentreApi.getQadCostcentrePage
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本
searchField: 'costcentreCode', // 查询弹窗赋值字段
searchTitle: '成本中心代码', // 查询弹窗标题
searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类
searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '成本中心类型',
field: 'costCenterType',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
},
{
label: '领用原因代码',
field: 'reasonCodeRequisition',
sort: 'custom',
table: {
width: 150
},
tableForm: {
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择成领用原因代码',
searchField: 'code',
searchTitle: '领用原因代码',
searchAllSchemas: SubjectAccount.allSchemas,
searchPage: SubjectAccountApi.getSubjectAccountPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'costcentreType',
value: 'costCenterType',
message: '成本中心类型不能为空!',
isMainValue: true
}]
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '领用原因代码', // 查询弹窗标题
searchAllSchemas: SubjectAccount.allSchemas, // 查询弹窗所需类
searchPage: SubjectAccountApi.getSubjectAccountPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'costcentreType',
value: 'costCenterType',
message: '成本中心类型不能为空!',
isMainValue: true
}]
}
}
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择QAD项目信息',
searchField: 'projectCode',
searchTitle: '领用原因代码',
searchAllSchemas: QadProject.allSchemas,
searchPage: QadProjectApi.getQadProjectPage
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择QAD项目信息', // 输入框占位文本
searchField: 'projectCode', // 查询弹窗赋值字段
searchTitle: '领用原因代码', // 查询弹窗标题
searchAllSchemas: QadProject.allSchemas, // 查询弹窗所需类
searchPage: QadProjectApi.getQadProjectPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
},
{
label: '工作中心',
field: 'workCenter',
sort: 'custom',
table: {
width: 150
},
},
{ {
label: 'Q1通知单号', label: 'Q1通知单号',
field: 'q1Number', field: 'q1Number',

22
src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue

@ -186,9 +186,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
} }
} else { } else {
console.log("报废出库主表")
const setV = {} const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
if (formField == 'q1Number') { if (formField == 'q1Number') {
ScrapRequestMain.allSchemas.formSchema.forEach((item) => { ScrapRequestMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'q2Number' || item.field == 'q3Number') { if (item.field == 'q2Number' || item.field == 'q3Number') {
@ -216,7 +215,24 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
} }
}) })
} }
if(formField === 'usageDescription'){
setV['usageDescription'] = val[0]['usageDescription']
setV['usageCode'] = val[0]['code']
}
if(formField === 'costCenterCode'){
setV['costcentreCode'] = val[0]['costcentreCode']
setV['costCenterType'] = val[0]['costcentreType']
}
if(formField === 'reasonCodeRequisition'){
setV['reasonCodeRequisition'] = val[0]['code']
}
if(formField === 'projectCode'){
setV['projectCode'] = val[0]['projectCode']
} }
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
}) })
} }
const clearSearchInput = (field) => { const clearSearchInput = (field) => {
@ -240,7 +256,7 @@ const clearSearchInput = (field) => {
} }
if (field == 'q3Number') { if (field == 'q3Number') {
ScrapRequestMain.allSchemas.formSchema.forEach((item) => { ScrapRequestMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'q1Number' || item.field == 'q1Number') { if (item.field == 'q1Number' || item.field == 'q2Number') {
item.componentProps.enterSearch = true item.componentProps.enterSearch = true
item.componentProps.isSearchList = true item.componentProps.isSearchList = true
item.componentProps.disabled = false item.componentProps.disabled = false

267
src/views/wms/inventoryjobManage/scrap/scrapRequestMain/scrapRequestMain.data.ts

@ -17,6 +17,16 @@ import { Q2 } from '@/views/qms/inspectionQ2/inspectionQ2.data'
import * as InspectionQ3Api from '@/api/qms/inspectionQ3/inspectionQ3Main' import * as InspectionQ3Api from '@/api/qms/inspectionQ3/inspectionQ3Main'
import { InspectionQ3Main } from '@/views/qms/inspectionQ3/inspectionQ3.data' import { InspectionQ3Main } from '@/views/qms/inspectionQ3/inspectionQ3.data'
import { QadCostcentre } from '@/views/wms/basicDataManage/subject/qadCostcentre/qadCostcentre.data'
import * as QadCostcentreApi from '@/api/wms/qadCostcentre/index'
import { QadProject } from '@/views/wms/basicDataManage/subject/qadProject/qadProject.data'
import * as QadProjectApi from '@/api/wms/qadProject'
import * as SubjectAccountApi from '@/api/wms/subjectAccount'
import { SubjectAccount } from '@/views/wms/basicDataManage/subject/subjectAccount/subjectAccount.data'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@ -53,6 +63,233 @@ export const ScrapRequestMain = useCrudSchemas(
isForm: false, isForm: false,
isSearch: true isSearch: true
}, },
{
label: '领用代码',
field: 'usageCode',
sort: 'custom',
table: {
width: 150
},
isTableForm:false,
isForm: false,
isTable:false,
},
{
label: '领用描述',
field: 'usageDescription',
sort: 'custom',
isTableForm:false,
isForm: false,
isTable:false,
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择领用描述',
searchField: 'usageDescription',
searchTitle: '领用描述信息',
searchAllSchemas: SubjectAccount.allSchemas,
searchPage: SubjectAccountApi.getSubjectAccountPage
}
}
},
{
label: '成本中心代码',
field: 'costCenterCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
enterSearch: true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心代码',
searchField: 'costcentreCode',
searchTitle: '成本中心代码',
searchAllSchemas: QadCostcentre.allSchemas,
searchPage: QadCostcentreApi.getQadCostcentrePage,
verificationParams: [{
key: 'costcentreCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本
searchField: 'costcentreCode', // 查询弹窗赋值字段
searchTitle: '成本中心代码', // 查询弹窗标题
searchAllSchemas: QadCostcentre.allSchemas, // 查询弹窗所需类
searchPage: QadCostcentreApi.getQadCostcentrePage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}],
verificationParams: [{
key: 'costcentreCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
{
label: '成本中心类型',
field: 'costCenterType',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
},
{
label: '领用原因代码',
field: 'reasonCodeRequisition',
sort: 'custom',
table: {
width: 150
},
tableForm: {
enterSearch: true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择成领用原因代码',
searchField: 'code',
searchTitle: '领用原因代码',
searchAllSchemas: SubjectAccount.allSchemas,
searchPage: SubjectAccountApi.getSubjectAccountPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'costcentreType',
value: 'costCenterType',
message: '成本中心类型不能为空!',
isMainValue: true
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择成本中心代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '领用原因代码', // 查询弹窗标题
searchAllSchemas: SubjectAccount.allSchemas, // 查询弹窗所需类
searchPage: SubjectAccountApi.getSubjectAccountPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key: 'costcentreType',
value: 'costCenterType',
message: '成本中心类型不能为空!',
isMainValue: true
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
enterSearch: true,
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择QAD项目信息',
searchField: 'projectCode',
searchTitle: '领用原因代码',
searchAllSchemas: QadProject.allSchemas,
searchPage: QadProjectApi.getQadProjectPage,
verificationParams: [{
key: 'projectCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择QAD项目信息', // 输入框占位文本
searchField: 'projectCode', // 查询弹窗赋值字段
searchTitle: '领用原因代码', // 查询弹窗标题
searchAllSchemas: QadProject.allSchemas, // 查询弹窗所需类
searchPage: QadProjectApi.getQadProjectPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}],
verificationParams: [{
key: 'projectCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
{
label: '工作中心',
field: 'workCenter',
sort: 'custom',
table: {
width: 150
},
},
{
label: '订单号',
field: 'orderNumber',
sort: 'custom',
table: {
width: 150
},
},
{ {
label: 'Q1通知单号', label: 'Q1通知单号',
field: 'q1Number', field: 'q1Number',
@ -557,11 +794,27 @@ export const ScrapRequestMain = useCrudSchemas(
]) ])
) )
const validateOrderNumber = (rule: any, value: any, callback: any) => {
if (!value) {
callback();
} else {
const codeReg = /^[0-9]+$/
if (codeReg.test(value)) {
callback()
} else {
callback(new Error('订单号只能是数字'))
}
}
}
//表单校验 //表单校验
export const ScrapRequestMainRules = reactive({ export const ScrapRequestMainRules = reactive({
departmentCode: [ departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' } { required: true, message: '请输入部门', trigger: 'blur' }
], ],
orderNumber: [
{ validator: validateOrderNumber, trigger: 'change' }
],
autoCommit: [ autoCommit: [
{ required: true, message: '请选择是否自动提交', trigger: 'change' } { required: true, message: '请选择是否自动提交', trigger: 'change' }
], ],
@ -579,7 +832,19 @@ export const ScrapRequestMainRules = reactive({
], ],
fromWarehouseCode:[ fromWarehouseCode:[
{required: true,message: '请选择从仓库代码',trigger: 'change' } {required: true,message: '请选择从仓库代码',trigger: 'change' }
] ],
usageDescription:[
{ required: true, message: '请选择领用描述', trigger: 'blur' }
],
costCenterCode: [
{ required: true, message: '请输入成本中心代码', trigger: 'blur' }
],
costCenterType: [
{ required: true, message: '请输入成本中心类型', trigger: 'blur' }
],
reasonCodeRequisition: [
{ required: true, message: '请输入领用原因代码', trigger: 'blur' }
],
}) })
/** /**

2
src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRecordMain/sparepartReturnRecordMain.data.ts

@ -42,7 +42,7 @@ export const UnplannedreceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>(
table: { table: {
width: 180 width: 180
}, },
isSearch: true isSearch: false
}, },
{ {
label: '申请时间', label: '申请时间',

4
src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRequestMain/index.vue

@ -252,7 +252,7 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:unplannedreceipt-request-main:create'}), // defaultButtons.defaultAddBtn({hasPermi:'wms:unplannedreceipt-request-main:create'}), //
//defaultButtons.defaultImportBtn({hasPermi:'wms:unplannedreceipt-request-main:import'}), // defaultButtons.defaultImportBtn({hasPermi:'wms:unplannedreceipt-request-main:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:unplannedreceipt-request-main:export'}), // defaultButtons.defaultExportBtn({hasPermi:'wms:unplannedreceipt-request-main:export'}), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
@ -615,6 +615,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
dataType:'2',
templateUrl: '', templateUrl: '',
templateTitle: `${route.meta.title}】导入模版.xlsx` templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
@ -692,5 +693,6 @@ const tableFormSelectOnBlur = (field, val, row, index) => {
onMounted(async () => { onMounted(async () => {
getList() getList()
importTemplateData.templateUrl = await UnplannedreceiptRequestMainApi.importTemplate() importTemplateData.templateUrl = await UnplannedreceiptRequestMainApi.importTemplate()
console.log(344,importTemplateData)
}) })
</script> </script>

60
src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRequestMain/sparepartReturnRequestMain.data.ts

@ -801,9 +801,63 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
isSearch: true, isSearch: true,
isMainValue: false isMainValue: false
},{ },{
key: 'businessTypeCode', key: 'type',
value: 'UnplannedReceipt', value: 'ZZBZ',
action: '==', action: '!=',
isSearch: true,
isMainValue: false
},{
key: 'type',
value: 'WGJ',
action: '!=',
isSearch: true,
isMainValue: false
},{
key: 'type',
value: 'Q&J',
action: '!=',
isSearch: true,
isMainValue: false
},{
key: 'type',
value: 'PRHC',
action: '!=',
isSearch: true,
isMainValue: false
},{
key: 'type',
value: 'ONBZ',
action: '!=',
isSearch: true,
isMainValue: false
},{
key: 'type',
value: 'DZYH',
action: '!=',
isSearch: true,
isMainValue: false
},{
key: 'type',
value: 'CCP',
action: '!=',
isSearch: true,
isMainValue: false
},{
key: 'type',
value: 'BCP',
action: '!=',
isSearch: true,
isMainValue: false
},{
key: 'type',
value: 'QJ',
action: '!=',
isSearch: true,
isMainValue: false
},{
key: 'type',
value: 'YCL',
action: '!=',
isSearch: true, isSearch: true,
isMainValue: false isMainValue: false
} }

1
src/views/wms/inventoryjobManage/transferissue/transferissueRecordMain/transferissueRecordMain.data.ts

@ -45,6 +45,7 @@ export const TransferissueRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '运输方式', label: '运输方式',
field: 'transferMode', field: 'transferMode',
dictType: DICT_TYPE.TRANSFER_MODE,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150

1
src/views/wms/inventoryjobManage/transferreceipt/transferreceiptJobMain/transferreceiptJobMain.data.ts

@ -48,6 +48,7 @@ export const TransferreceiptJobMain = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '运输方式', label: '运输方式',
field: 'transferMode', field: 'transferMode',
dictType: DICT_TYPE.TRANSFER_MODE,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150

1
src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRecordMain/transferreceiptRecordMain.data.ts

@ -53,6 +53,7 @@ export const TransferreceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '运输方式', label: '运输方式',
field: 'transferMode', field: 'transferMode',
dictType: DICT_TYPE.TRANSFER_MODE,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150

1
src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/transferreceiptRequestMain.data.ts

@ -66,6 +66,7 @@ export const TransferreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
{ {
label: '运输方式', label: '运输方式',
field: 'transferMode', field: 'transferMode',
dictType: DICT_TYPE.TRANSFER_MODE,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150

1
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/unplannedreceiptRecordMain.data.ts

@ -115,6 +115,7 @@ export const UnplannedreceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>(
table: { table: {
width: 180 width: 180
}, },
isSearch: true,
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {

2
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue

@ -734,10 +734,12 @@ const submitForm = async (formType, submitData) => {
if(flag){ if(flag){
return return
} }
data.dataType='1'
formRef.value.formLoading = true formRef.value.formLoading = true
await UnplannedreceiptRequestMainApi.createUnplannedreceiptRequestMain(data) await UnplannedreceiptRequestMainApi.createUnplannedreceiptRequestMain(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
} else { } else {
data.dataType='1'
formRef.value.formLoading = true formRef.value.formLoading = true
await UnplannedreceiptRequestMainApi.updateUnplannedreceiptRequestMain(data) await UnplannedreceiptRequestMainApi.updateUnplannedreceiptRequestMain(data)
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))

22
src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue

@ -208,13 +208,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} else { } else {
row['batch'] = '000000' row['batch'] = '000000'
} }
// HL-4885 @ @
// tableform // tableform
// TODO: tableFormColumns 10 20 20 // TODO: tableFormColumns 10 20 20
ProductionreturnRequestDetail.allSchemas.tableFormColumns.map(item => { // ProductionreturnRequestDetail.allSchemas.tableFormColumns.map(item => {
if(item.field == 'qty' && val[0]['qty'] > 0) { // if(item.field == 'qty' && val[0]['qty'] > 0) {
item.tableForm.max = val[0]['qty'] // item.tableForm.max = val[0]['qty']
} // }
}) // })
} }
} else if(formField == 'workStationCode') { } else if(formField == 'workStationCode') {
// //
@ -257,12 +258,13 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
} else { } else {
setV['batch'] = '000000' setV['batch'] = '000000'
} }
// HL-4885 @ @
// tableform // tableform
ProductionreturnRequestDetail.allSchemas.tableFormColumns.map(item => { // ProductionreturnRequestDetail.allSchemas.tableFormColumns.map(item => {
if(item.field == 'qty' && val[0]['qty'] > 0) { // if(item.field == 'qty' && val[0]['qty'] > 0) {
item.tableForm.max = val[0]['qty'] // item.tableForm.max = val[0]['qty']
} // }
}) // })
} }
} else if(formField == 'workStationCode') { } else if(formField == 'workStationCode') {
setV['workStationCode'] = val[0]['code'] setV['workStationCode'] = val[0]['code']

26
src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue

@ -193,15 +193,16 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['uom'] = val[0]['uom'] row['uom'] = val[0]['uom']
row['inventoryStatus'] = val[0]['inventoryStatus'] row['inventoryStatus'] = val[0]['inventoryStatus']
row['qty'] = Number(val[0]['qty']) row['qty'] = Number(val[0]['qty'])
// HL-4885 @ @
// tableform // tableform
ProductionreturnRequestDetail.allSchemas.tableFormColumns.forEach(item => { // ProductionreturnRequestDetail.allSchemas.tableFormColumns.forEach(item => {
if(item.field == 'qty' && Number(val[0]['qty'])>item.tableForm.min) { // if(item.field == 'qty' && Number(val[0]['qty'])>item.tableForm.min) {
item.tableForm.max = Number(val[0]['qty']) // item.tableForm.max = Number(val[0]['qty'])
}
// if(item.field == 'batch') {
// item.tableForm.disabled = false
// } // }
}) // // if(item.field == 'batch') {
// // item.tableForm.disabled = false
// // }
// })
} }
} else if(formField == 'workStationCode') { } else if(formField == 'workStationCode') {
val.forEach(item=>{ val.forEach(item=>{
@ -238,12 +239,13 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
setV['uom'] = val[0]['uom'] setV['uom'] = val[0]['uom']
setV['inventoryStatus'] = val[0]['inventoryStatus'] setV['inventoryStatus'] = val[0]['inventoryStatus']
setV['qty'] = val[0]['qty'] setV['qty'] = val[0]['qty']
// HL-4885 @ @
// tableform // tableform
ProductionreturnRequestDetail.allSchemas.tableFormColumns.map(item => { // ProductionreturnRequestDetail.allSchemas.tableFormColumns.map(item => {
if(item.field == 'qty') { // if(item.field == 'qty') {
item.tableForm.max = val[0]['qty'] // item.tableForm.max = val[0]['qty']
} // }
}) // })
} }
} else if(formField == 'workStationCode') { } else if(formField == 'workStationCode') {
setV['workStationCode'] = val[0]['code'] setV['workStationCode'] = val[0]['code']

2
src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/inventorychangeRequestMain.data.ts

@ -564,11 +564,13 @@ export const InventorychangeRequestDetail = useCrudSchemas(reactive<CrudSchema[]
form: { form: {
component: 'InputNumber', component: 'InputNumber',
componentProps: { componentProps: {
disabled:true,
min:0, min:0,
precision: 6 precision: 6
} }
}, },
tableForm: { tableForm: {
disabled:true,
type: 'InputNumber', type: 'InputNumber',
min:0, min:0,
precision: 6 precision: 6

17
src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/index.vue

@ -325,7 +325,6 @@ const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item)) tableData.value = tableData.value.filter(item => !selection.includes(item))
} }
//true0 //true0
const flag = ref()
// //
const submitForm = async (formType, submitData) => { const submitForm = async (formType, submitData) => {
@ -334,15 +333,20 @@ const submitForm = async (formType, submitData) => {
data.id = data.masterId data.id = data.masterId
} }
data.subList = tableData.value // data.subList = tableData.value //
let flag = false
data.subList.forEach(item => { data.subList.forEach(item => {
item.toBatch = item.fromBatch item.toBatch = item.fromBatch
item.fromLocationCode = data.fromLocationCode item.fromLocationCode = data.fromLocationCode
item.toLocationCode = data.toLocationCode item.toLocationCode = data.toLocationCode
item.toInventoryStatus = data.toInventoryStatus item.toInventoryStatus = data.toInventoryStatus
if(item.checkQty>0&&Number(item.qty)==0){
if(item.qty == 0){ message.error(`${item['itemCode']}数量不能为0!`)
message.error(`数量不能为0!`) flag = true
flag.value = true return;
}
if(item.checkQty>0&&item.qty<0){
message.error(`${item['itemCode']}数量不能小于0!`)
flag = true
return; return;
} }
}) })
@ -351,7 +355,7 @@ const submitForm = async (formType, submitData) => {
message.warning('从库位和到库位不能相同') message.warning('从库位和到库位不能相同')
return return
} }
if(flag.value){ if(flag){
formRef.value.formLoading = false formRef.value.formLoading = false
return return
} }
@ -387,6 +391,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
newRow['fromInventoryStatus'] = item['inventoryStatus'] newRow['fromInventoryStatus'] = item['inventoryStatus']
newRow['origin_fromLocationCode'] = item['locationCode'] newRow['origin_fromLocationCode'] = item['locationCode']
newRow['uom'] = item['uom'] newRow['uom'] = item['uom']
newRow['checkQty'] = item['qty'] // HL-5524
newRow['qty'] = item['qty'] newRow['qty'] = item['qty']
if(item['packingNumber']&&item['packingNumber'].length>0){ if(item['packingNumber']&&item['packingNumber'].length>0){
newRow['packUnit'] = item['packUnit'] newRow['packUnit'] = item['packUnit']

4
src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/inventorymoveRecordRequestMain.data.ts

@ -411,14 +411,14 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
form: { form: {
component: 'InputNumber', component: 'InputNumber',
componentProps: { componentProps: {
min: 0, // min: 0,
precision: 6 precision: 6
} }
}, },
tableForm: { tableForm: {
disabled: false, disabled: false,
type: 'InputNumber', type: 'InputNumber',
min: 0, // min: 0,
precision: 6 precision: 6
} }
}, },

20
src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue

@ -44,6 +44,7 @@
ref="formRef" ref="formRef"
:isOpenSearchTable="true" :isOpenSearchTable="true"
fieldTableColumn="fromPackingNumber" fieldTableColumn="fromPackingNumber"
:includeCollectionTable="true"
@success="getList" @success="getList"
:rules="InventorymoveRequestMainRules" :rules="InventorymoveRequestMainRules"
:formAllSchemas="InventorymoveRequestMain.allSchemas" :formAllSchemas="InventorymoveRequestMain.allSchemas"
@ -90,6 +91,7 @@ import * as InventorymoveRequestDetailApi from '@/api/wms/inventorymoveRequestDe
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as LocationApi from '@/api/wms/location' import * as LocationApi from '@/api/wms/location'
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
import dayjs from 'dayjs'
// //
defineOptions({ name: 'InventorymoveRequestMain' }) defineOptions({ name: 'InventorymoveRequestMain' })
@ -615,6 +617,24 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */ /** 添加/修改操作 */
const formRef = ref() const formRef = ref()
const openForm =async (type: string, row?: number) => { const openForm =async (type: string, row?: number) => {
if(type=='create'){
InventorymoveRequestMain.allSchemas.formSchema.forEach(item =>{
if(item.field == 'fromWarehouseCode'){
item.componentProps.isSearchList = true
item.componentProps.disabled = false
}
if(item.field == 'dueTime') {
item.value = dayjs().add(1, 'hour').valueOf()
}
})
}else{
InventorymoveRequestMain.allSchemas.formSchema.forEach(item =>{
if(item.field == 'fromWarehouseCode'){
item.componentProps.isSearchList = false
item.componentProps.disabled = true
}
})
}
tableData.value = [] // tableData.value = [] //
formRef.value.open(type, row) formRef.value.open(type, row)
} }

3
src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts

@ -584,7 +584,8 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
}, },
tableForm:{ tableForm:{
multiple:true, multiple:true,
isInpuFocusShow: true, // 开启查询弹窗 disabled:true,
isInpuFocusShow: false, // 开启查询弹窗
searchListPlaceholder: '请选择从包装号', searchListPlaceholder: '请选择从包装号',
searchField: 'packingNumber', searchField: 'packingNumber',
searchTitle: '库存余额信息', searchTitle: '库存余额信息',

16
src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue

@ -198,6 +198,7 @@ const butttondata = (row,$index) => {
// defaultButtons.mainInspectRequestBtn({hasPermi:'wms:productreceipt-record-main:createInspectRequest',hide:row.inspectRequestFlag == "FALSE" }),// // defaultButtons.mainInspectRequestBtn({hasPermi:'wms:productreceipt-record-main:createInspectRequest',hide:row.inspectRequestFlag == "FALSE" }),//
defaultButtons.mainInspectRequestBtn({hide:row.inspectRequestFlag == "FALSE" }),// defaultButtons.mainInspectRequestBtn({hide:row.inspectRequestFlag == "FALSE" }),//
defaultButtons.mainListPointBtn(null), // defaultButtons.mainListPointBtn(null), //
defaultButtons.mainListRecoveryBtn(null), //
] ]
} }
@ -207,8 +208,11 @@ const buttonTableClick = async (val, row) => {
handleCreateInspectRequest(row.number) handleCreateInspectRequest(row.number)
} else if (val == 'point') { // } else if (val == 'point') { //
labelPrint(row) labelPrint(row)
} else if (val == 'recovery') { //
labelRecovery(row)
} }
} }
const BASE_URL = getJmreportBaseUrl() const BASE_URL = getJmreportBaseUrl()
// //
const searchTableRef = ref() const searchTableRef = ref()
@ -241,6 +245,18 @@ const labelPrint = async (row) => {
}) })
searchTableRef.value.openData("标签信息",tableObjectPrint,{tableColumns},true) searchTableRef.value.openData("标签信息",tableObjectPrint,{tableColumns},true)
} }
//
const labelRecovery = async (row) => {
try {
await message.confirm(t('ts.确认撤销报工吗?'))
tableObject.loading = true
let resType = await ProductreceiptRecordMainApi.handleRecoveryProductreceiptRecord(row)
message.success(t('ts.确认撤销报工成功'))
} catch {
} finally {
tableObject.loading = false
}
}
// -- // --
const searchTableSuccessLabel = async (formField, searchField, val, formRef, type, row) => { const searchTableSuccessLabel = async (formField, searchField, val, formRef, type, row) => {
console.log('批量打印',val) console.log('批量打印',val)

2
src/views/wms/productionManage/productreceipt/productreceiptRecordMain/productreceiptRecordMain.data.ts

@ -742,7 +742,7 @@ export const ProductreceiptRecordDetail = useCrudSchemas(reactive<CrudSchema[]>(
isDetail: false, isDetail: false,
isForm: false , isForm: false ,
table: { table: {
width: 220, width: 280,
fixed: 'right' fixed: 'right'
}, },
isTableForm:true, isTableForm:true,

366
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue

@ -1,7 +1,14 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="[...ProductreceiptRequestMain.allSchemas.searchSchema,...ProductreceiptRequestDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" /> <Search
:schema="[
...ProductreceiptRequestMain.allSchemas.searchSchema,
...ProductreceiptRequestDetail.allSchemas.searchSchema
]"
@search="setSearchParams"
@reset="setSearchParams"
/>
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
@ -17,7 +24,8 @@
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
<Table v-clientTable <Table
v-clientTable
:columns="tableColumns" :columns="tableColumns"
:data="tableObject.tableList" :data="tableObject.tableList"
:loading="tableObject.loading" :loading="tableObject.loading"
@ -34,7 +42,10 @@
</el-button> </el-button>
</template> </template>
<template #action="{ row, $index }"> <template #action="{ row, $index }">
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" /> <ButtonBase
:Butttondata="butttondata(row, $index)"
@button-base-click="buttonTableClick($event, row)"
/>
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
@ -43,7 +54,7 @@
<BasicForm <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true" :isOpenSearchTable="true"
fieldTableColumn="workStationCode" fieldTableColumn="itemCode"
@success="getList" @success="getList"
:rules="ProductreceiptRequestMainRules" :rules="ProductreceiptRequestMainRules"
:formAllSchemas="ProductreceiptRequestMain.allSchemas" :formAllSchemas="ProductreceiptRequestMain.allSchemas"
@ -61,11 +72,17 @@
@submitForm="submitForm" @submitForm="submitForm"
> >
<template v-slot="{ row }"> <template v-slot="{ row }">
<el-date-picker v-bind:modelValue="row['expireTime']?addDay(row['produceDate'],row['expireTime']):dayjs('2099-12-31').valueOf()" <el-date-picker
v-bind:modelValue="
row['expireTime']
? addDay(row['produceDate'], row['expireTime'])
: dayjs('2099-12-31').valueOf()
"
:clearable="true" :clearable="true"
style="width: 100%" style="width: 100%"
:disabled="true" :disabled="true"
:placeholder="t('ts.选择日期')"/> :placeholder="t('ts.选择日期')"
/>
</template> </template>
</BasicForm> </BasicForm>
@ -123,21 +140,37 @@
</Dialog> </Dialog>
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/productreceipt-request-main/import" :importTemplateData="importTemplateData" <ImportForm
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" :extend="'predict'"/> ref="importFormRef"
url="/wms/productreceipt-request-main/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
:updateIsDisable="true"
:coverIsDisable="true"
:mode="2"
:extend="'predict'"
/>
<!-- 标签打印 --> <!-- 标签打印 -->
<SearchTable style="width:905px" ref="searchTableRef" @searchTableSuccess="searchTableSuccessLabel" /> <SearchTable
style="width: 905px"
ref="searchTableRef"
@searchTableSuccess="searchTableSuccessLabel"
/>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import { ProductreceiptRequestMain,ProductreceiptRequestMainRules,ProductreceiptRequestDetail,
ProductreceiptRequestDetailRules, BackflushDetailRequest,
ProductreceiptRequestLabel,ProductreceiptRequestLabelRules } from './productreceiptRequestMain.data'
import { import {
SupplierdeliverRequestPackage ProductreceiptRequestMain,
} from '../../../purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts' ProductreceiptRequestMainRules,
ProductreceiptRequestDetail,
ProductreceiptRequestDetailRules,
BackflushDetailRequest,
ProductreceiptRequestLabel,
ProductreceiptRequestLabelRules
} from './productreceiptRequestMain.data'
import { SupplierdeliverRequestPackage } from '../../../purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts'
// } from '../../../supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data' // } from '../../../supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data'
import * as ProductreceiptRequestMainApi from '@/api/wms/productreceiptRequestMain' import * as ProductreceiptRequestMainApi from '@/api/wms/productreceiptRequestMain'
import * as ProductreceiptRequestDetailApi from '@/api/wms/productreceiptRequestDetail' import * as ProductreceiptRequestDetailApi from '@/api/wms/productreceiptRequestDetail'
@ -149,9 +182,10 @@ import { formatTime } from '@/utils/index'
import { getAccessToken } from '@/utils/auth' import { getAccessToken } from '@/utils/auth'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { getJmreportBaseUrl } from '@/utils/systemParam' import { getJmreportBaseUrl } from '@/utils/systemParam'
import * as BomApi from "@/api/wms/bom"; import * as BomApi from '@/api/wms/bom'
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
import * as WorkshopApi from '@/api/wms/workshop' import * as WorkshopApi from '@/api/wms/workshop'
import * as ConfigApi from '@/api/infra/config'
// //
// //
@ -163,9 +197,13 @@ const { t } = useI18n() // 国际化
const route = useRoute() // const route = useRoute() //
const routeName = ref() const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref([...ProductreceiptRequestMain.allSchemas.tableColumns,...ProductreceiptRequestDetail.allSchemas.tableMainColumns]) const tableColumns = ref([
...ProductreceiptRequestMain.allSchemas.tableColumns,
...ProductreceiptRequestDetail.allSchemas.tableMainColumns
])
// table // table
const buttondataTable = ref([{ const buttondataTable = ref([
{
label: 'Bom', label: 'Bom',
name: 'bom', name: 'bom',
hide: false, hide: false,
@ -173,8 +211,9 @@ const buttondataTable = ref([{
icon: '', icon: '',
color: '', color: '',
hasPermi: '', hasPermi: '',
link: true, // link: true //
}]) }
])
// //
const detailListTableColumns = ProductreceiptRequestLabel.allSchemas const detailListTableColumns = ProductreceiptRequestLabel.allSchemas
@ -194,12 +233,10 @@ const { tableObject: detatableDataBom, tableMethods: detatableMethodsBom } =useT
}) })
const { getList: getDetailListBom } = detatableMethodsBom const { getList: getDetailListBom } = detatableMethodsBom
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
tableColumns.value = val tableColumns.value = val
} }
// //
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => { nextTick(() => {
@ -217,52 +254,53 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
message.warning(`物料${val[0]['itemCode']}已经存在`) message.warning(`物料${val[0]['itemCode']}已经存在`)
return return
} }
row['uom'] = val[0]['uom'] const index1 = 0
row['produceDate'] = dayjs().valueOf() setTableFormsValues(val, index1)
row[formField] = val[0][searchField]
// BOM
const param1 = {
productItemCode: val[0]['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC',
}
BomApi.getBomPage(param1).then(res => {
console.log(res)
if(res?.list?.length>0){
row['bomVersion'] = res.list[0].version
}
})
}else if (formField == 'workStationCode') {
//
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField]
newRow.batch = formatTime(new Date(), 'yyyyMMdd')
tableData.value.push(newRow)
})
} else { } else {
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
} }
} else { } else {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
if ('workshopCode' == formField) { if ('workshopCode' == formField) {
 // //
setV['productionLineCode'] = '' setV['productionLineCode'] = ''
tableData.value = [] tableData.value = []
} else if ('productionLineCode' == formField) { } else if ('productionLineCode' == formField) {
 //线 //线
tableData.value = [] tableData.value = []
} }
formRef.setValues(setV) formRef.setValues(setV)
} }
}) })
} }
const setTableFormsValues = async (val, index1) => {
if (index1 <= val.length - 1) {
const newRow = JSON.parse(JSON.stringify({ ...tableFormKeys, ...val[index1] }))
newRow['itemCode'] = val[index1]['itemCode']
newRow['uom'] = val[0]['uom']
newRow['produceDate'] = dayjs().valueOf()
const param1 = {
productItemCode: val[0]['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC'
}
await BomApi.getBomPage(param1).then((res) => {
console.log(res)
if (res?.list?.length > 0) {
newRow['bomVersion'] = res.list[0].version
}
})
tableData.value.push(newRow)
console.log(tableData.value)
index1++
setTableFormsValues(val, index1)
}
}
// //
const searchTableSuccessDetail = (formField, searchField, val, formRef) => { const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(() => { nextTick(() => {
@ -286,7 +324,7 @@ const HeadButttondata = [
defaultButtons.defaultExportBtn({ hasPermi: 'wms:productreceipt-request-main:export' }), // defaultButtons.defaultExportBtn({ hasPermi: 'wms:productreceipt-request-main:export' }), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null) //
// { // {
// label: '', // label: '',
// name: 'zdy', // name: 'zdy',
@ -299,13 +337,17 @@ const HeadButttondata = [
// //
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
if (val == 'add') { // if (val == 'add') {
//
openForm('create') openForm('create')
} else if (val == 'import') { // } else if (val == 'import') {
//
handleImport() handleImport()
} else if (val == 'export') { // } else if (val == 'export') {
//
handleExport() handleExport()
} else if (val == 'refresh') { // } else if (val == 'refresh') {
//
if (tableObject.params.filters && tableObject.params.filters.length > 0) { if (tableObject.params.filters && tableObject.params.filters.length > 0) {
searchFormClick({ searchFormClick({
filters: tableObject.params.filters filters: tableObject.params.filters
@ -313,8 +355,10 @@ const buttonBaseClick = (val, item) => {
} else { } else {
getList() getList()
} }
} else if (val == 'filtrate') { // } else if (val == 'filtrate') {
} else { // //
} else {
//
console.log('其他按钮', item) console.log('其他按钮', item)
} }
} }
@ -330,18 +374,41 @@ const isShowMainButton = (row,val) => {
// - // -
const butttondata = (row, $index) => { const butttondata = (row, $index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1 const findIndex = row['masterId']
? tableObject.tableList.findIndex((item) => item['masterId'] == row['masterId'])
: -1
if (findIndex > -1 && findIndex < $index) { if (findIndex > -1 && findIndex < $index) {
return [] return []
} }
return [ return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']), hasPermi:'wms:productreceipt-request-main:close'}), // defaultButtons.mainListCloseBtn({
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']), hasPermi:'wms:productreceipt-request-main:reAdd'}), // hide: isShowMainButton(row, ['1', '2', '3', '4', '6']),
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:productreceipt-request-main:submit'}), // hasPermi: 'wms:productreceipt-request-main:close'
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:productreceipt-request-main:refused'}), // }), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']), hasPermi:'wms:productreceipt-request-main:agree'}), // defaultButtons.mainListReAddBtn({
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']), hasPermi:'wms:productreceipt-request-main:handle'}), // hide: isShowMainButton(row, ['4', '5']),
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']), hasPermi:'wms:productreceipt-request-main:update'}), // hasPermi: 'wms:productreceipt-request-main:reAdd'
}), //
defaultButtons.mainListSubmitBtn({
hide: isShowMainButton(row, ['1']),
hasPermi: 'wms:productreceipt-request-main:submit'
}), //
defaultButtons.mainListTurnDownBtn({
hide: isShowMainButton(row, ['2']),
hasPermi: 'wms:productreceipt-request-main:refused'
}), //
defaultButtons.mainListApproveBtn({
hide: isShowMainButton(row, ['2']),
hasPermi: 'wms:productreceipt-request-main:agree'
}), //
defaultButtons.mainListHandleBtn({
hide: isShowMainButton(row, ['3']),
hasPermi: 'wms:productreceipt-request-main:handle'
}), //
defaultButtons.mainListEditBtn({
hide: isShowMainButton(row, ['1']),
hasPermi: 'wms:productreceipt-request-main:update'
}), //
{ {
label: '创建标签', label: '创建标签',
name: 'cjbq', name: 'cjbq',
@ -350,79 +417,93 @@ const butttondata = (row,$index) => {
icon: '', icon: '',
color: '', color: '',
hasPermi: '', hasPermi: '',
link: true, // link: true //
}, },
defaultButtons.mainListPointBtn({hide:isShowMainButton(row,['3','6','8'])}), // defaultButtons.mainListPointBtn({ hide: isShowMainButton(row, ['3', '6', '8']) }) //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:productreceipt-request-main:delete'}), // // defaultButtons.mainListDeleteBtn({hasPermi:'wms:productreceipt-request-main:delete'}), //
] ]
} }
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { // if (val == 'mainClose') {
//
await message.confirm('确认要关闭吗?') await message.confirm('确认要关闭吗?')
tableObject.loading = true tableObject.loading = true
ProductreceiptRequestMainApi.close(row.masterId).then(() => { ProductreceiptRequestMainApi.close(row.masterId)
.then(() => {
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
tableObject.loading = false tableObject.loading = false
buttonBaseClick('refresh', null) buttonBaseClick('refresh', null)
}).catch(err => { })
.catch((err) => {
tableObject.loading = false tableObject.loading = false
console.log(err) console.log(err)
}) })
} else if (val == 'mainReAdd') { // } else if (val == 'mainReAdd') {
//
await message.confirm('确认要重新添加吗?') await message.confirm('确认要重新添加吗?')
tableObject.loading = true tableObject.loading = true
ProductreceiptRequestMainApi.reAdd(row.masterId).then(() => { ProductreceiptRequestMainApi.reAdd(row.masterId)
.then(() => {
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
tableObject.loading = false tableObject.loading = false
buttonBaseClick('refresh', null) buttonBaseClick('refresh', null)
}).catch(err => { })
.catch((err) => {
tableObject.loading = false tableObject.loading = false
console.log(err) console.log(err)
}) })
} else if (val == 'mainSubmit') { // } else if (val == 'mainSubmit') {
//
await message.confirm('确认要提交审批吗?') await message.confirm('确认要提交审批吗?')
tableObject.loading = true tableObject.loading = true
ProductreceiptRequestMainApi.submit(row.masterId).then(() => { ProductreceiptRequestMainApi.submit(row.masterId)
.then(() => {
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
tableObject.loading = false tableObject.loading = false
buttonBaseClick('refresh', null) buttonBaseClick('refresh', null)
}).catch(err => { })
.catch((err) => {
tableObject.loading = false tableObject.loading = false
console.log(err) console.log(err)
}) })
} else if (val == 'mainTurnDown') { // } else if (val == 'mainTurnDown') {
//
await message.confirm('确认要驳回吗?') await message.confirm('确认要驳回吗?')
tableObject.loading = true tableObject.loading = true
ProductreceiptRequestMainApi.refused(row.masterId).then(() => { ProductreceiptRequestMainApi.refused(row.masterId)
.then(() => {
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
tableObject.loading = false tableObject.loading = false
buttonBaseClick('refresh', null) buttonBaseClick('refresh', null)
}).catch(err => { })
.catch((err) => {
tableObject.loading = false tableObject.loading = false
console.log(err) console.log(err)
}) })
} else if (val == 'mainApprove') { // } else if (val == 'mainApprove') {
//
await message.confirm('确认要审批通过吗?') await message.confirm('确认要审批通过吗?')
tableObject.loading = true tableObject.loading = true
ProductreceiptRequestMainApi.agree(row.masterId).then(() => { ProductreceiptRequestMainApi.agree(row.masterId)
.then(() => {
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
tableObject.loading = false tableObject.loading = false
buttonBaseClick('refresh', null) buttonBaseClick('refresh', null)
}).catch(err => { })
.catch((err) => {
tableObject.loading = false tableObject.loading = false
console.log(err) console.log(err)
}) })
} else if (val == 'cjbq') { // } else if (val == 'cjbq') {
//
// //
let isCreateLabel = false let isCreateLabel = false
await PackageApi.getPackagePage({ await PackageApi.getPackagePage({
requestNumber: row.number requestNumber: row.number
}).then(res => { }).then((res) => {
if (res) { if (res) {
if (res.list.length > 0) isCreateLabel = true if (res.list.length > 0) isCreateLabel = true
} }
@ -445,13 +526,13 @@ const buttonTableClick = async (val, row) => {
pageNo: 1, pageNo: 1,
code: item.itemCode, code: item.itemCode,
sort: '', sort: '',
by: 'ASC', by: 'ASC'
}).then(res => { }).then((res) => {
if (res.list.length > 0) { if (res.list.length > 0) {
// //
if (res.list[0].enableMake == "FALSE") { if (res.list[0].enableMake == 'FALSE') {
// tableform // tableform
detailListTableColumns.tableFormColumns.map(itemColumns => { detailListTableColumns.tableFormColumns.map((itemColumns) => {
if (itemColumns.field == 'productionLineCodePackage') { if (itemColumns.field == 'productionLineCodePackage') {
// itemColumns.tableForm.isInpuFocusShow = false // itemColumns.tableForm.isInpuFocusShow = false
// itemColumns.tableForm.disabled = true // itemColumns.tableForm.disabled = true
@ -465,7 +546,7 @@ const buttonTableClick = async (val, row) => {
}) })
} else { } else {
// tableform // tableform
detailListTableColumns.tableFormColumns.map(itemColumns => { detailListTableColumns.tableFormColumns.map((itemColumns) => {
if (itemColumns.field == 'supplierItemCode') { if (itemColumns.field == 'supplierItemCode') {
itemColumns.tableForm.isInpuFocusShow = false itemColumns.tableForm.isInpuFocusShow = false
itemColumns.tableForm.disabled = true itemColumns.tableForm.disabled = true
@ -485,13 +566,13 @@ const buttonTableClick = async (val, row) => {
} }
}) })
}) })
} else if (val == 'mainHandle') {
} else if (val == 'mainHandle') { // //
// //
let isCreateLabel = false let isCreateLabel = false
await PackageApi.getPackagePage({ await PackageApi.getPackagePage({
requestNumber: row.number requestNumber: row.number
}).then(res => { }).then((res) => {
if (res) { if (res) {
if (res.list.length > 0) isCreateLabel = true if (res.list.length > 0) isCreateLabel = true
} }
@ -501,18 +582,23 @@ const buttonTableClick = async (val, row) => {
return return
} }
tableObject.loading = true tableObject.loading = true
ProductreceiptRequestMainApi.handle(row.masterId).then(() => { ProductreceiptRequestMainApi.handle(row.masterId)
.then(() => {
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
tableObject.loading = false tableObject.loading = false
buttonBaseClick('refresh', null) buttonBaseClick('refresh', null)
}).catch(err => { })
.catch((err) => {
console.log(err) console.log(err)
}) })
} else if (val == 'edit') { // } else if (val == 'edit') {
//
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') {
//
handleDelete(row.masterId) handleDelete(row.masterId)
} else if (val == 'point') { // } else if (val == 'point') {
//
handlePoint(row) handlePoint(row)
} }
} }
@ -524,7 +610,7 @@ const openForm =async (type: string, row?: number) => {
// //
if (type == 'update') { if (type == 'update') {
// tableform // tableform
ProductreceiptRequestMain.allSchemas.formSchema.map(itemColumns => { ProductreceiptRequestMain.allSchemas.formSchema.map((itemColumns) => {
if (itemColumns.field == 'workshopCode') { if (itemColumns.field == 'workshopCode') {
itemColumns.componentProps.isSearchList = false itemColumns.componentProps.isSearchList = false
itemColumns.componentProps.disabled = true itemColumns.componentProps.disabled = true
@ -532,7 +618,7 @@ const openForm =async (type: string, row?: number) => {
}) })
} else { } else {
// tableform // tableform
ProductreceiptRequestMain.allSchemas.formSchema.map(itemColumns => { ProductreceiptRequestMain.allSchemas.formSchema.map((itemColumns) => {
if (itemColumns.field == 'workshopCode') { if (itemColumns.field == 'workshopCode') {
itemColumns.componentProps.isSearchList = true itemColumns.componentProps.isSearchList = true
itemColumns.componentProps.disabled = false itemColumns.componentProps.disabled = false
@ -547,7 +633,9 @@ const { wsCache } = useCache()
/** 详情操作 */ /** 详情操作 */
const detailRef = ref() const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => { const openDetail = (row: any, titleName: any, titleValue: any) => {
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name const departmentCode = wsCache
.get(CACHE_KEY.DEPT)
.find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode)) if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
detailRef.value.openDetail(row, titleName, titleValue, 'requestProductreceiptMain') detailRef.value.openDetail(row, titleName, titleValue, 'requestProductreceiptMain')
} }
@ -564,7 +652,8 @@ const handleDelete = async (id: number) => {
tableObject.loading = false tableObject.loading = false
// //
buttonBaseClick('refresh', null) buttonBaseClick('refresh', null)
} catch {}finally{ } catch {
} finally {
tableObject.loading = false tableObject.loading = false
} }
} }
@ -578,7 +667,9 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const excelTitle = ref(route.meta.title) const excelTitle = ref(route.meta.title)
const data = await ProductreceiptRequestMainApi.exportProductreceiptRequestMain(tableObject.params) const data = await ProductreceiptRequestMainApi.exportProductreceiptRequestMain(
tableObject.params
)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
@ -590,7 +681,7 @@ const handleExport = async () => {
* tableForm方法 * tableForm方法
*/ */
const tableFormKeys = {} const tableFormKeys = {}
ProductreceiptRequestDetail.allSchemas.tableFormColumns.forEach(item => { ProductreceiptRequestDetail.allSchemas.tableFormColumns.forEach((item) => {
tableFormKeys[item.field] = item.default ? item.default : '' tableFormKeys[item.field] = item.default ? item.default : ''
}) })
const tableData = ref([]) const tableData = ref([])
@ -609,7 +700,7 @@ const handleDeleteTable = (item, index) => {
} }
} }
const tableSelectionDelete = (selection) => { const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item)) tableData.value = tableData.value.filter((item) => !selection.includes(item))
} }
// //
const submitForm = async (formType, submitData) => { const submitForm = async (formType, submitData) => {
@ -618,11 +709,13 @@ const submitForm = async (formType, submitData) => {
data.id = data.masterId data.id = data.masterId
} }
tableData.value.forEach((row, index) => { tableData.value.forEach((row, index) => {
row['expireDate'] = row['expireTime']?addDay(row['produceDate'],row['expireTime']).valueOf():dayjs('2099-12-31').valueOf() row['expireDate'] = row['expireTime']
? addDay(row['produceDate'], row['expireTime']).valueOf()
: dayjs('2099-12-31').valueOf()
}) })
data.type = 'predict' data.type = 'predict'
data.subList = tableData.value // data.subList = tableData.value //
if(data.subList.find(item => (item.qty <= 0))) { if (data.subList.find((item) => item.qty <= 0)) {
message.warning('数量必须大于0') message.warning('数量必须大于0')
formRef.value.formLoading = false formRef.value.formLoading = false
return return
@ -681,14 +774,16 @@ const submitFormLabel = async (formType, submitData) => {
data.id = data.masterId data.id = data.masterId
} }
try { try {
console.log("aaaaa",data); console.log('aaaaa', data)
data.subList = detatableData.tableList data.subList = detatableData.tableList
console.log("bbbbb",data); console.log('bbbbb', data)
// //
await ProductreceiptRequestMainApi.productCreateLabel(data).then(res => { await ProductreceiptRequestMainApi.productCreateLabel(data)
.then((res) => {
isCreateLabel.value = true isCreateLabel.value = true
message.success('创建标签成功') message.success('创建标签成功')
}).catch(err => { })
.catch((err) => {
isCreateLabel.value = false isCreateLabel.value = false
console.log(err) console.log(err)
message.error('创建标签失败') message.error('创建标签失败')
@ -701,7 +796,8 @@ const submitFormLabel = async (formType, submitData) => {
// Bom // Bom
const tableFormButton = async (val, row) => { const tableFormButton = async (val, row) => {
if (val == 'bom') { // bom if (val == 'bom') {
// bom
bomModelVisible.value = true bomModelVisible.value = true
DialogTitle.value = '物料代码【' + row.itemCode + '】——Bom信息' DialogTitle.value = '物料代码【' + row.itemCode + '】——Bom信息'
detatableDataBom.params = { detatableDataBom.params = {
@ -713,14 +809,14 @@ const tableFormButton = async (val , row) => {
// / // /
const detailValidate = (data) => { const detailValidate = (data) => {
let tag = false; let tag = false
if (data.qty <= 0) { if (data.qty <= 0) {
message.warning('数量必须大于0') message.warning('数量必须大于0')
tag = false; tag = false
return tag; return tag
} else { } else {
tag = true; tag = true
return tag; return tag
} }
} }
@ -730,7 +826,8 @@ const handlePoint = async (row) => {
// //
await PackageApi.getPackagePage({ await PackageApi.getPackagePage({
requestNumber: row.number requestNumber: row.number
}).then((res) => { })
.then((res) => {
if (res.list.length > 0) { if (res.list.length > 0) {
isCreateLabel.value = true isCreateLabel.value = true
if (res.list[0].productionLineCode != null) { if (res.list[0].productionLineCode != null) {
@ -741,7 +838,8 @@ const handlePoint = async (row) => {
} else { } else {
isCreateLabel.value = false isCreateLabel.value = false
} }
}).catch(err => { })
.catch((err) => {
isCreateLabel.value = false isCreateLabel.value = false
console.log(err) console.log(err)
}) })
@ -765,7 +863,7 @@ const searchTableRef = ref()
// //
const labelPrint = async (row) => { const labelPrint = async (row) => {
tableObject.loading = true tableObject.loading = true
const defaultParams = {'moduleName':'productreceipt_predict','recordNumber':row.number} const defaultParams = { moduleName: 'productreceipt_predict', recordNumber: row.number }
const { tableObject: tableObjectPrint, tableMethods } = useTable({ const { tableObject: tableObjectPrint, tableMethods } = useTable({
defaultParams, defaultParams,
getListApi: PackageApi.getLabelDetailPage // getListApi: PackageApi.getLabelDetailPage //
@ -779,7 +877,7 @@ const labelPrint = async (row) => {
tableColumns.forEach((item) => { tableColumns.forEach((item) => {
item.width = item.table?.width || 150 item.width = item.table?.width || 150
}) })
searchTableRef.value.openData("标签信息",tableObjectPrint,{tableColumns},true) searchTableRef.value.openData('标签信息', tableObjectPrint, { tableColumns }, true)
} }
// -- // --
@ -790,12 +888,13 @@ const searchTableSuccessLabel = async (formField, searchField, val, formRef, typ
// rows = [...rows,...item.selectionRows.map(item1=>item1.number)] // rows = [...rows,...item.selectionRows.map(item1=>item1.number)]
// }) // })
if (val.length == 0) { if (val.length == 0) {
message.warning("请先选择要打印的数据!") message.warning('请先选择要打印的数据!')
return return
} }
// window.open(src.value + '&asn_number=' + val.map(item1=>item1.number).join(',')) // window.open(src.value + '&asn_number=' + val.map(item1=>item1.number).join(','))
await PackageApi.batchPrintingLable(val.map(item1=>item1.number).join(',')).then(res => { await PackageApi.batchPrintingLable(val.map((item1) => item1.number).join(','))
.then((res) => {
console.log(res) console.log(res)
if (labelType.value == 'cg') { if (labelType.value == 'cg') {
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken()) const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
@ -804,25 +903,26 @@ const searchTableSuccessLabel = async (formField, searchField, val, formRef, typ
const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken()) const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken())
window.open(src.value + '&asn_number=' + res) window.open(src.value + '&asn_number=' + res)
} }
}).catch(err => { })
.catch((err) => {
console.log(err) console.log(err)
message.error('创建标签失败') message.error('创建标签失败')
}) })
} }
const getDefaultWorkshopCode = async () => { const getDefaultWorkshopCode = async () => {
let res = await WorkshopApi.getWorkshopPage({ const data = await ConfigApi.getConfigPage({
available: "TRUE" 'key':'predictProductreceiptWorkshopCode',
'pageNo':1,
'pageSize':10
}) })
if(res&&res.list.length>0){ if(data&&data.list&&data.list.length>0){
if(res.list.find(item=>item.code=='PRC')){ ProductreceiptRequestMain.allSchemas.formSchema.map((itemColumns) => {
ProductreceiptRequestMain.allSchemas.formSchema.map(itemColumns => {
if (itemColumns.field == 'workshopCode') { if (itemColumns.field == 'workshopCode') {
itemColumns.value = 'PRC' itemColumns.value = data.list[0]['value']
} }
}) })
} }
} }
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getDefaultWorkshopCode() getDefaultWorkshopCode()

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

@ -661,14 +661,14 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
width: 150 width: 150
}, },
tableForm: { tableForm: {
multiple: true, enterSearch: true,
disabled:true, isInpuFocusShow: true,
// isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码', searchListPlaceholder: '请选择工位代码',
searchField: 'code', searchField: 'code',
searchTitle: '工位信息', searchTitle: '工位信息',
searchAllSchemas: Workstation.allSchemas, searchAllSchemas: Workstation.allSchemas,
searchPage: WorkstationApi.getWorkstationPage, searchPage: WorkstationApi.getWorkstationPage,
searchCondition: [{ searchCondition: [{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
@ -679,8 +679,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
message: '请填写生产线代码!', message: '请填写生产线代码!',
isMainValue: true isMainValue: true
}], }],
verificationPage: WorkstationApi.getWorkstationByCodes, // 校验数去焦点输入是否正确的方法 isRepeat: true,//tableForm下方输入框是否可以重复添加该条数据
isShowTableFormSearch: true,
verificationParams: [{ verificationParams: [{
key: 'code', key: 'code',
action: '==', action: '==',
@ -694,7 +693,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
enterSearch: true, enterSearch: true,
isSearchList: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码', searchListPlaceholder: '请选择工位代码',
searchField: 'code', searchField: 'code',
searchTitle: '工位信息', searchTitle: '工位信息',
@ -741,6 +740,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}], }],
isRepeat: true,//tableForm下方输入框是否可以重复添加该条数据
verificationParams: [{ verificationParams: [{
key: 'code', key: 'code',
action: '==', action: '==',
@ -909,7 +909,9 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
}, },
tableForm: { tableForm: {
// enterSearch:true, // enterSearch:true,
isInpuFocusShow: true, disabled: true,
multiple: true,
isInpuFocusShow: false,
searchListPlaceholder: '请选择物料代码', searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode', searchField: 'itemCode',
searchTitle: '生产线物料关系信息', searchTitle: '生产线物料关系信息',
@ -925,6 +927,9 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
message: '请填写生产线代码!', message: '请填写生产线代码!',
isMainValue: true isMainValue: true
}], }],
verificationPage: ProductionlineitemApi.getProductionLineCodelistByCodes, // 校验数去焦点输入是否正确的方法
isShowTableFormSearch: true,
verificationParams: [{ verificationParams: [{
key: 'itemCode', key: 'itemCode',
action: '==', action: '==',

13
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue

@ -236,6 +236,7 @@ const butttondata = (row,$index) => {
defaultButtons.mainInspectRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createInspectRequest',hide:row.inspectRequestFlag == "FALSE" }),// defaultButtons.mainInspectRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createInspectRequest',hide:row.inspectRequestFlag == "FALSE" }),//
defaultButtons.mainPutawayRequestCpBtn({hasPermi:'wms:purchasereceipt-record-main:createPutawayRequest',hide:row.putawayRequestFlag == "FALSE" }),// defaultButtons.mainPutawayRequestCpBtn({hasPermi:'wms:purchasereceipt-record-main:createPutawayRequest',hide:row.putawayRequestFlag == "FALSE" }),//
defaultButtons.mainListPointBtn(null), // defaultButtons.mainListPointBtn(null), //
defaultButtons.mainListRecoveryBtn(null), //
] ]
} }
@ -247,6 +248,8 @@ const buttonTableClick = async (val, row) => {
handleCreateInspectRequest(row.number) handleCreateInspectRequest(row.number)
}else if (val == 'putawayRequest') { // }else if (val == 'putawayRequest') { //
handleCreatePutawayRequest(row.number) handleCreatePutawayRequest(row.number)
} else if (val == 'recovery') { //
labelRecovery(row)
} }
} }
/** 生成到货检验申请按钮操作 */ /** 生成到货检验申请按钮操作 */
@ -274,6 +277,16 @@ const handleCreatePutawayRequest = async (number:string) => {
tableObject.loading = false tableObject.loading = false
} }
} }
const labelRecovery = async (row) => {
try {
await message.confirm(t('ts.确认撤销报工吗?'))
let resType = await ProductreceiptRecordMainApi.handleRecoveryProductreceiptRecord(row)
message.success(t('ts.确认撤销报工成功'))
} catch {
} finally {
tableObject.loading = false
}
}
const searchTableRef = ref() const searchTableRef = ref()
const labelType = ref('') // const labelType = ref('') //

72
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue

@ -43,7 +43,7 @@
<BasicForm <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true" :isOpenSearchTable="true"
fieldTableColumn="workStationCode" fieldTableColumn="itemCode"
@success="getList" @success="getList"
:rules="ProductreceiptRequestMainRules" :rules="ProductreceiptRequestMainRules"
:formAllSchemas="ProductreceiptRequestMain.allSchemas" :formAllSchemas="ProductreceiptRequestMain.allSchemas"
@ -152,6 +152,7 @@ import { getJmreportBaseUrl } from '@/utils/systemParam'
import * as BomApi from "@/api/wms/bom"; import * as BomApi from "@/api/wms/bom";
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
import * as WorkshopApi from '@/api/wms/workshop' import * as WorkshopApi from '@/api/wms/workshop'
import * as ConfigApi from '@/api/infra/config'
// //
defineOptions({ name: 'ProductreceiptRequestMainA' }) defineOptions({ name: 'ProductreceiptRequestMainA' })
@ -217,32 +218,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
message.warning(`物料${val[0]['itemCode']}已经存在`) message.warning(`物料${val[0]['itemCode']}已经存在`)
return return
} }
row['uom'] = val[0]['uom'] const index1 = 0
row['produceDate'] = dayjs().valueOf() setTableFormsValues(val, index1)
row[formField] = val[0][searchField]
// BOM
const param1 = {
productItemCode: val[0]['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC',
}
BomApi.getBomPage(param1).then(res => {
console.log(res)
if(res?.list?.length>0){
row['bomVersion'] = res.list[0].version
}
})
}else if (formField == 'workStationCode') {
//
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow[formField] = item[searchField]
newRow.batch = formatTime(new Date(), 'yyyyMMdd')
tableData.value.push(newRow)
})
} else{ } else{
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
} }
@ -261,6 +238,33 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} }
}) })
} }
const setTableFormsValues = async (val, index1) => {
if (index1 <= val.length - 1) {
const newRow = JSON.parse(JSON.stringify({ ...tableFormKeys, ...val[index1] }))
newRow['itemCode'] = val[index1]['itemCode']
newRow['uom'] = val[0]['uom']
newRow['produceDate'] = dayjs().valueOf()
const param1 = {
productItemCode: val[0]['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC'
}
await BomApi.getBomPage(param1).then((res) => {
console.log(res)
if (res?.list?.length > 0) {
newRow['bomVersion'] = res.list[0].version
}
})
tableData.value.push(newRow)
console.log(tableData.value)
index1++
setTableFormsValues(val, index1)
}
}
// //
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => { nextTick(() => {
@ -811,19 +815,19 @@ const searchTableSuccess1 = async (formField, searchField, val, formRef, type, r
}) })
} }
const getDefaultWorkshopCode = async () => { const getDefaultWorkshopCode = async () => {
let res = await WorkshopApi.getWorkshopPage({ const data = await ConfigApi.getConfigPage({
available: "TRUE" 'key':'assembleProductreceiptWorkshopCode',
'pageNo':1,
'pageSize':10
}) })
if(res&&res.list.length>0){ if(data&&data.list&&data.list.length>0){
if(res.list.find(item=>item.code=='PRC')){ ProductreceiptRequestMain.allSchemas.formSchema.map((itemColumns) => {
ProductreceiptRequestMain.allSchemas.formSchema.map(itemColumns => {
if (itemColumns.field == 'workshopCode') { if (itemColumns.field == 'workshopCode') {
itemColumns.value = 'PRA' itemColumns.value = data.list[0]['value']
} }
}) })
} }
} }
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getDefaultWorkshopCode() getDefaultWorkshopCode()

24
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts

@ -671,14 +671,14 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
width: 150 width: 150
}, },
tableForm: { tableForm: {
multiple: true, enterSearch: true,
disabled:true, isInpuFocusShow: true,
// isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码', searchListPlaceholder: '请选择工位代码',
searchField: 'code', searchField: 'code',
searchTitle: '工位信息', searchTitle: '工位信息',
searchAllSchemas: Workstation.allSchemas, searchAllSchemas: Workstation.allSchemas,
searchPage: WorkstationApi.getWorkstationPage, searchPage: WorkstationApi.getWorkstationPage,
searchCondition: [{ searchCondition: [{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
@ -689,8 +689,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
message: '请填写生产线代码!', message: '请填写生产线代码!',
isMainValue: true isMainValue: true
}], }],
verificationPage: WorkstationApi.getWorkstationByCodes, // 校验数去焦点输入是否正确的方法 isRepeat: true,//tableForm下方输入框是否可以重复添加该条数据
isShowTableFormSearch: true,
verificationParams: [{ verificationParams: [{
key: 'code', key: 'code',
action: '==', action: '==',
@ -703,7 +702,8 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
isSearchList: true, enterSearch: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码', searchListPlaceholder: '请选择工位代码',
searchField: 'code', searchField: 'code',
searchTitle: '工位信息', searchTitle: '工位信息',
@ -750,6 +750,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}], }],
isRepeat: true,//tableForm下方输入框是否可以重复添加该条数据
verificationParams: [{ verificationParams: [{
key: 'code', key: 'code',
action: '==', action: '==',
@ -760,9 +761,9 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
}], // 失去焦点校验参数 }], // 失去焦点校验参数
}, },
form: { form: {
enterSearch: true,
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
enterSearch: true,
isSearchList: true, isSearchList: true,
searchListPlaceholder: '请选择工序代码', searchListPlaceholder: '请选择工序代码',
searchField: 'code', searchField: 'code',
@ -912,13 +913,15 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
label: '物料代码', label: '物料代码',
field: 'itemCode', field: 'itemCode',
sort: 'custom', sort: 'custom',
sortTableDefault: 1003,
table: { table: {
width: 150 width: 150
}, },
sortTableDefault:1003,
tableForm: { tableForm: {
// enterSearch:true, // enterSearch:true,
isInpuFocusShow: true, disabled: true,
multiple: true,
isInpuFocusShow: false,
searchListPlaceholder: '请选择物料代码', searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode', searchField: 'itemCode',
searchTitle: '生产线物料关系信息', searchTitle: '生产线物料关系信息',
@ -934,6 +937,9 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
message: '请填写生产线代码!', message: '请填写生产线代码!',
isMainValue: true isMainValue: true
}], }],
verificationPage: ProductionlineitemApi.getProductionLineCodelistByCodes, // 校验数去焦点输入是否正确的方法
isShowTableFormSearch: true,
verificationParams: [{ verificationParams: [{
key: 'itemCode', key: 'itemCode',
action: '==', action: '==',

29
src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue

@ -59,7 +59,21 @@
@tableSelectionDelete="tableSelectionDelete" @tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
@submitForm="submitForm" @submitForm="submitForm"
>
<template v-slot="{ row }">
<el-date-picker
v-bind:modelValue="
row['expireTime']
? addDay(row['produceDate'], row['expireTime'])
: dayjs('2099-12-31').valueOf()
"
:clearable="true"
style="width: 100%"
:disabled="true"
:placeholder="t('ts.选择日期')"
/> />
</template>
</BasicForm>
<!-- 详情 --> <!-- 详情 -->
<Detail <Detail
@ -142,9 +156,12 @@ import {
} from '../../../purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts' } from '../../../purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts'
import { getJmreportBaseUrl } from '@/utils/systemParam' import { getJmreportBaseUrl } from '@/utils/systemParam'
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
import dayjs from 'dayjs'
import { addDay } from '@/utils/formatTime'
// //
// //
//
defineOptions({ name: 'ProductreceiptRequestMain' }) defineOptions({ name: 'ProductreceiptRequestMain' })
const message = useMessage() // const message = useMessage() //
@ -221,6 +238,12 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro
row['bomVersion'] = res.list[0].version row['bomVersion'] = res.list[0].version
} }
}) })
//
row['produceDate'] = dayjs().valueOf()
if(res.length>0){
row['expireTime'] = res[0]['expireTime']
}
}else if(formField == 'workStationCode'){ }else if(formField == 'workStationCode'){
// //
val.forEach(item=>{ val.forEach(item=>{
@ -595,7 +618,13 @@ const submitForm = async (formType, submitData) => {
if(data.masterId){ if(data.masterId){
data.id = data.masterId data.id = data.masterId
} }
data.subList = tableData.value // data.subList = tableData.value //
tableData.value.forEach((row, index) => {
row['expireDate'] = row['expireTime']
? addDay(row['produceDate'], row['expireTime']).valueOf()
: dayjs('2099-12-31').valueOf()
})
if(data.subList.find(item => (item.qty <= 0))) { if(data.subList.find(item => (item.qty <= 0))) {
message.warning('数量必须大于0') message.warning('数量必须大于0')
return return

3
src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/productreceiptscrapRequestMain.data.ts

@ -1238,7 +1238,8 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
width: 180 width: 180
}, },
tableForm: { tableForm: {
type: 'FormDate', type: 'slot',
disabled: true,
valueFormat: 'x', valueFormat: 'x',
}, },
form: { form: {

2
src/views/wms/productionManage/productredress/productredressRecordMain/productredressRecordMain.data.ts

@ -57,7 +57,7 @@ export const ProductredressRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
{ {
label: '生产线代码', label: '生产线代码',
field: 'productionLineCode', field: 'productionlineCode',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150

1
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordRefuseMain/purchasereceiptRecordMain.data.ts

@ -145,6 +145,7 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '运输方式', label: '运输方式',
field: 'transferMode', field: 'transferMode',
dictType: DICT_TYPE.TRANSFER_MODE,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150

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

@ -534,6 +534,10 @@ const getSearchTableData = async (number,isEnter=false)=>{
item.width = item.table?.width || 150 item.width = item.table?.width || 150
}) })
tableData.value = [] tableData.value = []
if(tableObject.tableList.length==0){
message.error(`此订单${number}已存在M类型申请的数据`)
return
}
updateTableData(tableObject.tableList) updateTableData(tableObject.tableList)
const itemCodes = [] const itemCodes = []
tableObject.tableList.forEach(row=>{ tableObject.tableList.forEach(row=>{

1
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/purchasereturnJobMain.data.ts

@ -140,6 +140,7 @@ export const PurchasereturnJobMain = useCrudSchemas(
{ {
label: '运输方式', label: '运输方式',
field: 'transferMode', field: 'transferMode',
dictType: DICT_TYPE.TRANSFER_MODE,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150

2
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/purchasereturnRecordMain.data.ts

@ -431,7 +431,7 @@ export const PurchasereturnRecordMain = useCrudSchemas(
table: { table: {
width: 150 width: 150
}, },
isTable: false isTable: true
}, },
{ {
label: '操作', label: '操作',

1
src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/sparereceiptJobMain.data.ts

@ -92,6 +92,7 @@ export const PurchasereceiptJobMain = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '运输方式', label: '运输方式',
field: 'transferMode', field: 'transferMode',
dictType: DICT_TYPE.TRANSFER_MODE,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150

1
src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/sparereceiptRecordMain.data.ts

@ -108,6 +108,7 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '运输方式', label: '运输方式',
field: 'transferMode', field: 'transferMode',
dictType: DICT_TYPE.TRANSFER_MODE,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150

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

@ -527,26 +527,7 @@ export const PurchasePlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '送达日期',
field: 'deliveryDate',
table: {
width: 180
},
formatter: dateFormatter2,
sortTableDefault:2,
form: {
component: 'DatePicker',
componentProps: {
type: 'date',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
},
detail: {
dateFormat: 'YYYY-MM-DD'
},
},
{ {
label: '采购订单号', label: '采购订单号',
field: 'poNumber', field: 'poNumber',

12
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/labelForm.vue

@ -510,12 +510,12 @@ const blurOne = (oneRow, twoRow) => {
if (!twoRow.xNumber) { if (!twoRow.xNumber) {
twoRow.qtyOne = '' twoRow.qtyOne = ''
} }
// if (parseFloat(twoRow.xNumber) > parseFloat(oneRow.otherNumber)) { if (parseFloat(twoRow.xNumber) > parseFloat(oneRow.otherNumber)) {
// message.warning('' + oneRow.otherNumber + '') message.warning('每托箱个数最多' + oneRow.otherNumber + '箱')
// twoRow.xNumber = oneRow.otherNumber twoRow.xNumber = oneRow.otherNumber
// twoRow.children = [] twoRow.children = []
// twoRow.qtyOne = parseFloat(twoRow.xNumber) * parseFloat(oneRow.packQty) twoRow.qtyOne = parseFloat(twoRow.xNumber) * parseFloat(oneRow.packQty)
// } }
twoRow.qtyOne = parseFloat(twoRow.xNumber) twoRow.qtyOne = parseFloat(twoRow.xNumber)
? accuracyFun.multiply(parseFloat(twoRow.xNumber), parseFloat(oneRow.packQty)) ? accuracyFun.multiply(parseFloat(twoRow.xNumber), parseFloat(oneRow.packQty))
: '' : ''

18
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts

@ -12,6 +12,22 @@ import * as ItemPackageApi from '@/api/wms/itempackage/index'
import {validateInteger} from '@/utils/validator' import {validateInteger} from '@/utils/validator'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
const PurchasePlanDetailSchemas = {...PurchasePlanDetail.allSchemas}
if(PurchasePlanDetailSchemas?.tableColumns){
PurchasePlanDetailSchemas.tableColumns.splice(2, 0, {
label: '送达日期',
field: 'deliveryDate',
table: {
width: 180
},
width: 180,
formatter: dateFormatter2,
sortTableDefault:2
});
}
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
const queryParams = { const queryParams = {
pageSize: 10, pageSize: 10,
@ -107,7 +123,7 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
searchListPlaceholder: '请选择要货计划单号', // 输入框占位文本 searchListPlaceholder: '请选择要货计划单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段 searchField: 'number', // 查询弹窗赋值字段
searchTitle: '要货计划信息', // 查询弹窗标题 searchTitle: '要货计划信息', // 查询弹窗标题
searchAllSchemas: PurchasePlanDetail.allSchemas, // 查询弹窗所需类 searchAllSchemas: PurchasePlanDetailSchemas, // 查询弹窗所需类
searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPage, // 查询弹窗所需分页方法 searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPage, // 查询弹窗所需分页方法
searchCondition: [ searchCondition: [
{ {

8
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts

@ -1102,7 +1102,7 @@ export const SupplierinvoiceRecordDetailMain = useCrudSchemas(reactive<CrudSchem
isForm: false, isForm: false,
isTable: false, isTable: false,
isSearch: false, isSearch: false,
isDetail: true, isDetail: false,
}, },
{ {
label: '财务审批时间', label: '财务审批时间',
@ -1137,7 +1137,7 @@ export const SupplierinvoiceRecordDetailMain = useCrudSchemas(reactive<CrudSchem
isForm: false, isForm: false,
isTable: false, isTable: false,
isSearch: false, isSearch: false,
isDetail: true, isDetail: false,
}, },
{ {
label: '财务过账日期', label: '财务过账日期',
@ -1170,7 +1170,7 @@ export const SupplierinvoiceRecordDetailMain = useCrudSchemas(reactive<CrudSchem
isForm: false, isForm: false,
isTable: false, isTable: false,
isSearch: false, isSearch: false,
isDetail: true, isDetail: false,
}, },
{ {
label: '备注', label: '备注',
@ -1205,7 +1205,7 @@ export const SupplierinvoiceRecordDetailMain = useCrudSchemas(reactive<CrudSchem
isForm: false, isForm: false,
isTable: false, isTable: false,
isSearch: false, isSearch: false,
isDetail: true, isDetail: false,
}, },
// { // {
// label: '创建时间', // label: '创建时间',

8
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

@ -1408,7 +1408,7 @@ export const SupplierinvoiceRequestDetailMain = useCrudSchemas(reactive<CrudSche
isForm: false, isForm: false,
isTable: false, isTable: false,
isSearch: false, isSearch: false,
isDetail: true, isDetail: false,
}, },
{ {
label: '财务审批时间', label: '财务审批时间',
@ -1443,7 +1443,7 @@ export const SupplierinvoiceRequestDetailMain = useCrudSchemas(reactive<CrudSche
isForm: false, isForm: false,
isTable: false, isTable: false,
isSearch: false, isSearch: false,
isDetail: true, isDetail: false,
}, },
{ {
label: '财务过账日期', label: '财务过账日期',
@ -1476,7 +1476,7 @@ export const SupplierinvoiceRequestDetailMain = useCrudSchemas(reactive<CrudSche
isForm: false, isForm: false,
isTable: false, isTable: false,
isSearch: false, isSearch: false,
isDetail: true, isDetail: false,
}, },
{ {
label: '备注', label: '备注',
@ -1510,7 +1510,7 @@ export const SupplierinvoiceRequestDetailMain = useCrudSchemas(reactive<CrudSche
isForm: false, isForm: false,
isTable: false, isTable: false,
isSearch: false, isSearch: false,
isDetail: true, isDetail: false,
}, },

8
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/supplierinvoiceRequestMainDifference.data.ts

@ -1423,7 +1423,7 @@ export const SupplierinvoiceRequestDetailMain = useCrudSchemas(reactive<CrudSche
isForm: false, isForm: false,
isTable: false, isTable: false,
isSearch: false, isSearch: false,
isDetail: true, isDetail: false,
}, },
{ {
label: '财务审批时间', label: '财务审批时间',
@ -1458,7 +1458,7 @@ export const SupplierinvoiceRequestDetailMain = useCrudSchemas(reactive<CrudSche
isForm: false, isForm: false,
isTable: false, isTable: false,
isSearch: false, isSearch: false,
isDetail: true, isDetail: false,
}, },
{ {
label: '财务过账日期', label: '财务过账日期',
@ -1491,7 +1491,7 @@ export const SupplierinvoiceRequestDetailMain = useCrudSchemas(reactive<CrudSche
isForm: false, isForm: false,
isTable: false, isTable: false,
isSearch: false, isSearch: false,
isDetail: true, isDetail: false,
}, },
{ {
label: '备注', label: '备注',
@ -1526,7 +1526,7 @@ export const SupplierinvoiceRequestDetailMain = useCrudSchemas(reactive<CrudSche
isForm: false, isForm: false,
isTable: false, isTable: false,
isSearch: false, isSearch: false,
isDetail: true, isDetail: false,
}, },
// { // {
// label: '创建时间', // label: '创建时间',

Loading…
Cancel
Save