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) => {
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'" />
</template>
</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: '明细',
prop: 'TableForm'
},{
label: '汇总',
prop: 'CollectionTable'
}]" 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
ref="tableFormRef"
class="w-[100%]"
@ -123,7 +123,7 @@
</template>
</TableForm>
</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
:tableFields="tableAllSchemas.tableFormColumns"
:tableData="tableData"
@ -135,7 +135,7 @@
@handleDeleteTable="handleDeleteTable"
/>
</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
:tableFields="tableAllSchemas?tableAllSchemas.tableFormColumns:[]"
:tableData="tableData"
@ -369,7 +369,12 @@ const props = defineProps({
isCheckStrictly:{
type:Boolean,
default:false
}
},
// true ; false
includeCollectionTable:{
type:Boolean,
default:false
},
})
const { t } = useI18n() //

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

@ -16,7 +16,8 @@
outFile +
'&extend=' + extend +
'&fromInventoryStatus=' + fromInventoryStatus +
'&toInventoryStatus=' + toInventoryStatus
'&toInventoryStatus=' + toInventoryStatus +
dataType
"
:auto-upload="false"
:disabled="formLoading"
@ -229,6 +230,9 @@ const props = defineProps({
}
})
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 mode = ref(props.mode) //.1
const updateIsDisable = ref(props.updateIsDisable) //,

2
src/locales/en-US.ts

@ -1280,7 +1280,7 @@ export default {
:'Rule configuration',
:'Please enter a contact number',
:'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: ''
})
}
// 主列表-回收
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) {
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-form-item prop="password">
<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-col>
<el-col :span="24" style="padding-right: 10px; padding-left: 10px" v-if="needCode">
@ -173,6 +173,14 @@
// verify.value.show()
// }
// }
const passwordEnter = ()=>{
if(!needCode.value){
handleLogin()
return
}else{
getCode()
}
}
function getCode() {
if(!needCode.value){
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) => {
if (val.indexOf(row.isStaging) > -1) {
@ -283,7 +291,9 @@ const butttondata = (row) => {
hasPermi: 'qms:inspection-job-main:execute'
}), //
defaultButtons.mainListPackageBtn(null), //
defaultButtons.mainListPlanCheckQualityReportBtn({}) //
defaultButtons.mainListPlanCheckQualityReportBtn({
hide: isShowMainButton3(row)
}) //
]
}
const listTableRef = ref()

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

@ -74,12 +74,15 @@
import download from '@/utils/download'
import { Q1, Q1Rules } from './inspectionQ1.data'
import * as Q1Api from '@/api/qms/inspectionQ1'
import * as ItembasicApi from '@/api/wms/itembasic'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import * as StdcostpriceApi from '@/api/wms/stdcostprice'
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'
const userStore = useUserStore()
@ -99,28 +102,62 @@ const priceObj = ref()
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(async () => {
const setV = {}
if (formField == 'customerCode') {
setV['itemCode'] = ''
}
if (formField == 'itemCode') {
setV['customerCode'] = ''
setV['customerName'] = ''
setV['itemName'] = ''
setV['standardCostPrice'] = ''
setV['qty'] = ''
setV['claimAmount'] = ''
setV['uom'] = val[0]['customerUom']
console.log(333,val[0].code)
const params = {
by: "ASC",
filters: [{column: "itemCode", action: "==", value: val[0].itemCode}],
CustomeritemApi.getCustomerItemListByCodes({
itemCodes: val[0].itemCode,
customerCode: ''
}).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,
pageSize: 500,
sort: ""
sort: ''
}
params.isSearch = true
StdcostpriceApi.getStdcostpricePage(params).then((res) => {
paramsItembasic.isSearch = true
ItembasicApi.getItembasicPage(paramsItembasic).then((res) => {
if (res.list?.length > 0) {
priceObj.value = res.list[0]
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]
@ -130,7 +167,25 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
const onChange = (field, e) => {
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({
customerCode: [required],
costCode: [required],
itemCode: [required],
qty: [required],
code: [required],
priority: [required],
claimAmount: [required],
claimReason: [required],
claimTime: [required],
handleTime: [required]
itemCode: [{ required: true, message: '请选择物料代码', trigger: 'change' }],
customerCode: [{ required: true, message: '请选择客户代码', trigger: 'change' }],
qty: [{ required: true, message: '请输入数量', trigger: 'change' }],
claimAmount: [{ required: true, message: '请输入索赔金额', trigger: 'change' }],
code: [{ required: true, message: '请选择缺陷代码', trigger: 'change' }],
priority: [{ required: true, message: '请选择优先级', trigger: 'change' }],
costCode: [{ required: true, message: '请选择选择成本中心代码', trigger: 'change' }],
claimTime: [{ required: true, message: '请选择选择索赔日期', trigger: 'change' }],
handleTime: [{ required: true, message: '请选择选择处理时间', trigger: 'change' }],
claimReason: [{ required: true, message: '请选择选择索赔原因', trigger: 'change' }]
})
export const Q1 = useCrudSchemas(
@ -41,40 +41,23 @@ 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: '客户代码',
field: 'customerCode',
label: '物料代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择客户代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '客户信息', // 查询弹窗标题
searchAllSchemas: Customer.allSchemas, // 查询弹窗所需类
searchPage: CustomerApi.getCustomerPage, // 查询弹窗所需分页方法
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '客户物料信息', // 查询弹窗标题
searchAllSchemas: Customeritem.allSchemas, // 查询弹窗所需类
searchPage: CustomeritemApi.getCustomeritemPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
@ -84,7 +67,7 @@ export const Q1 = useCrudSchemas(
],
verificationParams: [
{
key: 'code',
key: 'itemCode',
action: '==',
value: '',
isMainValue: false,
@ -93,50 +76,59 @@ export const Q1 = useCrudSchemas(
}
] // 失去焦点校验参数
}
},
isSearch: true
}
},
{
label: '物料代码',
field: 'itemCode',
label: '物料名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
disabled: true
},
isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
searchTitle: '客户物料信息', // 查询弹窗标题
searchAllSchemas: Customeritem.allSchemas, // 查询弹窗所需类
searchPage: CustomeritemApi.getCustomeritemPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
disabled: true
}
}
},
{
key: 'customerCode',
value: 'customerCode',
message: '请填写客户代码!',
isMainValue: true
label: '客户代码',
field: 'customerCode',
sort: 'custom',
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: '编码',
field: 'code',
label: '标准成本价格',
field: 'standardCostPrice',
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'
}
width: 150
},
{
label: '负责用户',
field: 'responUser',
sort: 'custom',
isSearch: false,
isForm: false,
form: {
component: 'InputNumber',
componentProps: {
value: userStore.getUser.nickname,
min: 0,
precision: 6,
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: '成本中心代码',
@ -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: '处理时间',
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: '描述',
field: 'desc',
@ -392,8 +419,17 @@ export const Q1 = useCrudSchemas(
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
}
},
{
label: '创建者',
field: 'creator',
table: {
width: 130
},
isForm: false,
isTable: true
},
{
label: '操作',

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

@ -55,6 +55,7 @@
:apiCreate="Q2Api.createQ2"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
@onChange="onChange"
/>
<!-- 详情 -->
@ -77,7 +78,11 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import * as StdcostpriceApi from '@/api/wms/stdcostprice'
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'
const userStore = useUserStore()
@ -93,36 +98,125 @@ routeName.value = route.name
const tableColumns = ref(Q2.allSchemas.tableColumns)
//
const priceObj = ref()
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
nextTick(async () => {
const setV = {}
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') {
setV['uom'] = val[0]['supplierUom']
}
// if (formField == 'q1Number') {
// console.log(123)
// setV['q1Number'] = val[0]['number']
// }
if (formField == 'purchaseReceiptNumber') {
setV['wmsQty'] = val[0]['qty']
}
if (formField == 'q1Number') {
//Q1
let list = []
val.forEach((item) => {
list.push(item[searchField])
setV['SupplierCode'] = ''
setV['SupplierName'] = ''
setV['itemName'] = ''
setV['standardCostPrice'] = ''
setV['qty'] = ''
setV['claimAmount'] = ''
setV['uom'] = val[0].supplierUom
const supplieritemParams = {
by: 'ASC',
filters: [{ column: 'itemCode', action: '==', value: val[0].itemCode}],
pageNo: 1,
pageSize: 500,
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]
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) => {

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

@ -49,70 +49,14 @@ export const Q2 = useCrudSchemas(
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: '物料代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
table: {
width: 190
width: 150
},
isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
@ -124,12 +68,6 @@ export const Q2 = useCrudSchemas(
searchAllSchemas: Supplieritem.allSchemas, // 查询弹窗所需类
searchPage: SupplieritemApi.getSupplieritemPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'supplierCode',
value: 'supplierCode',
message: '请填写供应商代码!',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
@ -150,32 +88,51 @@ export const Q2 = useCrudSchemas(
}
},
{
label: '数量',
field: 'qty',
label: '物料名称',
field: 'itemName',
sort: 'custom',
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{
label: '供应商代码',
field: 'supplierCode',
sort: 'custom',
dictClass: 'string',
isSearch: false,
table: {
width: 150
isTable: true,
tableForm: {
disabled: true
},
form: {
component: 'InputNumber',
component: 'Select',
componentProps: {
min: 0,
precision: 2
options: [],
optionsAlias: {
labelField: 'supplierCode',
valueField: 'supplierCode'
},
filterable: true
}
}
},
{
label: '单位',
field: 'uom',
label: '供应商名称',
field: 'supplierName',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: false,
isTable: true,
tableForm: {
type: 'Select',
disabled: true
},
form: {
@ -188,7 +145,7 @@ export const Q2 = useCrudSchemas(
label: '采购收货单号',
field: 'purchaseReceiptNumber',
sort: 'custom',
isTable: false,
isTable: true,
table: {
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: '采购收货数量',
field: 'wmsQty',
label: '数量',
field: 'qty',
sort: 'custom',
isTable: true,
isSearch: false,
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 2
}
}
},
{
label: '单位',
field: 'uom',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
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,
isDetail: false
isSearch: false,
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 2
}
}
},
{
label: '编码',
label: '缺陷编码',
field: 'code',
sort: 'custom',
dictType: DICT_TYPE.QMS_Q2_CODE,
@ -254,7 +291,6 @@ export const Q2 = useCrudSchemas(
type: 'Select'
}
},
{
label: '优先级',
field: 'priority',
@ -268,26 +304,38 @@ export const Q2 = useCrudSchemas(
}
},
{
label: '负责用户',
field: 'responUser',
label: '其他索赔描述',
field: 'otherClaimDesc',
sort: 'custom',
isSearch: false,
isForm: true,
table: {
width: 120
width: '150'
},
form: {
component: 'Input',
componentProps: {}
}
},
{
label: '其他索赔金额',
field: 'otherclaimAmount',
sort: 'custom',
isSearch: false,
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
value: userStore.getUser.nickname,
disabled: true
min: 0,
precision: 6,
}
}
},
{
label: '索赔金额',
field: 'claimAmount',
label: '汇总金额',
field: 'summaryAmount',
sort: 'custom',
isTable: false,
isSearch: false,
table: {
width: 150
@ -296,7 +344,8 @@ export const Q2 = useCrudSchemas(
component: 'InputNumber',
componentProps: {
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通知单号',
field: 'q1Number',
@ -424,6 +430,62 @@ export const Q2 = useCrudSchemas(
},
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: '描述',
field: 'desc',
@ -478,6 +540,15 @@ export const Q2 = useCrudSchemas(
}
}
},
{
label: '创建者',
field: 'creator',
table: {
width: 130
},
isForm: false,
isTable: true
},
{
label: '操作',
field: 'action',

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

@ -54,8 +54,8 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="描述" prop="description">
<el-input v-model="data.description" placeholder="请填写描述" />
<el-form-item label="方案描述" prop="description">
<el-input v-model="data.description" placeholder="请填写方案描述" />
</el-form-item>
</el-col>
<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',
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: '创建者',
@ -173,7 +182,7 @@ export const AgvLocationrelation = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -196,7 +205,7 @@ export const AgvLocationrelation = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
table: {
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',
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: '创建者',

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',
sort: 'custom',
table: {

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

@ -525,11 +525,34 @@ export const Packageunit = useCrudSchemas(reactive<CrudSchema[]>([
label: '创建时间',
field: 'createTime',
sort: 'custom',
isDetail: true,
isSearch: true,
isForm: false,
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
formatter: dateFormatter,
isForm: false,
form: {
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: '创建者',

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

@ -222,6 +222,7 @@ export const MesBarCode = useCrudSchemas(reactive<CrudSchema[]>([
detail: {
dateFormat : 'YYYY-MM-DD HH:mm:ss'
},
isSearch: true,
form: {
component: 'DatePicker',
componentProps: {
@ -230,7 +231,15 @@ export const MesBarCode = useCrudSchemas(reactive<CrudSchema[]>([
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: '创建者',
@ -247,7 +256,7 @@ export const MesBarCode = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -270,7 +279,7 @@ export const MesBarCode = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
isTable: true,
table: {
width: 150
}

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

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

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

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

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

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

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

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

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

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

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

@ -16,7 +16,8 @@
<!-- 列表 -->
<ContentWrap>
<Table v-clientTable
<Table ref="tableRef" :selection="true"
v-clientTable
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
@ -26,6 +27,7 @@
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
@getSelectionRows="getSelectionRows"
>
<template #number="{row}">
<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 * as EquipmentInspectionRecordMainApi from "@/api/eam/equipmentInspectionRecordMain";
import { formatDate } from '@/utils/formatTime'
//
defineOptions({ name: 'package' })
const message = useMessage() //
@ -125,6 +127,7 @@ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:package:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'wms:package:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:package:export'}), //
defaultButtons.mainLisSelectiontPointBtn(null), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -148,6 +151,8 @@ const buttonBaseClick = (val, item) => {
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val=='selection_point'){//
handleSelectionPoint()
} else if (val == 'refresh') { //
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) {
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) => {
// if (val.indexOf(row.status) > -1) {
@ -305,28 +359,46 @@ const formsSuccess = async (formType,data) => {
const labelType = ref('') //
const handlePoint = async (row) => {
console.log(row.packingNumber,445555555555555);
PackageApi.getBalanceToPackage(row.number).then(res => {
console.log(777,res);
if (res.productionLineCode != null) {
labelType.value = 'zz'
} else {
labelType.value = 'cg'
PackageApi.batchPrintingLable([row.number]).then(res => {
console.log('批量打印res',res);
if(res.zzLabel){
//
const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken())
window.open(src.value+'&asn_number='+res.zzLabel)
}
PackageApi.batchPrintingLable((res.number)).then((resLable) =>{
console.log(159,resLable )
//
if (labelType.value == 'cg') {
if (res.cgLabel) {
//
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)
window.open(src.value+'&asn_number='+res.cgLabel)
}
if(!res.cgLabel&&!res.zzLabel){
message.warning('包装不存在,无法打印或者是线边物料数据不生成包装!')
}
})
}).catch(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 { dateFormatter } from '@/utils/formatTime'
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}
@ -26,6 +34,138 @@ export const ScrapJobMain = useCrudSchemas(
},
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通知单号',
field: 'q1Number',

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

@ -1,6 +1,14 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
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}
@ -35,6 +43,138 @@ export const ScrapRecordMain = useCrudSchemas(
},
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通知单号',
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]
}
} else {
console.log("报废出库主表")
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
if (formField == 'q1Number') {
ScrapRequestMain.allSchemas.formSchema.forEach((item) => {
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) => {
@ -240,7 +256,7 @@ const clearSearchInput = (field) => {
}
if (field == 'q3Number') {
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.isSearchList = true
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 { 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() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@ -53,6 +63,233 @@ export const ScrapRequestMain = useCrudSchemas(
isForm: false,
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通知单号',
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({
departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' }
],
orderNumber: [
{ validator: validateOrderNumber, trigger: 'change' }
],
autoCommit: [
{ required: true, message: '请选择是否自动提交', trigger: 'change' }
],
@ -579,7 +832,19 @@ export const ScrapRequestMainRules = reactive({
],
fromWarehouseCode:[
{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: {
width: 180
},
isSearch: true
isSearch: false
},
{
label: '申请时间',

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

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

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

@ -801,9 +801,63 @@ export const UnplannedreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[
isSearch: true,
isMainValue: false
},{
key: 'businessTypeCode',
value: 'UnplannedReceipt',
action: '==',
key: 'type',
value: 'ZZBZ',
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,
isMainValue: false
}

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

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

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

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

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

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

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

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

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

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

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

@ -734,10 +734,12 @@ const submitForm = async (formType, submitData) => {
if(flag){
return
}
data.dataType='1'
formRef.value.formLoading = true
await UnplannedreceiptRequestMainApi.createUnplannedreceiptRequestMain(data)
message.success(t('common.createSuccess'))
} else {
data.dataType='1'
formRef.value.formLoading = true
await UnplannedreceiptRequestMainApi.updateUnplannedreceiptRequestMain(data)
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 {
row['batch'] = '000000'
}
// HL-4885 @ @
// tableform
// TODO: tableFormColumns 10 20 20
ProductionreturnRequestDetail.allSchemas.tableFormColumns.map(item => {
if(item.field == 'qty' && val[0]['qty'] > 0) {
item.tableForm.max = val[0]['qty']
}
})
// ProductionreturnRequestDetail.allSchemas.tableFormColumns.map(item => {
// if(item.field == 'qty' && val[0]['qty'] > 0) {
// item.tableForm.max = val[0]['qty']
// }
// })
}
} else if(formField == 'workStationCode') {
//
@ -257,12 +258,13 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
} else {
setV['batch'] = '000000'
}
// HL-4885 @ @
// tableform
ProductionreturnRequestDetail.allSchemas.tableFormColumns.map(item => {
if(item.field == 'qty' && val[0]['qty'] > 0) {
item.tableForm.max = val[0]['qty']
}
})
// ProductionreturnRequestDetail.allSchemas.tableFormColumns.map(item => {
// if(item.field == 'qty' && val[0]['qty'] > 0) {
// item.tableForm.max = val[0]['qty']
// }
// })
}
} else if(formField == 'workStationCode') {
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['inventoryStatus'] = val[0]['inventoryStatus']
row['qty'] = Number(val[0]['qty'])
// HL-4885 @ @
// tableform
ProductionreturnRequestDetail.allSchemas.tableFormColumns.forEach(item => {
if(item.field == 'qty' && Number(val[0]['qty'])>item.tableForm.min) {
item.tableForm.max = Number(val[0]['qty'])
}
// if(item.field == 'batch') {
// item.tableForm.disabled = false
// ProductionreturnRequestDetail.allSchemas.tableFormColumns.forEach(item => {
// if(item.field == 'qty' && Number(val[0]['qty'])>item.tableForm.min) {
// item.tableForm.max = Number(val[0]['qty'])
// }
})
// // if(item.field == 'batch') {
// // item.tableForm.disabled = false
// // }
// })
}
} else if(formField == 'workStationCode') {
val.forEach(item=>{
@ -238,12 +239,13 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
setV['uom'] = val[0]['uom']
setV['inventoryStatus'] = val[0]['inventoryStatus']
setV['qty'] = val[0]['qty']
// HL-4885 @ @
// tableform
ProductionreturnRequestDetail.allSchemas.tableFormColumns.map(item => {
if(item.field == 'qty') {
item.tableForm.max = val[0]['qty']
}
})
// ProductionreturnRequestDetail.allSchemas.tableFormColumns.map(item => {
// if(item.field == 'qty') {
// item.tableForm.max = val[0]['qty']
// }
// })
}
} else if(formField == 'workStationCode') {
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: {
component: 'InputNumber',
componentProps: {
disabled:true,
min:0,
precision: 6
}
},
tableForm: {
disabled:true,
type: 'InputNumber',
min:0,
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))
}
//true0
const flag = ref()
//
const submitForm = async (formType, submitData) => {
@ -334,15 +333,20 @@ const submitForm = async (formType, submitData) => {
data.id = data.masterId
}
data.subList = tableData.value //
let flag = false
data.subList.forEach(item => {
item.toBatch = item.fromBatch
item.fromLocationCode = data.fromLocationCode
item.toLocationCode = data.toLocationCode
item.toInventoryStatus = data.toInventoryStatus
if(item.qty == 0){
message.error(`数量不能为0!`)
flag.value = true
if(item.checkQty>0&&Number(item.qty)==0){
message.error(`${item['itemCode']}数量不能为0!`)
flag = true
return;
}
if(item.checkQty>0&&item.qty<0){
message.error(`${item['itemCode']}数量不能小于0!`)
flag = true
return;
}
})
@ -351,7 +355,7 @@ const submitForm = async (formType, submitData) => {
message.warning('从库位和到库位不能相同')
return
}
if(flag.value){
if(flag){
formRef.value.formLoading = false
return
}
@ -387,6 +391,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
newRow['fromInventoryStatus'] = item['inventoryStatus']
newRow['origin_fromLocationCode'] = item['locationCode']
newRow['uom'] = item['uom']
newRow['checkQty'] = item['qty'] // HL-5524
newRow['qty'] = item['qty']
if(item['packingNumber']&&item['packingNumber'].length>0){
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: {
component: 'InputNumber',
componentProps: {
min: 0,
// min: 0,
precision: 6
}
},
tableForm: {
disabled: false,
type: 'InputNumber',
min: 0,
// min: 0,
precision: 6
}
},

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

@ -44,6 +44,7 @@
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="fromPackingNumber"
:includeCollectionTable="true"
@success="getList"
:rules="InventorymoveRequestMainRules"
:formAllSchemas="InventorymoveRequestMain.allSchemas"
@ -90,6 +91,7 @@ import * as InventorymoveRequestDetailApi from '@/api/wms/inventorymoveRequestDe
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as LocationApi from '@/api/wms/location'
import { formatDate } from '@/utils/formatTime'
import dayjs from 'dayjs'
//
defineOptions({ name: 'InventorymoveRequestMain' })
@ -615,6 +617,24 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */
const formRef = ref()
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 = [] //
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:{
multiple:true,
isInpuFocusShow: true, // 开启查询弹窗
disabled:true,
isInpuFocusShow: false, // 开启查询弹窗
searchListPlaceholder: '请选择从包装号',
searchField: 'packingNumber',
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({hide:row.inspectRequestFlag == "FALSE" }),//
defaultButtons.mainListPointBtn(null), //
defaultButtons.mainListRecoveryBtn(null), //
]
}
@ -207,8 +208,11 @@ const buttonTableClick = async (val, row) => {
handleCreateInspectRequest(row.number)
} else if (val == 'point') { //
labelPrint(row)
} else if (val == 'recovery') { //
labelRecovery(row)
}
}
const BASE_URL = getJmreportBaseUrl()
//
const searchTableRef = ref()
@ -241,6 +245,18 @@ const labelPrint = async (row) => {
})
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) => {
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,
isForm: false ,
table: {
width: 220,
width: 280,
fixed: 'right'
},
isTableForm:true,

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

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

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

@ -661,14 +661,14 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
width: 150
},
tableForm: {
multiple: true,
disabled:true,
// isInpuFocusShow: true,
enterSearch: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码',
searchField: 'code',
searchTitle: '工位信息',
searchAllSchemas: Workstation.allSchemas,
searchPage: WorkstationApi.getWorkstationPage,
searchCondition: [{
key: 'available',
value: 'TRUE',
@ -679,8 +679,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
message: '请填写生产线代码!',
isMainValue: true
}],
verificationPage: WorkstationApi.getWorkstationByCodes, // 校验数去焦点输入是否正确的方法
isShowTableFormSearch: true,
isRepeat: true,//tableForm下方输入框是否可以重复添加该条数据
verificationParams: [{
key: 'code',
action: '==',
@ -694,7 +693,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码',
searchField: 'code',
searchTitle: '工位信息',
@ -741,6 +740,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
value: 'TRUE',
isMainValue: false
}],
isRepeat: true,//tableForm下方输入框是否可以重复添加该条数据
verificationParams: [{
key: 'code',
action: '==',
@ -909,7 +909,9 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
},
tableForm: {
// enterSearch:true,
isInpuFocusShow: true,
disabled: true,
multiple: true,
isInpuFocusShow: false,
searchListPlaceholder: '请选择物料代码',
searchField: 'itemCode',
searchTitle: '生产线物料关系信息',
@ -925,6 +927,9 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
message: '请填写生产线代码!',
isMainValue: true
}],
verificationPage: ProductionlineitemApi.getProductionLineCodelistByCodes, // 校验数去焦点输入是否正确的方法
isShowTableFormSearch: true,
verificationParams: [{
key: 'itemCode',
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.mainPutawayRequestCpBtn({hasPermi:'wms:purchasereceipt-record-main:createPutawayRequest',hide:row.putawayRequestFlag == "FALSE" }),//
defaultButtons.mainListPointBtn(null), //
defaultButtons.mainListRecoveryBtn(null), //
]
}
@ -247,6 +248,8 @@ const buttonTableClick = async (val, row) => {
handleCreateInspectRequest(row.number)
}else if (val == 'putawayRequest') { //
handleCreatePutawayRequest(row.number)
} else if (val == 'recovery') { //
labelRecovery(row)
}
}
/** 生成到货检验申请按钮操作 */
@ -274,6 +277,16 @@ const handleCreatePutawayRequest = async (number:string) => {
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 labelType = ref('') //

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

@ -43,7 +43,7 @@
<BasicForm
ref="formRef"
:isOpenSearchTable="true"
fieldTableColumn="workStationCode"
fieldTableColumn="itemCode"
@success="getList"
:rules="ProductreceiptRequestMainRules"
:formAllSchemas="ProductreceiptRequestMain.allSchemas"
@ -152,6 +152,7 @@ import { getJmreportBaseUrl } from '@/utils/systemParam'
import * as BomApi from "@/api/wms/bom";
import { formatDate } from '@/utils/formatTime'
import * as WorkshopApi from '@/api/wms/workshop'
import * as ConfigApi from '@/api/infra/config'
//
defineOptions({ name: 'ProductreceiptRequestMainA' })
@ -217,32 +218,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
message.warning(`物料${val[0]['itemCode']}已经存在`)
return
}
row['uom'] = val[0]['uom']
row['produceDate'] = dayjs().valueOf()
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)
})
const index1 = 0
setTableFormsValues(val, index1)
} else{
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 ) => {
nextTick(() => {
@ -811,19 +815,19 @@ const searchTableSuccess1 = async (formField, searchField, val, formRef, type, r
})
}
const getDefaultWorkshopCode = async () => {
let res = await WorkshopApi.getWorkshopPage({
available: "TRUE"
const data = await ConfigApi.getConfigPage({
'key':'assembleProductreceiptWorkshopCode',
'pageNo':1,
'pageSize':10
})
if(res&&res.list.length>0){
if(res.list.find(item=>item.code=='PRC')){
ProductreceiptRequestMain.allSchemas.formSchema.map(itemColumns => {
if(data&&data.list&&data.list.length>0){
ProductreceiptRequestMain.allSchemas.formSchema.map((itemColumns) => {
if (itemColumns.field == 'workshopCode') {
itemColumns.value = 'PRA'
itemColumns.value = data.list[0]['value']
}
})
}
}
}
/** 初始化 **/
onMounted(async () => {
getDefaultWorkshopCode()

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

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

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

@ -59,7 +59,21 @@
@tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess"
@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
@ -142,9 +156,12 @@ import {
} from '../../../purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts'
import { getJmreportBaseUrl } from '@/utils/systemParam'
import { formatDate } from '@/utils/formatTime'
import dayjs from 'dayjs'
import { addDay } from '@/utils/formatTime'
//
//
//
defineOptions({ name: 'ProductreceiptRequestMain' })
const message = useMessage() //
@ -221,6 +238,12 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro
row['bomVersion'] = res.list[0].version
}
})
//
row['produceDate'] = dayjs().valueOf()
if(res.length>0){
row['expireTime'] = res[0]['expireTime']
}
}else if(formField == 'workStationCode'){
//
val.forEach(item=>{
@ -595,7 +618,13 @@ const submitForm = async (formType, submitData) => {
if(data.masterId){
data.id = data.masterId
}
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))) {
message.warning('数量必须大于0')
return

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

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

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

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

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

@ -145,6 +145,7 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '运输方式',
field: 'transferMode',
dictType: DICT_TYPE.TRANSFER_MODE,
sort: 'custom',
table: {
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
})
tableData.value = []
if(tableObject.tableList.length==0){
message.error(`此订单${number}已存在M类型申请的数据`)
return
}
updateTableData(tableObject.tableList)
const itemCodes = []
tableObject.tableList.forEach(row=>{

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

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

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

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

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

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

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

@ -108,6 +108,7 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '运输方式',
field: 'transferMode',
dictType: DICT_TYPE.TRANSFER_MODE,
sort: 'custom',
table: {
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: '采购订单号',
field: 'poNumber',

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

@ -510,12 +510,12 @@ const blurOne = (oneRow, twoRow) => {
if (!twoRow.xNumber) {
twoRow.qtyOne = ''
}
// if (parseFloat(twoRow.xNumber) > parseFloat(oneRow.otherNumber)) {
// message.warning('' + oneRow.otherNumber + '')
// twoRow.xNumber = oneRow.otherNumber
// twoRow.children = []
// twoRow.qtyOne = parseFloat(twoRow.xNumber) * parseFloat(oneRow.packQty)
// }
if (parseFloat(twoRow.xNumber) > parseFloat(oneRow.otherNumber)) {
message.warning('每托箱个数最多' + oneRow.otherNumber + '箱')
twoRow.xNumber = oneRow.otherNumber
twoRow.children = []
twoRow.qtyOne = parseFloat(twoRow.xNumber) * parseFloat(oneRow.packQty)
}
twoRow.qtyOne = parseFloat(twoRow.xNumber)
? 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'
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 = {
pageSize: 10,
@ -107,7 +123,7 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
searchListPlaceholder: '请选择要货计划单号', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
searchTitle: '要货计划信息', // 查询弹窗标题
searchAllSchemas: PurchasePlanDetail.allSchemas, // 查询弹窗所需类
searchAllSchemas: PurchasePlanDetailSchemas, // 查询弹窗所需类
searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPage, // 查询弹窗所需分页方法
searchCondition: [
{

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

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

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

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

Loading…
Cancel
Save