Browse Source

销售订单、发货计划修改

master
李胜楠 1 year ago
parent
commit
fc569c17f1
  1. 103
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts
  2. 36
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue
  3. 36
      src/views/wms/deliversettlementManage/deliverplan/saleMain/index.vue
  4. 140
      src/views/wms/deliversettlementManage/deliverplan/saleMain/saleMain.data.ts

103
src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts

@ -1,7 +1,17 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
const { t } = useI18n() // 国际化
import * as CustomerApi from '@/api/wms/customer'
import { Customer } from '@/views/wms/basicDataManage/customerManage/customer/customer.data'
import * as SaleMainApi from '@/api/wms/saleMain'
import * as SaleDetailApi from '@/api/wms/saleDetail'
import { SaleDetail, SaleMain } from '../saleMain/saleMain.data'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
const { t } = useI18n() // 国际化
/**
* @returns {Array}
@ -14,7 +24,18 @@ export const DeliverPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isSearch: true
isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择客户代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '客户信息', // 查询弹窗标题
searchAllSchemas: Customer.allSchemas, // 查询弹窗所需类
searchPage: CustomerApi.getCustomerPage // 查询弹窗所需分页方法
}
}
},
{
label: '计划日期',
@ -51,7 +72,7 @@ export const DeliverPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '业务类型',
field: 'businessType',
sort: 'custom',
isForm:false,
isForm: false,
table: {
width: 150
},
@ -241,6 +262,25 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择销售订单号',
searchField: 'number',
searchTitle: '销售订单信息',
searchAllSchemas: SaleMain.allSchemas,
searchPage: SaleMainApi.getSaleMainPage
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择销售订单号',
searchField: 'number',
searchTitle: '销售订单信息',
searchAllSchemas: SaleMain.allSchemas,
searchPage: SaleMainApi.getSaleMainPage
}
}
},
{
label: '销售订单行',
@ -249,6 +289,25 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择销售订单行',
searchField: 'lineNumber',
searchTitle: '销售订单信息',
searchAllSchemas: SaleDetail.allSchemas,
searchPage: SaleDetailApi.getSaleDetailPage
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择销售订单行',
searchField: 'lineNumber',
searchTitle: '销售订单信息',
searchAllSchemas: SaleDetail.allSchemas,
searchPage: SaleDetailApi.getSaleDetailPage
}
}
},
{
label: '客户月台',
@ -257,6 +316,8 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '项目',
@ -265,6 +326,8 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isTableForm: false,
isForm: false,
},
{
label: '单据号',
@ -287,6 +350,25 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
tableForm:{
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择物品代码',
searchField: 'code',
searchTitle: '物品基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.getItembasicPage
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择物品代码',
searchField: 'code',
searchTitle: '物品基础信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.getItembasicPage
}
}
},
{
label: '备注',
@ -337,6 +419,15 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
}
},
{
@ -349,6 +440,9 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
tableForm: {
type: 'Select'
}
},
{
label: '最后更新时间',
@ -399,7 +493,8 @@ export const DeliverPlanDetail = useCrudSchemas(reactive<CrudSchema[]>([
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
isTableForm: false
},
{
label: '操作',

36
src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue

@ -44,7 +44,6 @@
@success="getList"
:rules="DeliverPlanMainRules"
:formAllSchemas="DeliverPlanMain.allSchemas"
:searchTableParams="searchTableParams"
:tableAllSchemas="DeliverPlanDetail.allSchemas"
:tableFormRules="DeliverPlanDetailRules"
:tableData="tableData"
@ -64,12 +63,12 @@
:allSchemas="DeliverPlanMain.allSchemas"
:detailAllSchemas="DeliverPlanDetail.allSchemas"
:detailAllSchemasRules="DeliverPlanDetailRules"
:searchTableParams="searchTableParams"
:apiCreate="DeliverPlanDetailApi.createDeliverPlanDetail"
:apiUpdate="DeliverPlanDetailApi.updateDeliverPlanDetail"
:apiPage="DeliverPlanDetailApi.getDeliverPlanDetailPage"
:apiDelete="DeliverPlanDetailApi.deleteDeliverPlanDetail"
:Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail"
/>
<!-- 导入 -->
@ -99,41 +98,28 @@ const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const searchTableParams = ref([
//{
// formField: 'productItemCode',
// searchTableTitle: '',
// searchTableAllSchemas: Itembasic.allSchemas,
// searchTablePage: ItembasicApi.getItembasicPage
//}
])
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => {
if (type == 'tableForm') {
//
//row[formField] = val[0][searchField]
//row['poLine'] = val[0]['poLine']
//row['batch'] = val[0]['toBatch']
//row['altBatch'] = val[0]['altBatch']
//row['itemCode'] = val[0]['itemCode']
//row['itemName'] = val[0]['itemName']
//row['itemDesc1'] = val[0]['itemDesc1']
//row['itemDesc2'] = val[0]['itemDesc2']
//row['projectCode'] = val[0]['projectCode']
//row['qty'] = val[0]['qty']
//row['uom'] = val[0]['uom']
row[formField] = val[0][searchField]
} else {
const setV = {}
setV[formField] = val[0][searchField]
//setV['ppNumber'] = val[0]['ppNumber']
//setV['supplierCode'] = val[0]['supplierCode']
formRef.setValues(setV)
}
})
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = []

36
src/views/wms/deliversettlementManage/deliverplan/saleMain/index.vue

@ -44,7 +44,6 @@
@success="getList"
:rules="SaleMainRules"
:formAllSchemas="SaleMain.allSchemas"
:searchTableParams="searchTableParams"
:tableAllSchemas="SaleDetail.allSchemas"
:tableFormRules="SaleDetailRules"
:tableData="tableData"
@ -64,12 +63,12 @@
:allSchemas="SaleMain.allSchemas"
:detailAllSchemas="SaleDetail.allSchemas"
:detailAllSchemasRules="SaleDetailRules"
:searchTableParams="searchTableParams"
:apiCreate="SaleDetailApi.createSaleDetail"
:apiUpdate="SaleDetailApi.updateSaleDetail"
:apiPage="SaleDetailApi.getSaleDetailPage"
:apiDelete="SaleDetailApi.deleteSaleDetail"
:Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail"
/>
<!-- 导入 -->
@ -99,41 +98,28 @@ const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const searchTableParams = ref([
//{
// formField: 'productItemCode',
// searchTableTitle: '',
// searchTableAllSchemas: Itembasic.allSchemas,
// searchTablePage: ItembasicApi.getItembasicPage
//}
])
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => {
if (type == 'tableForm') {
//
//row[formField] = val[0][searchField]
//row['poLine'] = val[0]['poLine']
//row['batch'] = val[0]['toBatch']
//row['altBatch'] = val[0]['altBatch']
//row['itemCode'] = val[0]['itemCode']
//row['itemName'] = val[0]['itemName']
//row['itemDesc1'] = val[0]['itemDesc1']
//row['itemDesc2'] = val[0]['itemDesc2']
//row['projectCode'] = val[0]['projectCode']
//row['qty'] = val[0]['qty']
//row['uom'] = val[0]['uom']
row[formField] = val[0][searchField]
} else {
const setV = {}
setV[formField] = val[0][searchField]
//setV['ppNumber'] = val[0]['ppNumber']
//setV['supplierCode'] = val[0]['supplierCode']
formRef.setValues(setV)
}
})
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = []

140
src/views/wms/deliversettlementManage/deliverplan/saleMain/saleMain.data.ts

@ -1,5 +1,12 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
import * as CustomerApi from '@/api/wms/customer'
import { Customer } from '@/views/wms/basicDataManage/customerManage/customer/customer.data'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
const { t } = useI18n() // 国际化
/**
@ -14,6 +21,17 @@ export const SaleMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择客户代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '客户信息', // 查询弹窗标题
searchAllSchemas: Customer.allSchemas, // 查询弹窗所需类
searchPage: CustomerApi.getCustomerPage // 查询弹窗所需分页方法
}
}
},
{
label: '订单类型',
@ -84,6 +102,9 @@ export const SaleMain = useCrudSchemas(reactive<CrudSchema[]>([
},
form: {
component: 'InputNumber',
componentProps: {
min: 0
}
}
},
{
@ -133,7 +154,8 @@ export const SaleMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: {
disabled: true
}
}
},
isForm: false
},
{
label: '备注',
@ -288,6 +310,8 @@ export const SaleDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
isForm: false,
isTableForm: false,
},
{
label: '标包数量',
@ -298,6 +322,15 @@ export const SaleDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
}
},
{
@ -310,6 +343,9 @@ export const SaleDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
tableForm: {
type: 'Select'
}
},
{
label: '客户计量数量',
@ -320,6 +356,15 @@ export const SaleDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
}
},
{
@ -332,6 +377,9 @@ export const SaleDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
tableForm: {
type: 'Select'
}
},
{
label: '转换率',
@ -342,6 +390,15 @@ export const SaleDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
}
},
{
@ -353,6 +410,15 @@ export const SaleDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
}
},
{
@ -364,6 +430,15 @@ export const SaleDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
}
},
{
@ -375,6 +450,15 @@ export const SaleDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
}
},
{
@ -386,6 +470,15 @@ export const SaleDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
}
},
{
@ -397,6 +490,15 @@ export const SaleDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
}
},
{
@ -420,6 +522,25 @@ export const SaleDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
tableForm:{
isInpuFocusShow: true,
searchListPlaceholder: '请选择物品代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物品基础信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage // 查询弹窗所需分页方法
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物品代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物品基础信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage // 查询弹窗所需分页方法
}
}
},
{
label: '备注',
@ -470,7 +591,16 @@ export const SaleDetail = useCrudSchemas(reactive<CrudSchema[]>([
},
form: {
component: 'InputNumber',
}
componentProps: {
min: 1,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
}
},
{
label: '计量单位',
@ -482,6 +612,9 @@ export const SaleDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
tableForm: {
type: 'Select'
}
},
{
label: '最后更新时间',
@ -532,7 +665,8 @@ export const SaleDetail = useCrudSchemas(reactive<CrudSchema[]>([
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
isTableForm: false
},
{
label: '操作',

Loading…
Cancel
Save