Browse Source

Merge branch 'intex' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-ui into intex

intex_online20250327
songguoqiang 3 weeks ago
parent
commit
10cb5686bb
  1. 11
      src/api/wms/modelDeliTime/index.ts
  2. 2
      src/utils/dict.ts
  3. 36
      src/views/wms/basicDataManage/supplierManage/modelDeliTime/index.vue
  4. 63
      src/views/wms/basicDataManage/supplierManage/modelDeliTime/modelDeliTime.data.ts
  5. 6
      src/views/wms/countManage/count/countConfig/countConfig.data.ts
  6. 24
      src/views/wms/countManage/count/countConfig/index.vue
  7. 4
      src/views/wms/supplierManage/supplierDeliMain/index.vue

11
src/api/wms/modelDeliTime/index.ts

@ -52,6 +52,13 @@ export const importTemplate = () => {
return request.download({ url: '/wms/model-deli-time-detail/get-import-template' }) return request.download({ url: '/wms/model-deli-time-detail/get-import-template' })
} }
// 查询受入号 // 查询受入号
export const getSupplierAddrList = async () => { export const getSupplierAddrList = async (params) => {
return await request.get({ url: `/wms/itembasic/getModel` }) if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/itembasic/getModelSenior', data })
} else {
return await request.get({ url: `/wms/itembasic/getModel`, params})
}
} }

2
src/utils/dict.ts

@ -427,5 +427,5 @@ export enum DICT_TYPE {
ISSUE_SOURCE="issue_source",//发料来源 ISSUE_SOURCE="issue_source",//发料来源
ISSUE_PLAN_TRIAL_RESULT="issue_plan_trial_result",//备料计划试算结果 ISSUE_PLAN_TRIAL_RESULT="issue_plan_trial_result",//备料计划试算结果
COUNT_MODE = "count_mode",//盘点模式(1:PAD盘点,2:Excel导入) COUNT_MODE = "count_mode",//盘点模式(1:PAD盘点,2:Excel导入)
INVENTORY_MODE = "inventory_mode",
} }

36
src/views/wms/basicDataManage/supplierManage/modelDeliTime/index.vue

@ -119,7 +119,7 @@ routeName.value = route.name
const tableColumns = ref(ModelDeliTime.allSchemas.tableColumns) const tableColumns = ref(ModelDeliTime.allSchemas.tableColumns)
const detailAllSchemas = ref(ModelDeliTimeDetail.allSchemas) const detailAllSchemas = ref(ModelDeliTimeDetail.allSchemas)
// //
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(async() => { nextTick(async() => {
if (formField == 'code') { if (formField == 'code') {
let codes = val.filter((item) => let codes = val.filter((item) =>
@ -146,24 +146,27 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
tableData.value.push(tfk) tableData.value.push(tfk)
}) })
} }
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
if (formField == 'supplierCode') { if (formField == 'modelShow') {
setV['modelShow'] = val.map(item=>item.model).join(',')
}
if (formField == 'supplierCode') {
setV['supplierCode'] = val[0].code setV['supplierCode'] = val[0].code
setV['supplierName'] = val[0].name setV['supplierName'] = val[0].name
console.log(ModelDeliTime.allSchemas.formSchema) console.log(ModelDeliTime.allSchemas.formSchema)
const options = await ModelDeliTimeDetailApi.getSupplierAddrList(val[0].code) // const options = await ModelDeliTimeDetailApi.getSupplierAddrList(val[0].code)
ModelDeliTime.allSchemas.formSchema.forEach(item => { // ModelDeliTime.allSchemas.formSchema.forEach(item => {
if(item.field == 'modelShow'){ // if(item.field == 'modelShow'){
item.componentProps.options = options.map(item=> { // item.componentProps.options = options.map(item=> {
return { // return {
label: item, // label: item,
value:item // value:item
} // }
}) // })
} // }
}) // })
} }
formRef.setValues(setV) formRef.setValues(setV)
}) })
@ -179,7 +182,8 @@ const submitForm = async (formType, submitData) => {
if (data.masterId) { if (data.masterId) {
data.id = data.masterId data.id = data.masterId
} }
data.model =data.modelShow.join(',') data.model =data.modelShow
// data.model =data.modelShow.join(',')
data.yearAndMonth =data.yearAndMonthShow.join(',') data.yearAndMonth =data.yearAndMonthShow.join(',')
data.subList = tableData.value // data.subList = tableData.value //
data.subList.forEach((item) => { data.subList.forEach((item) => {
@ -265,7 +269,7 @@ const HeadButttondata = [
// //
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
if (val == 'add') { // if (val == 'add') { //
getModelCode() // getModelCode()
openForm('create') openForm('create')
} else if (val == 'import') { // } else if (val == 'import') { //
handleImport() handleImport()

63
src/views/wms/basicDataManage/supplierManage/modelDeliTime/modelDeliTime.data.ts

@ -6,6 +6,8 @@ import { Supplier } from '../supplier/supplier.data'
import { DeliTimeWms } from '../DeliTimeWms/deliTimeWms.data' import { DeliTimeWms } from '../DeliTimeWms/deliTimeWms.data'
import * as DeliTimeWmsApi from '@/api/wms/deliTimeWms' import * as DeliTimeWmsApi from '@/api/wms/deliTimeWms'
import { fa } from 'element-plus/es/locale' import { fa } from 'element-plus/es/locale'
import * as modelDeliTimeApi from '@/api/wms/modelDeliTime'
// 表单校验 // 表单校验
export const ModelDeliTimeDetailRules = reactive({ export const ModelDeliTimeDetailRules = reactive({
@ -48,6 +50,15 @@ function getMonthArr() {
return dateArr; return dateArr;
} }
export const ModelList = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '受入号',
field: 'model',
sort: 'custom',
isSearch: true,
},
]))
export const ModelDeliTime = useCrudSchemas(reactive<CrudSchema[]>([ export const ModelDeliTime = useCrudSchemas(reactive<CrudSchema[]>([
// { // {
// label: '供应商代码', // label: '供应商代码',
@ -100,17 +111,48 @@ export const ModelDeliTime = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true, isSearch: true,
isTable: false, isTable: false,
isDetail: false, isDetail: false,
// form: {
// component: 'Select',
// componentProps: {
// multiple: true,
// collapseTags: true,
// collapseTagsTooltip: true,
// maxCollapseTags: "2",
// optionsAlias: {
// labelField: 'label',
// valueField: 'value'
// }
// }
// }
form: { form: {
component: 'Select', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
multiple: true, multiple:true,
collapseTags: true, disabled:true,
collapseTagsTooltip: true, enterSearch: false,
maxCollapseTags: "2", isSearchList: true, // 开启查询弹窗
optionsAlias: { searchListPlaceholder: '请选择受入号', // 输入框占位文本
labelField: 'label', searchField: 'model', // 查询弹窗赋值字段
valueField: 'value' searchTitle: '受入号', // 查询弹窗标题
} searchAllSchemas: ModelList.allSchemas, // 查询弹窗所需类
searchPage: modelDeliTimeApi.getSupplierAddrList, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
],
verificationParams: [
{
key: 'itemCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true
}
] // 失去焦点校验参数
} }
} }
}, },
@ -131,6 +173,7 @@ export const ModelDeliTime = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
component: 'Select', component: 'Select',
api: () => getMonthArr(), api: () => getMonthArr(),
value:[],
componentProps: { componentProps: {
multiple: true, multiple: true,
collapseTags: true, collapseTags: true,
@ -216,6 +259,8 @@ export const ModelDeliTime = useCrudSchemas(reactive<CrudSchema[]>([
} }
])) ]))
export const ModelDeliTimeDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const ModelDeliTimeDetail = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '编号', label: '编号',

6
src/views/wms/countManage/count/countConfig/countConfig.data.ts

@ -6,8 +6,8 @@ import * as ItembasicApi from '@/api/wms/itembasic'
// 表单校验 // 表单校验
export const CountConfigRules = reactive({ export const CountConfigRules = reactive({
itemCode: [required], itemCode: [required],
available: [required], countType: [required],
concurrencyStamp: [required], conversionRate: [required],
}) })
export const CountConfig = useCrudSchemas(reactive<CrudSchema[]>([ export const CountConfig = useCrudSchemas(reactive<CrudSchema[]>([
@ -117,6 +117,8 @@ export const CountConfig = useCrudSchemas(reactive<CrudSchema[]>([
label: '盘点模式', label: '盘点模式',
field: 'countType', field: 'countType',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.INVENTORY_MODE,
dictClass: 'string',
table: { table: {
width: 180 width: 180
}, },

24
src/views/wms/countManage/count/countConfig/index.vue

@ -54,7 +54,14 @@
<Detail ref="detailRef" :isBasic="true" :allSchemas="CountConfig.allSchemas" /> <Detail ref="detailRef" :isBasic="true" :allSchemas="CountConfig.allSchemas" />
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/count-config/import" :importTemplateData="importTemplateData" @success="importSuccess" /> <ImportForm ref="importFormRef"
url="/wms/count-config/import"
:importTemplateData="importTemplateData"
@success="importSuccess"
:updateIsDisable="true"
:appendIsDisable="true"
:mode="3"
/>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -158,6 +165,21 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */ /** 添加/修改操作 */
const basicFormRef = ref() const basicFormRef = ref()
const openForm = (type: string, row?: any) => { const openForm = (type: string, row?: any) => {
if(type=='create'){
CountConfig.allSchemas.formSchema.forEach(item =>{
if(item.field == "itemCode"){
item.componentProps.isSearchList = true
item.componentProps.disabled = false
}
})
} else if(type=='update'){
CountConfig.allSchemas.formSchema.forEach(item =>{
if(item.field == "itemCode"){
item.componentProps.isSearchList = false
item.componentProps.disabled = true
}
})
}
basicFormRef.value.open(type, row) basicFormRef.value.open(type, row)
} }

4
src/views/wms/supplierManage/supplierDeliMain/index.vue

@ -164,7 +164,9 @@ const { tableObject, tableMethods } = useTable({
// //
const { getList, setSearchParams } = tableMethods const { getList, setSearchParams } = tableMethods
const getListExecute = () => { const getListExecute = () => {
tableObject.params.yearAndMonth=formatDate(new Date(),'YYYY-MM') if(!tableObject.params.yearAndMonth){
tableObject.params.yearAndMonth=formatDate(new Date(),'YYYY-MM')
}
getList() getList()
tableObject.tableList.forEach(item=>item.isOpen = false) tableObject.tableList.forEach(item=>item.isOpen = false)
} }

Loading…
Cancel
Save