Browse Source

修复部分bug,调整显示字段

master_hella_20240701
chenfang 6 months ago
parent
commit
fc0b540c98
  1. 11
      src/api/wms/location/index.ts
  2. 21
      src/views/wms/deliversettlementManage/saleShipmentMainRecord/index.vue
  3. 29
      src/views/wms/deliversettlementManage/saleShipmentMainRecord/saleShipmentMainRecord.data.ts
  4. 19
      src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue
  5. 13
      src/views/wms/deliversettlementManage/saleShipmentMainRequest/saleShipmentMain.data.ts

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 })
}
}

21
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,8 @@ 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 tableColumns = ref(SaleShipmentMainRecord.allSchemas.tableColumns)
// //
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => { nextTick(() => {

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

@ -22,14 +22,12 @@ export const SaleShipmentMainRecord = useCrudSchemas(reactive<CrudSchema[]>([
label: '客户代码', label: '客户代码',
field: 'customerCode', field: 'customerCode',
sort: 'custom', sort: 'custom',
isSearch: true,
}, },
{ {
label: '发票时间', label: '发票时间',
field: 'invoiceTime', field: 'invoiceTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: true,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -51,7 +49,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: {
@ -72,28 +69,25 @@ export const SaleShipmentMainRecord = useCrudSchemas(reactive<CrudSchema[]>([
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,
}, },
{ {
label: '业务类型', label: '业务类型',
field: 'businessType', field: 'businessType',
sort: 'custom', sort: 'custom',
isSearch: true,
}, },
{ {
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 +103,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
}, },
{ {
@ -132,43 +125,36 @@ export const SaleShipmentDetailRecord = useCrudSchemas(reactive<CrudSchema[]>([
label: '单据号', label: '单据号',
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
isSearch: true,
}, },
{ {
label: '销售订单号', label: '销售订单号',
field: 'soNumber', field: 'soNumber',
sort: 'custom', sort: 'custom',
isSearch: true,
}, },
{ {
label: '销售订单行', label: '销售订单行',
field: 'soLine', field: 'soLine',
sort: 'custom', sort: 'custom',
isSearch: true,
}, },
{ {
label: '从货主代码', label: '从货主代码',
field: 'fromOwnerCode', field: 'fromOwnerCode',
sort: 'custom', sort: 'custom',
isSearch: true,
}, },
{ {
label: '包装号', label: '包装号',
field: 'packingNumber', field: 'packingNumber',
sort: 'custom', sort: 'custom',
isSearch: true,
}, },
{ {
label: '批次', label: '批次',
field: 'batch', field: 'batch',
sort: 'custom', sort: 'custom',
isSearch: true,
}, },
{ {
label: '库存状态', label: '库存状态',
field: 'inventoryStatus', field: 'inventoryStatus',
sort: 'custom', sort: 'custom',
isSearch: true,
form: { form: {
component: 'Radio' component: 'Radio'
}, },
@ -177,13 +163,11 @@ export const SaleShipmentDetailRecord = useCrudSchemas(reactive<CrudSchema[]>([
label: '从库位代码', label: '从库位代码',
field: 'fromLocationCode', field: 'fromLocationCode',
sort: 'custom', sort: 'custom',
isSearch: true,
}, },
{ {
label: '主表ID', label: '主表ID',
field: 'masterId', field: 'masterId',
sort: 'custom', sort: 'custom',
isSearch: true,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0
@ -193,56 +177,47 @@ export const SaleShipmentDetailRecord = useCrudSchemas(reactive<CrudSchema[]>([
label: '物品代码', label: '物品代码',
field: 'itemCode', field: 'itemCode',
sort: 'custom', sort: 'custom',
isSearch: true,
}, },
{ {
label: '物品名称', label: '物品名称',
field: 'itemName', field: 'itemName',
sort: 'custom', sort: 'custom',
isSearch: true,
}, },
{ {
label: '物品描述1', label: '物品描述1',
field: 'itemDesc1', field: 'itemDesc1',
sort: 'custom', sort: 'custom',
isSearch: true,
}, },
{ {
label: '物品描述2', label: '物品描述2',
field: 'itemDesc2', field: 'itemDesc2',
sort: 'custom', sort: 'custom',
isSearch: true,
}, },
{ {
label: '项目代码', label: '项目代码',
field: 'projectCode', field: 'projectCode',
sort: 'custom', sort: 'custom',
isSearch: true,
}, },
{ {
label: '数量', label: '数量',
field: 'qty', field: 'qty',
sort: 'custom', sort: 'custom',
isSearch: true,
}, },
{ {
label: '计量单位', label: '计量单位',
field: 'uom', field: 'uom',
sort: 'custom', sort: 'custom',
isSearch: true,
}, },
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',
sort: 'custom', sort: 'custom',
isSearch: true,
}, },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: true,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -257,13 +232,11 @@ export const SaleShipmentDetailRecord = useCrudSchemas(reactive<CrudSchema[]>([
label: '并发乐观锁', label: '并发乐观锁',
field: 'concurrencyStamp', field: 'concurrencyStamp',
sort: 'custom', sort: 'custom',
isSearch: true,
}, },
{ {
label: '地点ID', label: '地点ID',
field: 'siteId', field: 'siteId',
sort: 'custom', sort: 'custom',
isSearch: true,
form: { form: {
component: 'InputNumber', component: 'InputNumber',
value: 0 value: 0

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

@ -108,15 +108,20 @@ 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') {
row['soLine'] = val[0]['lineNumber'] if(formField == 'soLine') {
row['soNumber'] = val[0]['number'] row['soLine'] = val[0]['lineNumber']
row['itemCode'] = val[0]['itemCode'] row['soNumber'] = val[0]['number']
row['projectCode'] = val[0]['projectCode'] row['itemCode'] = val[0]['itemCode']
row['uom'] = val[0]['uom'] row['projectCode'] = val[0]['projectCode']
row['uom'] = val[0]['uom']
}else if(formField == 'fromLocationCode'){
row['fromLocationCode'] = val[0]['code']
}
}else { }else {
const setV = {} const setV = {}
if(formField == 'CustomerCode') { setV[formField] = val[0][searchField]
setV['CustomerCode'] = val[0]['CustomerCode'] if(formField == 'CustomerCode') {
setV['CustomerCode'] = val[0]['CustomerCode']
} else { } else {
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
} }

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

Loading…
Cancel
Save