Browse Source

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

master_hella_20240701
zhaoxuebing 7 months ago
parent
commit
69b959e6f7
  1. 4
      .env.hella15
  2. 4
      .env.hella16
  3. 11
      src/api/wms/location/index.ts
  4. 2
      src/components/TableForm/src/TableForm.vue
  5. 3
      src/locales/en-US.ts
  6. 3
      src/locales/zh-CN.ts
  7. 1
      src/utils/dict.ts
  8. 21
      src/views/eam/basicInspectionOption/basicInspectionOption.data.ts
  9. 17
      src/views/mes/hrPersonAbility/hrPersonAbility.data.ts
  10. 10
      src/views/mes/hrPersonAbility/index.vue
  11. 10
      src/views/mes/opersteps/index.vue
  12. 5
      src/views/mes/opersteps/opersteps.data.ts
  13. 9
      src/views/mes/operstepsType/index.vue
  14. 6
      src/views/mes/orderDay/orderDay.data.ts
  15. 30
      src/views/mes/processroute/components/configDialog.vue
  16. 17
      src/views/mes/processroute/index.vue
  17. 16
      src/views/mes/processroute/processroute.data.ts
  18. 4
      src/views/mes/productBackline/index.vue
  19. 4
      src/views/mes/productOffline/index.vue
  20. 89
      src/views/mes/workScheduling/components/qualifiedCheck.vue
  21. 22
      src/views/wms/deliversettlementManage/saleShipmentMainRecord/index.vue
  22. 91
      src/views/wms/deliversettlementManage/saleShipmentMainRecord/saleShipmentMainRecord.data.ts
  23. 5
      src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue
  24. 13
      src/views/wms/deliversettlementManage/saleShipmentMainRequest/saleShipmentMain.data.ts
  25. 6
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts

4
.env.hella15

@ -4,10 +4,10 @@ NODE_ENV=production
VITE_DEV=false VITE_DEV=false
# 请求路径 # 请求路径
VITE_BASE_URL='https://172.21.32.15:55563/api' VITE_BASE_URL='https://scp.faway-hella.com/api'
# 上传路径 # 上传路径
VITE_UPLOAD_URL='https://172.21.32.15:55563/api/admin-api/infra/file/upload' VITE_UPLOAD_URL='https://scp.faway-hella.com/api/admin-api/infra/file/upload'
# 接口前缀 # 接口前缀
VITE_API_BASEPATH= VITE_API_BASEPATH=

4
.env.hella16

@ -4,10 +4,10 @@ NODE_ENV=production
VITE_DEV=false VITE_DEV=false
# 请求路径 # 请求路径
VITE_BASE_URL='https://172.21.32.16:55563/api' VITE_BASE_URL='https://scptest.faway-hella.com/api'
# 上传路径 # 上传路径
VITE_UPLOAD_URL='https://172.21.32.16:55563/api/admin-api/infra/file/upload' VITE_UPLOAD_URL='https://scptest.faway-hella.com/api/admin-api/infra/file/upload'
# 接口前缀 # 接口前缀
VITE_API_BASEPATH= VITE_API_BASEPATH=

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

@ -95,3 +95,14 @@ export const selectPageItemAreaToLocation = async (params) => {
return request.get({ url: `/wms/location/pageItemAreaToLocation`, params }) return request.get({ url: `/wms/location/pageItemAreaToLocation`, params })
} }
} }
export const selectConfigToLocation = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/location/pageConfigToLocationSenior', data })
} else {
return request.get({ url: `/wms/location/pageConfigToLocation`, params })
}
}

2
src/components/TableForm/src/TableForm.vue

@ -303,7 +303,7 @@
<div class="button flex" v-if="isShowButton"> <div class="button flex" v-if="isShowButton">
<div class="p-12px" @click="handleAddTable"> <div class="p-12px" @click="handleAddTable">
<Icon icon="ep:circle-plus" color="#409eff" size="26" style="cursor: pointer;" /> <Icon icon="ep:circle-plus" color="#409eff" size="26" style="cursor: pointer;" />
<div>添加明细</div> <div>{{t('ts.添加明细')}}</div>
</div> </div>
</div> </div>
</div> </div>

3
src/locales/en-US.ts

@ -1082,7 +1082,8 @@ export default {
:'Supplier approval time', :'Supplier approval time',
:'courier number', :'courier number',
:'Invoicing calendar management', :'Invoicing calendar management',
:'description' :'description',
:'Batch delete'

3
src/locales/zh-CN.ts

@ -1082,7 +1082,8 @@ export default {
:'供应商审批时间', :'供应商审批时间',
:'快递单号', :'快递单号',
:'开票日历管理', :'开票日历管理',
:'描述' :'描述',
:'批量删除'

1
src/utils/dict.ts

@ -340,5 +340,6 @@ export enum DICT_TYPE {
// ========== eam - 业务 - ========== // ========== eam - 业务 - ==========
DEVICE_TYPE = 'device_type', // 设备类型 DEVICE_TYPE = 'device_type', // 设备类型
IS_UPDATED = 'is_updated', //是否可修改
} }

21
src/views/eam/basicInspectionOption/basicInspectionOption.data.ts

@ -40,7 +40,13 @@ export const BasicInspectionOption = useCrudSchemas(reactive<CrudSchema[]>([
label: '项是否可修改', label: '项是否可修改',
field: 'isUpdated', field: 'isUpdated',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.IS_UPDATED,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
isTable: true,
isDetail: false,
isSearch: true, isSearch: true,
isTableForm: false,
isForm: true,
form: { form: {
component: 'Switch', component: 'Switch',
value: 'TRUE', value: 'TRUE',
@ -100,14 +106,13 @@ export const BasicInspectionOption = useCrudSchemas(reactive<CrudSchema[]>([
label: '是否可用', label: '是否可用',
field: 'available', field: 'available',
sort: 'custom', sort: 'custom',
form: { dictType: DICT_TYPE.TRUE_FALSE,
component: 'Switch', dictClass: 'string', // 默认都是字符串类型其他暂不考虑
value: 'TRUE', isTable: true,
componentProps: { isDetail: false,
inactiveValue: 'FALSE', isSearch: false,
activeValue: 'TRUE' isTableForm: false,
} isForm: false,
},
}, },
{ {
label: '删除时间', label: '删除时间',

17
src/views/mes/hrPersonAbility/hrPersonAbility.data.ts

@ -1,8 +1,9 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import * as AbilityInfoApi from '@/api/mes/abilityInfo' import * as AbilityInfoApi from '@/api/mes/abilityInfo'
import * as UserApi from "@/api/system/user";
import { AbilityInfo } from '../abilityInfo/abilityInfo.data' import { AbilityInfo } from '../abilityInfo/abilityInfo.data'
import {searchUser} from "@/views/wms/basicDataManage/orderManage/team/team.data";
// 表单校验 // 表单校验
export const HrPersonAbilityRules = reactive({ export const HrPersonAbilityRules = reactive({
@ -116,6 +117,20 @@ export const HrPersonAbility = useCrudSchemas(reactive<CrudSchema[]>([
field: 'personCode', field: 'personCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
form: {
componentProps: {
isSearchList: true, // 开启查询弹窗
searchTitle: '人员信息', // 查询弹窗标题
searchAllSchemas: searchUser.allSchemas, // 查询弹窗所需类
searchField: 'username', // 查询弹窗赋值字段
searchPage: UserApi.getUserPage, // 查询弹窗所需分页方法
searchCondition: [{
action: "==",
column: 'userType',
value: 'WORKER'
}]
}
}
}, },
{ {
label: '能力编号', label: '能力编号',

10
src/views/mes/hrPersonAbility/index.vue

@ -49,7 +49,7 @@
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
:isBusiness="false" :isBusiness="false"
/> />
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess" />
<!-- 详情 --> <!-- 详情 -->
<Detail ref="detailRef" :isBasic="false" :isBasicMes="true" :allSchemas="HrPersonAbility.allSchemas" :detailAllSchemas="HrPersonAbility.allSchemas" <Detail ref="detailRef" :isBasic="false" :isBasicMes="true" :allSchemas="HrPersonAbility.allSchemas" :detailAllSchemas="HrPersonAbility.allSchemas"
:apiPage="HrPersonAbilityApi.getHrPersonAbilityPage"/> :apiPage="HrPersonAbilityApi.getHrPersonAbilityPage"/>
@ -80,9 +80,17 @@ const tableColumns = ref(HrPersonAbility.allSchemas.tableColumns)
// //
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => { nextTick(() => {
if (formField === 'ablityCode') {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
formRef.setValues(setV) formRef.setValues(setV)
}
if (formField === 'personCode') {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
}) })
} }

10
src/views/mes/opersteps/index.vue

@ -149,6 +149,16 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */ /** 添加/修改操作 */
const basicFormRef = ref() const basicFormRef = ref()
const openForm = (type: string, row?: any) => { const openForm = (type: string, row?: any) => {
let disabledFlag = false
if(type==='update'){
disabledFlag = true
}
Opersteps.allSchemas.formSchema.forEach(item => {
if (item.field == 'stepsCode') {
item.componentProps.disabled =disabledFlag
}
})
basicFormRef.value.open(type, row)
basicFormRef.value.open(type, row) basicFormRef.value.open(type, row)
} }

5
src/views/mes/opersteps/opersteps.data.ts

@ -5,7 +5,10 @@ import { OperstepsType } from '../operstepsType/operstepsType.data'
// 表单校验 // 表单校验
export const OperstepsRules = reactive({ export const OperstepsRules = reactive({
concurrencyStamp: [required], //concurrencyStamp: [required],
stepsCode: [required],
stepsName: [required],
collectCode: [required],
}) })
export const Opersteps = useCrudSchemas(reactive<CrudSchema[]>([ export const Opersteps = useCrudSchemas(reactive<CrudSchema[]>([

9
src/views/mes/operstepsType/index.vue

@ -149,6 +149,15 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */ /** 添加/修改操作 */
const basicFormRef = ref() const basicFormRef = ref()
const openForm = (type: string, row?: any) => { const openForm = (type: string, row?: any) => {
let disabledFlag = false
if(type==='update'){
disabledFlag = true
}
OperstepsType.allSchemas.formSchema.forEach(item => {
if (item.field == 'collectCode') {
item.componentProps.disabled =disabledFlag
}
})
basicFormRef.value.open(type, row) basicFormRef.value.open(type, row)
} }

6
src/views/mes/orderDay/orderDay.data.ts

@ -8,9 +8,9 @@ import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/w
// 表单校验 // 表单校验
export const OrderDayRules = reactive({ export const OrderDayRules = reactive({
// batchCode: [ batchCode: [
// { required: false, message: '请输入一个日计划编号', trigger: 'blur' } { required: true, message: '请输入产品批次码', trigger: 'blur' }
// ], ],
// planNoMonth: [ // planNoMonth: [
// { required: true, message: '请输入一个月计划编号', trigger: 'blur' } // { required: true, message: '请输入一个月计划编号', trigger: 'blur' }
// ], // ],

30
src/views/mes/processroute/components/configDialog.vue

@ -42,7 +42,7 @@
<el-table-column prop="name" label="工序名称" /> <el-table-column prop="name" label="工序名称" />
<el-table-column prop="oper" label="操作" width="60"> <el-table-column prop="oper" label="操作" width="60">
<template #default="scope"> <template #default="scope">
<el-button size="mini" type="text" @click="deleteNode(scope.row)" <el-button size="mini" type="text" @click="deleteNode(scope.row,scope.$index)"
>移除</el-button >移除</el-button
> >
</template> </template>
@ -250,10 +250,16 @@ const searchTableSuccess = (formField, searchField, val, type, row) => {
}) })
} }
} }
const deleteNode=(row)=>{ const deleteNode=(row,index:number)=>{
processData.value.splice(processData.value.indexOf(row),1) //console.log('row------',index)
//showProcessNodeData.value.splice(index,1)
processData.value.splice((page.value.current-1)*page.value.size+index,1)
page.value.total=processData.value.length page.value.total=processData.value.length
page.value.current=1 page.value.current=1
showProcessNodeData.value=processData.value.slice(1,1+page.value.size);
//page.value.current=1
//showProcessNodeData.value=processData.value.slice((page.value.current-1)*page.value.size,page.value.size)
graph.value.removeNode(row.code) graph.value.removeNode(row.code)
} }
@ -278,6 +284,9 @@ const openDetail = (row: any) => {
materialData.value = [] materialData.value = []
mouldData.value = [] mouldData.value = []
workStationList.value = [] workStationList.value = []
processData.value=[]
showProcessNodeData.value = []
showMaterialsData.value = []
graph.value.on('node:dblclick', ({ e, x, y, node, view }) => { graph.value.on('node:dblclick', ({ e, x, y, node, view }) => {
nodeClick(e, x, y, node, view) nodeClick(e, x, y, node, view)
}) })
@ -297,6 +306,7 @@ const handleDrawerClose = () => {
//console.log(graph.value.toJSON()) //console.log(graph.value.toJSON())
rowData.value=null rowData.value=null
} }
emit('close')
} }
//** */ //** */
const getProcessInfo = async (id: any) => { const getProcessInfo = async (id: any) => {
@ -440,15 +450,15 @@ const saveResult = async () => {
processrouteId: processRouteId.value processrouteId: processRouteId.value
} }
let res = ProcessrouteApi.saveGraphData(gdata) await ProcessrouteApi.saveGraphData(gdata)
if (res) { // if (res) {
message.success('保存成功!') // message.success('')
} else { // } else {
message.error('保存失败!') // message.error('')
} // }
isShowDrawer.value = false isShowDrawer.value = false
handleDrawerClose() handleDrawerClose()
emit('close') //emit('close',)
//return res //return res
} }

17
src/views/mes/processroute/index.vue

@ -157,16 +157,25 @@ const buttonTableClick = async (val, row) => {
openDetail(row) openDetail(row)
} }
} }
const dailogClose=() => { const dailogClose= () => {
console.log('close'); //console.log('dailogClose--confge',getList());
nextTick?.(()=>{ //nextTick?.(()=>{
getList() getList()
}) //})
} }
/** 添加/修改操作 */ /** 添加/修改操作 */
const basicFormRef = ref() const basicFormRef = ref()
const openForm = (type: string, row?: any) => { const openForm = (type: string, row?: any) => {
let disabledFlag = false
if(type==='update'){
disabledFlag = true
}
Processroute.allSchemas.formSchema.forEach(item => {
if (item.field == 'processrouteCode') {
item.componentProps.disabled =disabledFlag
}
})
basicFormRef.value.open(type, row) basicFormRef.value.open(type, row)
} }

16
src/views/mes/processroute/processroute.data.ts

@ -4,11 +4,9 @@ import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
// 表单校验 // 表单校验
export const ProcessrouteRules = reactive({ export const ProcessrouteRules = reactive({
processrouteCode: [required], processrouteCode: [{ required: true, message: '请输入工艺路线编码!', trigger: 'blur' },],
processName: [required], processName: [{ required: true, message: '请输入工艺路线名称!', trigger: 'blur' },],
productCode: [required], productCode: [{ required: true, message: '请输入产品编码!', trigger: 'blur' },],
ablityCode: [required],
ablityCode: [required],
}) })
export const Processroute = useCrudSchemas(reactive<CrudSchema[]>([ export const Processroute = useCrudSchemas(reactive<CrudSchema[]>([
@ -59,15 +57,7 @@ export const Processroute = useCrudSchemas(reactive<CrudSchema[]>([
field: 'processrouteCode', field: 'processrouteCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
// form: {
// component: 'Input',
// componentProps: {
// slots:{
// default:}
// disabled: true
// }
// }
}, },
{ {

4
src/views/mes/productBackline/index.vue

@ -106,8 +106,8 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'mes:product-backline:create'}), // defaultButtons.defaultAddBtn({hasPermi:'mes:product-backline:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'mes:product-backline:import'}), // // defaultButtons.defaultImportBtn({hasPermi:'mes:product-backline:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'mes:product-backline:export'}), // // defaultButtons.defaultExportBtn({hasPermi:'mes:product-backline:export'}), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //

4
src/views/mes/productOffline/index.vue

@ -106,8 +106,8 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'mes:product-offline:create'}), // defaultButtons.defaultAddBtn({hasPermi:'mes:product-offline:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'mes:product-offline:import'}), // // defaultButtons.defaultImportBtn({hasPermi:'mes:product-offline:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'mes:product-offline:export'}), // // defaultButtons.defaultExportBtn({hasPermi:'mes:product-offline:export'}), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //

89
src/views/mes/workScheduling/components/qualifiedCheck.vue

@ -7,38 +7,37 @@
width="600px" width="600px"
> >
<template #title>{{ dialogTitle }} </template> <template #title>{{ dialogTitle }} </template>
<el-form :model="form"> <el-form :model="baseform" ref="baseformRef">
<el-form-item label="工序"> <el-form-item label="工序" prop="processCode">
<el-input v-model="form.processCode" disabled /> <el-input v-model="baseform.processCode" disabled />
</el-form-item> </el-form-item>
<el-form-item label="生产人员" required="true"> <el-form-item label="生产人员" prop="personSelected" :rules="[{ required: true, message: '请选择报工人', trigger: 'blur' }]">
<el-select v-model="form.personSelected" multiple> <el-select v-model="baseform.personSelected" multiple >
<el-option v-for="item in personOption" :key="item.workerCode" :label="item.workerName" :value="item.workerCode" /> <el-option v-for="item in personOption" :key="item.workerCode" :label="item.workerName" :value="item.workerCode" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="质检人员" required="true" > <el-form-item label="质检人员" prop="checkPerson" :rules="[{ required: true, message: '请填写质检人登录名', trigger: 'blur' }]">
<el-input v-model="form.checkPerson"/> <el-input v-model="baseform.checkPerson" />
</el-form-item> </el-form-item>
<el-form-item label="合格数量" @change="handleCount" :key="qcount" required="true"> <el-form-item label="合格数量" prop="qualified" :rules="[{ required: true, message: '请填写合格数量', trigger: 'blur' }]">
<el-input-number <el-input-number
v-model="form.qualified" v-model="baseform.qualified"
@change="handleCount" @change="handleCount" :key="qcount"
></el-input-number> ></el-input-number>
</el-form-item> </el-form-item>
<el-form-item label="不合格数量" > <el-form-item label="不合格数量" prop="unqualified" :rules="[{ required: true, message: '请填写不合格数量', trigger: 'blur' }]">
<el-input-number v-model="form.unqualified" @change="handleCount" :key="qcount"></el-input-number> <el-input-number v-model="baseform.unqualified" @change="handleCount" :key="qcount"></el-input-number >
</el-form-item> </el-form-item>
<el-form-item label="不合格原因"> <el-form-item label="不合格原因" prop="remark" :rules="[{ required: true, message: '请填写不合格原因', trigger: 'blur' }]">
<el-input v-model="form.remark"></el-input> <el-input v-model="baseform.remark"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<template #footer> <template #footer>
<el-button @click="dialogVisible = false">关闭</el-button> <el-button @click="dialogVisible = false">关闭</el-button>
<el-button type="primary" :disabled="saveFlag" @click="saveReport">保存</el-button> <el-button type="primary" :disabled="saveFlag" @click="saveReport">保存</el-button>
</template> </Dialog </template>
> </Dialog>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { Dialog } from '@/components/Dialog' import { Dialog } from '@/components/Dialog'
import * as workschedulingApi from '@/api/mes/workScheduling' import * as workschedulingApi from '@/api/mes/workScheduling'
@ -51,7 +50,8 @@ const formLoading = ref(false)
const personOption=ref([]) const personOption=ref([])
const saveFlag=ref(false) const saveFlag=ref(false)
const planDayCode=ref() const planDayCode=ref()
const form = reactive({ const baseformRef=ref()
const baseform = reactive({
id:0, id:0,
planDayCode: "", planDayCode: "",
processCode:"", processCode:"",
@ -66,16 +66,17 @@ const openDetail = async (row: any, titleName: any,code:string) => {
//console.log('row-68',row) //console.log('row-68',row)
dialogVisible.value = true dialogVisible.value = true
dialogTitle.value = titleName dialogTitle.value = titleName
form.processCode=row.nodeCode baseform.processCode=row.nodeCode
form.personSelected=[] baseform.personSelected=[]
form.planDayCode=code baseform.planDayCode=code
form.personSelected=[] baseform.personSelected=[]
form.qualified=0 baseform.qualified=0
form.unqualified=0 baseform.unqualified=0
form.id=row.id baseform.id=row.id
planDayCode.value=code planDayCode.value=code
getCurrentWorkerList(row.nodeCode) getCurrentWorkerList(row.nodeCode)
} }
// //
@ -87,52 +88,52 @@ const getCurrentWorkerList = async (val) => {
} }
personOption.value = await workschedulingApi.getCurrentWorkerList(params) personOption.value = await workschedulingApi.getCurrentWorkerList(params)
} }
const qcount=ref(0) const qcount=ref(0)
// //
const handleCount = () => { const handleCount = () => {
qcount.value++ qcount.value++
if (form.qualified> rowData.value.planCount - form.unqualified) { if (baseform.qualified> rowData.value.planCount - baseform.unqualified) {
message.alert('合格数量超限!计划总数【'+rowData.value.planCount+'】') message.alert('合格数量超限!计划总数【'+rowData.value.planCount+'】')
form.qualified =rowData.value.planCount - form.unqualified baseform.qualified =rowData.value.planCount - baseform.unqualified
return return
} }
if (form.unqualified> rowData.value.planCount -form.qualified ) { if (baseform.unqualified> rowData.value.planCount -baseform.qualified ) {
message.alert('不合格数量超限!') message.alert('不合格数量超限!')
form.unqualified =rowData.value.planCount-form.qualified baseform.unqualified =rowData.value.planCount-baseform.qualified
return return
} }
} }
// //
const saveReport = async() => { const saveReport = () => {
if(form.personSelected.length<1){ if (!baseformRef) return
message.alert('生产人员不能为空') baseformRef.value.validate((valid) => {
return if (valid) {
}
if(form.checkPerson==''||form.checkPerson.trim()==''){
message.alert('质检人员不能为空')
return
}
if(form.qualified<1){
message.alert('合格数量不能小于1!')
return
}
saveFlag.value = true saveFlag.value = true
try { try {
await workschedulingApi.processQualified(form) workschedulingApi.processQualified(baseform)
}finally{ }finally{
saveFlag.value = false saveFlag.value = false
dialogVisible.value = false dialogVisible.value = false
emit('close') emit('close')
} }
} else {
console.log('请确认数据的正确!')
}
})
//console.log("report-saveReport-82",data) //console.log("report-saveReport-82",data)
//await workschedulingApi.reportWorkByProcess(data) //await workschedulingApi.reportWorkByProcess(data)
} }
// //
const emit = defineEmits(['success', 'close']) const emit = defineEmits(['success', 'close'])
defineOptions({ name: 'qualifiedCheck' }) defineOptions({ name: 'qualifiedCheck' })
defineExpose({ openDetail }) // open defineExpose({ openDetail }) // open
</script> </script>

22
src/views/wms/deliversettlementManage/saleShipmentMainRecord/index.vue

@ -1,7 +1,7 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="SaleShipmentMainRecord.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> <Search :schema="[...SaleShipmentMainRecord.allSchemas.searchSchema,...SaleShipmentDetailRecord.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
@ -12,11 +12,12 @@
@updataTableColumns="updataTableColumns" @updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
:allSchemas="SaleShipmentMainRecord.allSchemas" :allSchemas="SaleShipmentMainRecord.allSchemas"
:detailAllSchemas="SaleShipmentDetailRecord.allSchemas"
/> />
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
<Table <Table v-clientTable
:columns="tableColumns" :columns="tableColumns"
:data="tableObject.tableList" :data="tableObject.tableList"
:loading="tableObject.loading" :loading="tableObject.loading"
@ -51,15 +52,23 @@
/> />
<!-- 详情 --> <!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="SaleShipmentMainRecord.allSchemas" /> <Detail
ref="detailRef"
:isBasic="true"
:allSchemas="SaleShipmentMainRecord.allSchemas"
:detailAllSchemas="SaleShipmentDetailRecord.allSchemas"
:detailAllSchemasRules="SaleShipmentDetailRecordRules"
:apiPage="SaleShipmentDetailRecordApi.getSaleShipmentDetailRecordPage"
/>
<!-- 导入 --> <!-- 导入 -->
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { SaleShipmentMainRecord,SaleShipmentMainRecordRules } from './saleShipmentMainRecord.data' import { SaleShipmentMainRecord,SaleShipmentMainRecordRules,SaleShipmentDetailRecord,SaleShipmentDetailRecordRules } from './saleShipmentMainRecord.data'
import * as SaleShipmentMainRecordApi from '@/api/wms/saleShipmentMainRecord' import * as SaleShipmentMainRecordApi from '@/api/wms/saleShipmentMainRecord'
import * as SaleShipmentDetailRecordApi from '@/api/wms/saleShipmentDetailRecord'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
@ -72,8 +81,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() // const route = useRoute() //
const routeName = ref() const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref(SaleShipmentMainRecord.allSchemas.tableColumns) const tableColumns = ref([...SaleShipmentMainRecord.allSchemas.tableColumns,...SaleShipmentDetailRecord.allSchemas.tableMainColumns])
// //
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => { nextTick(() => {
@ -89,7 +97,7 @@ const updataTableColumns = (val) => {
} }
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: SaleShipmentMainRecordApi.getSaleShipmentMainRecordPage // getListApi: SaleShipmentDetailRecordApi.getSaleShipmentDetailRecordPage //
}) })
// //

91
src/views/wms/deliversettlementManage/saleShipmentMainRecord/saleShipmentMainRecord.data.ts

@ -11,25 +11,32 @@ export const SaleShipmentMainRecord = useCrudSchemas(reactive<CrudSchema[]>([
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: {
width: 200,
}
}, },
{ {
label: '申请单号', label: '申请单号',
field: 'requestNumber', field: 'requestNumber',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
table: {
width: 200,
}
}, },
{ {
label: '客户代码', label: '客户代码',
field: 'customerCode', field: 'customerCode',
sort: 'custom', sort: 'custom',
isSearch: true, table: {
width: 150,
}
}, },
{ {
label: '发票时间', label: '发票时间',
field: 'invoiceTime', field: 'invoiceTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: true,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -38,6 +45,9 @@ export const SaleShipmentMainRecord = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
table: {
width: 200,
},
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -51,7 +61,6 @@ export const SaleShipmentMainRecord = useCrudSchemas(reactive<CrudSchema[]>([
field: 'executeTime', field: 'executeTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: true,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -67,33 +76,34 @@ export const SaleShipmentMainRecord = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x' valueFormat: 'x'
} }
}, },
table: {
width: 200,
}
}, },
{ {
label: '是否可用', label: '是否可用',
field: 'available', field: 'available',
sort: 'custom', sort: 'custom',
isSearch: true,
isTable:false isTable:false
}, },
{ {
label: '部门', label: '部门',
field: 'departmentCode', field: 'departmentCode',
sort: 'custom', sort: 'custom',
isSearch: true, isTable:false
}, },
{ {
label: '业务类型', label: '业务类型',
field: 'businessType', field: 'businessType',
sort: 'custom', sort: 'custom',
isSearch: true, isTable:false
}, },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: true,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -109,7 +119,6 @@ export const SaleShipmentMainRecord = useCrudSchemas(reactive<CrudSchema[]>([
label: '地点ID', label: '地点ID',
field: 'siteId', field: 'siteId',
sort: 'custom', sort: 'custom',
isSearch: true,
isTable:false isTable:false
}, },
{ {
@ -128,121 +137,133 @@ export const SaleShipmentDetailRecordRules = reactive({
}) })
export const SaleShipmentDetailRecord = useCrudSchemas(reactive<CrudSchema[]>([ export const SaleShipmentDetailRecord = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
sort: 'custom',
isSearch: true,
},
{ {
label: '销售订单号', label: '销售订单号',
field: 'soNumber', field: 'soNumber',
sort: 'custom', sort: 'custom',
isSearch: true, table: {
width: 200,
}
}, },
{ {
label: '销售订单行', label: '销售订单行',
field: 'soLine', field: 'soLine',
sort: 'custom', sort: 'custom',
isSearch: true, table: {
width: 150,
}
}, },
{ {
label: '从货主代码', label: '从货主代码',
field: 'fromOwnerCode', field: 'fromOwnerCode',
sort: 'custom', sort: 'custom',
isSearch: true, isTable:false
}, },
{ {
label: '包装号', label: '包装号',
field: 'packingNumber', field: 'packingNumber',
sort: 'custom', sort: 'custom',
isSearch: true, isTable:false
}, },
{ {
label: '批次', label: '批次',
field: 'batch', field: 'batch',
sort: 'custom', sort: 'custom',
isSearch: true, table: {
width: 150,
}
}, },
{ {
label: '库存状态', label: '库存状态',
field: 'inventoryStatus', field: 'inventoryStatus',
sort: 'custom', sort: 'custom',
isSearch: true,
form: { form: {
component: 'Radio' component: 'Radio'
}, },
isTable:false
}, },
{ {
label: '从库位代码', label: '从库位代码',
field: 'fromLocationCode', field: 'fromLocationCode',
sort: 'custom', sort: 'custom',
isSearch: true, table: {
width: 130,
}
}, },
{ {
label: '主表ID', label: '主表ID',
field: 'masterId', field: 'masterId',
sort: 'custom', sort: 'custom',
isSearch: true,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0
}, },
isTable:false
}, },
{ {
label: '物品代码', label: '物品代码',
field: 'itemCode', field: 'itemCode',
sort: 'custom', sort: 'custom',
isSearch: true, table: {
width: 150,
}
}, },
{ {
label: '物品名称', label: '物品名称',
field: 'itemName', field: 'itemName',
sort: 'custom', sort: 'custom',
isSearch: true, table: {
width: 150,
}
}, },
{ {
label: '物品描述1', label: '物品描述1',
field: 'itemDesc1', field: 'itemDesc1',
sort: 'custom', sort: 'custom',
isSearch: true, isTable:false
}, },
{ {
label: '物品描述2', label: '物品描述2',
field: 'itemDesc2', field: 'itemDesc2',
sort: 'custom', sort: 'custom',
isSearch: true, isTable:false
}, },
{ {
label: '项目代码', label: '项目代码',
field: 'projectCode', field: 'projectCode',
sort: 'custom', sort: 'custom',
isSearch: true, isTable:false
}, },
{ {
label: '数量', label: '数量',
field: 'qty', field: 'qty',
sort: 'custom', sort: 'custom',
isSearch: true,
}, },
{ {
label: '计量单位', label: '计量单位',
field: 'uom', field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom', sort: 'custom',
isSearch: true, table: {
width: 150
},
tableForm: {
type: 'Select'
}
}, },
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',
sort: 'custom', sort: 'custom',
isSearch: true, isTable:false
}, },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: true,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -251,28 +272,30 @@ export const SaleShipmentDetailRecord = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
} }
}, },
isForm: false, isTable: false,
}, },
{ {
label: '并发乐观锁', label: '并发乐观锁',
field: 'concurrencyStamp', field: 'concurrencyStamp',
sort: 'custom', sort: 'custom',
isSearch: true, isTable:false
}, },
{ {
label: '地点ID', label: '地点ID',
field: 'siteId', field: 'siteId',
sort: 'custom', sort: 'custom',
isSearch: true,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0
}, },
isTable:false
}, },
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',
isForm: false, isForm: false,
hiddenInMain:true,
isTable:false,
table: { table: {
width: 150, width: 150,
fixed: 'right' fixed: 'right'

5
src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue

@ -108,13 +108,18 @@ const trueFalse = ref(false)
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => { nextTick(() => {
if (type == 'tableForm') { if (type == 'tableForm') {
if(formField == 'soLine') {
row['soLine'] = val[0]['lineNumber'] row['soLine'] = val[0]['lineNumber']
row['soNumber'] = val[0]['number'] row['soNumber'] = val[0]['number']
row['itemCode'] = val[0]['itemCode'] row['itemCode'] = val[0]['itemCode']
row['projectCode'] = val[0]['projectCode'] row['projectCode'] = val[0]['projectCode']
row['uom'] = val[0]['uom'] row['uom'] = val[0]['uom']
}else if(formField == 'fromLocationCode'){
row['fromLocationCode'] = val[0]['code']
}
}else { }else {
const setV = {} const setV = {}
setV[formField] = val[0][searchField]
if(formField == 'CustomerCode') { if(formField == 'CustomerCode') {
setV['CustomerCode'] = val[0]['CustomerCode'] setV['CustomerCode'] = val[0]['CustomerCode']
} else { } else {

13
src/views/wms/deliversettlementManage/saleShipmentMainRequest/saleShipmentMain.data.ts

@ -53,7 +53,6 @@ export const SaleShipmentMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '客户代码', label: '客户代码',
field: 'customerCode', field: 'customerCode',
sort: 'custom', sort: 'custom',
isSearch: true,
table: { table: {
width: 150 width: 150
}, },
@ -79,7 +78,6 @@ export const SaleShipmentMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '发票时间', label: '发票时间',
field: 'invoiceTime', field: 'invoiceTime',
sort: 'custom', sort: 'custom',
isSearch: true,
table: { table: {
width: 180 width: 180
}, },
@ -249,6 +247,15 @@ export const SaleShipmentMain = useCrudSchemas(reactive<CrudSchema[]>([
// 表单校验 // 表单校验
export const SaleShipmentDetailRules = reactive({ export const SaleShipmentDetailRules = reactive({
soLine: [
{ required: true, message: '请选择订单行', trigger: 'blur' }
],
fromLocationCode: [
{ required: true, message: '请输选择客户库位', trigger: 'blur' }
],
qty: [
{ required: true, message: '请输入开票数量', trigger: 'blur' }
],
}) })
export const SaleShipmentDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const SaleShipmentDetail = useCrudSchemas(reactive<CrudSchema[]>([
@ -256,7 +263,6 @@ export const SaleShipmentDetail = useCrudSchemas(reactive<CrudSchema[]>([
label: '销售订单号', label: '销售订单号',
field: 'soNumber', field: 'soNumber',
sort: 'custom', sort: 'custom',
isSearch: true,
table: { table: {
width: 200 width: 200
}, },
@ -321,7 +327,6 @@ export const SaleShipmentDetail = useCrudSchemas(reactive<CrudSchema[]>([
label: '物料代码', label: '物料代码',
field: 'itemCode', field: 'itemCode',
sort: 'custom', sort: 'custom',
isSearch: true,
tableForm: { tableForm: {
type: 'Select', type: 'Select',
disabled: true disabled: true

6
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/purchasereturnRequestMain.data.ts

@ -103,11 +103,7 @@ export const PurchasereturnRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
searchDetailSchemas: PurchasereceiptRecordDetail.allSchemas, searchDetailSchemas: PurchasereceiptRecordDetail.allSchemas,
searchAllSchemas: PurchasereceiptRecordMain.allSchemas, // 查询弹窗所需类 searchAllSchemas: PurchasereceiptRecordMain.allSchemas, // 查询弹窗所需类
searchPage: PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPage, // 查询弹窗所需分页方法 searchPage: PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPage, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [
key: 'available',
value: 'TRUE',
isMainValue: false
},
{ {
key: 'supplierCode', key: 'supplierCode',
value: 'supplierCode', value: 'supplierCode',

Loading…
Cancel
Save