Browse Source

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

intex_online20241228
ljlong_2630 3 months ago
parent
commit
e6d41fc28e
  1. 58
      src/api/infra/outerApiHis/index.ts
  2. 5
      src/api/wms/package/index.ts
  3. 2
      src/api/wms/switch/index.ts
  4. 1
      src/components/Detail/src/Detail.vue
  5. 1
      src/utils/dict.ts
  6. 14
      src/utils/disposition/defaultButtons.ts
  7. 10
      src/utils/validator.ts
  8. 254
      src/views/infra/outerApiHis/index.vue
  9. 82
      src/views/infra/outerApiHis/outerApiHis.data.ts
  10. 4
      src/views/wms/basicDataManage/labelManage/purchasePackage/purchasePackage.data.ts
  11. 94
      src/views/wms/basicDataManage/strategySetting/strategy/deliverStrategy/AddForm.vue
  12. 8
      src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue
  13. 4
      src/views/wms/basicDataManage/strategySetting/strategy/repairMaterialStrategy/AddForm.vue
  14. 47
      src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/AddForm.vue
  15. 89
      src/views/wms/inventoryManage/balance/index.vue
  16. 6
      src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/inventoryinitRequestMain.data.ts
  17. 3
      src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue
  18. 2
      src/views/wms/productionManage/productreceipt/productreceiptJobMain/productreceiptJobMain.data.ts
  19. 2
      src/views/wms/productionManage/productreceipt/productreceiptRecordMain/productreceiptRecordMain.data.ts
  20. 94
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts
  21. 73
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts

58
src/api/infra/outerApiHis/index.ts

@ -0,0 +1,58 @@
import request from '@/config/axios'
export interface OuterApiHisVO {
id: number
number: string
type: string
times: number
content: string
result: string
}
// 查询第三方接口调用记录列表
export const getOuterApiHisPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/infra/outer-api-his/senior', data })
} else {
return await request.get({ url: `/infra/outer-api-his/page`, params })
}
}
// 查询第三方接口调用记录详情
export const getOuterApiHis = async (id: number) => {
return await request.get({ url: `/infra/outer-api-his/get?id=` + id })
}
// 新增第三方接口调用记录
export const createOuterApiHis = async (data: OuterApiHisVO) => {
return await request.post({ url: `/infra/outer-api-his/create`, data })
}
// 修改第三方接口调用记录
export const updateOuterApiHis = async (data: OuterApiHisVO) => {
return await request.put({ url: `/infra/outer-api-his/update`, data })
}
// 删除第三方接口调用记录
export const deleteOuterApiHis = async (id: number) => {
return await request.delete({ url: `/infra/outer-api-his/delete?id=` + id })
}
// 导出第三方接口调用记录 Excel
export const exportOuterApiHis = async (params) => {
return await request.download({ url: `/infra/outer-api-his/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/infra/outer-api-his/get-import-template' })
}
//重试
export const retry = (id: number) => {
return request.get({
url: '/wms/outer/retry?id=' + id
})
}

5
src/api/wms/package/index.ts

@ -101,7 +101,10 @@ export const batchPrintingLable = async (data: any) => {
return await request.post({ url: `/wms/package/batchPrintingLable`, data }) return await request.post({ url: `/wms/package/batchPrintingLable`, data })
} }
// 批量打印标签
export const batchPrintingLableGet = async (params: any) => {
return await request.get({ url: `/wms/package/batchPrintingBalanceLable`, params })
}
// 批量打印标签多选 // 批量打印标签多选
export const batchPrintingLables = async (data: any) => { export const batchPrintingLables = async (data: any) => {
return await request.post({ url: `/wms/package/batchPrintingLables`, data }) return await request.post({ url: `/wms/package/batchPrintingLables`, data })

2
src/api/wms/switch/index.ts

@ -57,5 +57,5 @@ export const importTemplate = () => {
// 获取开关详情 // 获取开关详情
export const getSwitchByCode = async (code) => { export const getSwitchByCode = async (code) => {
// return await request.get({ url: '/wms/switch/getByCode?code=' + code }) return await request.get({ url: '/wms/switch/getByCode?code=' + code })
} }

1
src/components/Detail/src/Detail.vue

@ -480,6 +480,7 @@ const props = defineProps({
const allSchemas = ref(props.allSchemas) const allSchemas = ref(props.allSchemas)
const detailAllSchemasRef = ref(props.detailAllSchemas) const detailAllSchemasRef = ref(props.detailAllSchemas)
const detailAllSchemasRules = ref(props.detailAllSchemasRules) const detailAllSchemasRules = ref(props.detailAllSchemasRules)
console.log(222,wsCache.get('ShowPackingNumber'))
if (!wsCache.get('ShowPackingNumber')) { if (!wsCache.get('ShowPackingNumber')) {
if (allSchemas.value) { if (allSchemas.value) {
allSchemas.value.detailSchema = props.allSchemas.detailSchema.filter(item => item.field != 'packingNumber') allSchemas.value.detailSchema = props.allSchemas.detailSchema.filter(item => item.field != 'packingNumber')

1
src/utils/dict.ts

@ -127,6 +127,7 @@ export enum DICT_TYPE {
INFRA_CODEGEN_FRONT_TYPE = 'infra_codegen_front_type', INFRA_CODEGEN_FRONT_TYPE = 'infra_codegen_front_type',
INFRA_CODEGEN_SCENE = 'infra_codegen_scene', INFRA_CODEGEN_SCENE = 'infra_codegen_scene',
INFRA_FILE_STORAGE = 'infra_file_storage', INFRA_FILE_STORAGE = 'infra_file_storage',
INFRA_OUTER_API_TYPE = 'outer_api_type',
// ========== BPM 模块 ========== // ========== BPM 模块 ==========
BPM_MODEL_CATEGORY = 'bpm_model_category', BPM_MODEL_CATEGORY = 'bpm_model_category',

14
src/utils/disposition/defaultButtons.ts

@ -235,6 +235,20 @@ export function defaultDeselectAllBtn(option: any) {
hasPermi: '' hasPermi: ''
}) })
} }
// form表单-保存按钮
export function formSureBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.确定`).replace('ts.', ''),
name: 'sure',
hide: false,
type: 'primary',
icon: 'ep:select',
color: '',
float: 'right',
hasPermi: ''
})
}
// form表单-保存按钮 // form表单-保存按钮
export function formSaveBtn(option: any) { export function formSaveBtn(option: any) {
return __defaultBtnOption(option, { return __defaultBtnOption(option, {

10
src/utils/validator.ts

@ -814,6 +814,16 @@ export function validateSampleCode(rule, value, callback){
} }
} }
// 校验正数
export function validatePositiveNumber(rule, value, callback){
const numericValue = Number(value);
if (numericValue > 0) {
callback();
} else {
callback(new Error('必须是一个正数'));
}
}
export default { export default {
validateCode, validateCode,
validateEmail, validateEmail,

254
src/views/infra/outerApiHis/index.vue

@ -0,0 +1,254 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="OuterApiHis.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="OuterApiHis.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="OuterApiHisRules"
:formAllSchemas="OuterApiHis.allSchemas"
:apiUpdate="OuterApiHisApi.updateOuterApiHis"
:apiCreate="OuterApiHisApi.createOuterApiHis"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="OuterApiHis.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/infra/outer-api-his/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { OuterApiHis,OuterApiHisRules } from './outerApiHis.data'
import * as OuterApiHisApi from '@/api/infra/outerApiHis'
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'
defineOptions({ name: 'OuterApiHis' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(OuterApiHis.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: OuterApiHisApi.getOuterApiHisPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
// defaultButtons.defaultAddBtn({hasPermi:'wms:outerApiHis:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'wms:outerApiHis:import'}), //
// defaultButtons.defaultExportBtn({hasPermi:'wms:outerApiHis:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = (row) =>{
return [
// defaultButtons.mainListEditBtn({hasPermi:'wms:outerApiHis:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:outerApiHis:delete'}), //
defaultButtons.retryBtn({hide: row.times >= 3}), //
]
}
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
} else if (val == 'retry') { //
handleRetry(row)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =OuterApiHis.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
message.error('失效时间要大于生效时间')
return;
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await OuterApiHisApi.createOuterApiHis(data)
message.success(t('common.createSuccess'))
} else {
await OuterApiHisApi.updateOuterApiHis(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicOuterApiHis')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await OuterApiHisApi.deleteOuterApiHis(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await OuterApiHisApi.exportOuterApiHis(tableObject.params)
download.excel(data, '第三方接口调用记录.xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '第三方接口调用记录导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
//
const handleRetry = (row) => {
OuterApiHisApi.retry(row.id).then(res => {
if(res){
message.success(t('common.retrySuccess'))
}else{
message.success(t('common.retryFinish'))
}
getList()
}).catch(() => {
getList()
})
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await OuterApiHisApi.importTemplate()
})
</script>

82
src/views/infra/outerApiHis/outerApiHis.data.ts

@ -0,0 +1,82 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const OuterApiHisRules = reactive({
type: [required],
times: [required],
})
export const OuterApiHis = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'ID',
field: 'id',
sort: 'custom',
isForm: false,
},
{
label: '编号',
field: 'number',
sort: 'custom',
isSearch: true,
},
{
label: '类型',
field: 'type',
sort: 'custom',
isSearch: true,
dictType: DICT_TYPE.INFRA_OUTER_API_TYPE,
dictClass: 'string',
form: {
component: 'SelectV2'
},
},
{
label: '执行次数',
field: 'times',
sort: 'custom',
form: {
component: 'InputNumber',
value: 1
},
search: {
component: 'InputNumber',
value: 1
}
},
{
label: '内容',
field: 'content',
sort: 'custom',
},
{
label: '结果',
field: 'result',
sort: 'custom',
isSearch: true,
},
{
label: '是否成功',
field: 'success',
sort: 'custom',
isSearch: true,
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
isForm: false,
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

4
src/views/wms/basicDataManage/labelManage/purchasePackage/purchasePackage.data.ts

@ -11,6 +11,7 @@ import { SupplierdeliverRecordMain } from "@/views/wms/purchasereceiptManage/sup
import * as SupplierdeliverRecordMainApi from "@/api/wms/supplierdeliverRecordMain"; import * as SupplierdeliverRecordMainApi from "@/api/wms/supplierdeliverRecordMain";
import * as ItemPackageApi from "@/api/wms/itempackage"; import * as ItemPackageApi from "@/api/wms/itempackage";
import {Itempackaging} from "@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data"; import {Itempackaging} from "@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data";
import {validatePositiveNumber} from "@/utils/validator";
// 表单校验 // 表单校验
export const PackageRules = reactive({ export const PackageRules = reactive({
@ -610,7 +611,8 @@ export const PackageRulesInventor = reactive({
{ required: true, message: '请选择物料代码', trigger: 'change' } { required: true, message: '请选择物料代码', trigger: 'change' }
], ],
qty: [ qty: [
{ required: true, message: '请输入数量', trigger: 'blur' } { required: true, message: '请输入数量', trigger: 'blur' },
{ validator:validatePositiveNumber, message: '必须是一个正数', trigger: 'change'}
], ],
toDockCode: [ toDockCode: [
{ required: true, message: '请选择月台代码', trigger: 'change' } { required: true, message: '请选择月台代码', trigger: 'change' }

94
src/views/wms/basicDataManage/strategySetting/strategy/deliverStrategy/AddForm.vue

@ -177,8 +177,8 @@
/> />
</el-form-item> </el-form-item>
<!-- 选择供应商和客户 --> <!-- 选择供应商和客户 -->
<el-form-item key="供应商和客户formItem" label="" label-width="0" class="err-240" v-if="index == 1"> <el-form-item key="供应商和客户formItem" label="客户" class="err-240" v-if="index == 1">
<el-select key="供应商和客户" <!-- <el-select key="供应商和客户"
v-model="item.ParamCode" v-model="item.ParamCode"
placeholder="" placeholder=""
style="width: 110px; margin-right: 10px" style="width: 110px; margin-right: 10px"
@ -191,7 +191,7 @@
v-for="(cur, index) in options.typeOptions" v-for="(cur, index) in options.typeOptions"
:key="'供应商和客户'+cur.value" :key="'供应商和客户'+cur.value"
/> />
</el-select> </el-select> -->
<el-select key="供应商和客户Operator" <el-select key="供应商和客户Operator"
v-model="item.Operator" v-model="item.Operator"
placeholder="请选择范围" placeholder="请选择范围"
@ -205,24 +205,13 @@
:key="'供应商和客户Operator'+cur.value" :key="'供应商和客户Operator'+cur.value"
/> />
</el-select> </el-select>
<el-select key="供应商和客户Value" <el-input key="供应商和客户Value" style="flex:1" placeholder="请选择客户" disabled v-model="item.Value" @blur="blurCustomerList">
v-model="item.Value" <template #suffix>
:placeholder="`请选择客户`" <el-button :disabled="formData.priority==0&&formType=='update'" type="text" plain style="color:var(--el-button-text-color)" @click="searchCustomerList">
style="flex: 1" <Icon icon="ep:search" class="mr-5px" />
clearable </el-button>
multiple </template>
collapse-tags </el-input>
filterable
:filter-method="filterMethod"
:disabled="formData.priority==0&&formType=='update'"
>
<el-option
v-for="cur in options.supplierList"
:key="'供应商和客户Value'+cur.code"
:label="cur.name"
:value="cur.code"
/>
</el-select>
</el-form-item> </el-form-item>
<!-- 生产线 --> <!-- 生产线 -->
@ -495,6 +484,8 @@ import { Transactiontype } from '@/views/wms/basicDataManage/documentSetting/tra
import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data' import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data'
import * as ProductionlineApi from '@/api/wms/productionline' import * as ProductionlineApi from '@/api/wms/productionline'
import { Customer, CustomerRules } from '@/views/wms/basicDataManage/customerManage/customer/customer.data'
import * as CustomerApi from '@/api/wms/customer'
const { t } = useI18n() // const { t } = useI18n() //
@ -530,8 +521,8 @@ const formData = ref({
{ ParamCode: 'InventoryStatus', Operator: 'IN', Value: [] }, { ParamCode: 'InventoryStatus', Operator: 'IN', Value: [] },
// //
{ ParamCode: 'StorageType', Operator: 'IN', Value: [] }, { ParamCode: 'StorageType', Operator: 'IN', Value: [] },
// // 线
{ ParamCode: 'TransactionType', Operator: 'IN', Value: '' } { ParamCode: 'Productionline', Operator: 'IN', Value: '' }
], ],
configuration: { configuration: {
// //
@ -626,10 +617,10 @@ const options = reactive({
], ],
// //
warehouseTypeOptions: [ warehouseTypeOptions: [
{ value: 'WarehouseCode', label: '仓库' }, { value: 'WarehouseCode', label: '仓库' },
{ value: 'AreaCode', label: '库区' }, { value: 'AreaCode', label: '库区' },
{ value: 'LocationGroupCode', label: '库位组' }, { value: 'LocationGroupCode', label: '库位组' },
{ value: 'LocationCode', label: '库位' } { value: 'LocationCode', label: '库位' }
], ],
warehouseList: [], warehouseList: [],
originWarehouseList: [], originWarehouseList: [],
@ -831,13 +822,44 @@ const blurWarehouse = async ()=>{
}) })
} }
//
const searchCustomerList = ()=>{
searchTableRef.value.open(
'请选择客户',
Customer.allSchemas,
CustomerApi.getCustomerPage,
'CustomerCode',
'code',
true,
undefined,
undefined,
undefined
)
}
const blurCustomerList = async ()=>{
let customerCode = formData.value.condition.find(item=>item['ParamCode']=='CustomerCode')
if(customerCode&&customerCode.Value){
let verifyRes = await CustomerApi.getCustomerPage({
code:customerCode.Value
})
console.log('客户',verifyRes)
if(verifyRes&&verifyRes.length>0){
let verifyList = verifyRes.map(item=>(item['code']))
let codeList = customerCode.Value.split(',')
customerCode.Value = codeList.filter(item=>verifyList.indexOf(item)>-1).join(',')
}else{
customerCode.Value = ''
}
}
}
// 线 // 线
const searchTransactionType = ()=>{ const searchTransactionType = ()=>{
searchTableRef.value.open( searchTableRef.value.open(
'请选择生产线', '请选择生产线',
Productionline.allSchemas, Productionline.allSchemas,
ProductionlineApi.getProductionlinePage, ProductionlineApi.getProductionlinePage,
'TransactionType', 'Productionline',
'code', 'code',
true, true,
undefined, undefined,
@ -923,13 +945,21 @@ const searchWarehouse = ()=>{
} }
const searchTableSuccess = (formField, searchField, val, type, row) => { const searchTableSuccess = (formField, searchField, val, type, row) => {
if(formField=='TransactionType'){ if(formField=='Productionline'){
let transactionType = formData.value.condition.find(item=>item['ParamCode']=='TransactionType') let transactionType = formData.value.condition.find(item=>item['ParamCode']=='Productionline')
if(transactionType){ if(transactionType){
transactionType.Value = val.map(item=>(item['code'])).join(',') transactionType.Value = val.map(item=>(item['code'])).join(',')
} }
return return
} }
if(formField == 'CustomerCode'){
//
let customerCode = formData.value.condition.find(item=>item['ParamCode']=='CustomerCode')
if(customerCode){
customerCode.Value = val.map(item=>(item['code'])).join(',')
}
return
}
// let searchTableTitle = warehouseType.value == 'WarehouseCode'?'':warehouseType.value == 'AreaCode'?'':warehouseType.value == 'LocationGroupCode'?'':warehouseType.value == 'LocationCode'?'':'' // let searchTableTitle = warehouseType.value == 'WarehouseCode'?'':warehouseType.value == 'AreaCode'?'':warehouseType.value == 'LocationGroupCode'?'':warehouseType.value == 'LocationCode'?'':''
console.log('searchTableSuccess',formField, searchField, val, type, row) console.log('searchTableSuccess',formField, searchField, val, type, row)
console.log(val.map(item=>(item['code'])).join(',')) console.log(val.map(item=>(item['code'])).join(','))
@ -1130,8 +1160,8 @@ const resetForm = () => {
{ ParamCode: 'InventoryStatus', Operator: 'IN', Value: [] }, { ParamCode: 'InventoryStatus', Operator: 'IN', Value: [] },
// //
{ ParamCode: 'StorageType', Operator: 'IN', Value: [] }, { ParamCode: 'StorageType', Operator: 'IN', Value: [] },
// // 线
{ ParamCode: 'TransactionType', Operator: 'IN', Value: '' } { ParamCode: 'Productionline', Operator: 'IN', Value: '' }
], ],
configuration: { configuration: {

8
src/views/wms/basicDataManage/strategySetting/strategy/downShelfStrategy/AddForm.vue

@ -804,10 +804,10 @@ const options = reactive({
], ],
// //
warehouseTypeOptions: [ warehouseTypeOptions: [
{ value: 'WarehouseCode', label: '仓库' }, { value: 'WarehouseCode', label: '仓库' },
{ value: 'AreaCode', label: '库区' }, { value: 'AreaCode', label: '库区' },
{ value: 'LocationGroupCode', label: '库位组' }, { value: 'LocationGroupCode', label: '库位组' },
{ value: 'LocationCode', label: '库位' } { value: 'LocationCode', label: '库位' }
], ],
warehouseList: [], warehouseList: [],
originWarehouseList: [], originWarehouseList: [],

4
src/views/wms/basicDataManage/strategySetting/strategy/repairMaterialStrategy/AddForm.vue

@ -287,7 +287,8 @@
<el-form-item label="邮箱地址" <el-form-item label="邮箱地址"
prop="configuration.emailAddress" prop="configuration.emailAddress"
:rules="[ :rules="[
{ required: true, message: '请输入邮箱地址', trigger: 'change' }, { required: formData.configuration.emailNotification, message: '请输入邮箱地址', trigger: 'change' },
{ validator:validateEmail, message: '请输入正确的邮箱格式', trigger: 'blur'}
]"> ]">
<el-input v-model="formData.configuration.emailAddress" /> <el-input v-model="formData.configuration.emailAddress" />
</el-form-item> </el-form-item>
@ -311,6 +312,7 @@ import { getLocationgroupList } from '@/api/wms/locationgroup'
import { getLocationList } from '@/api/wms/location' import { getLocationList } from '@/api/wms/location'
import * as RuleApi from '@/api/wms/rule' import * as RuleApi from '@/api/wms/rule'
import { isString } from '@/utils/is' import { isString } from '@/utils/is'
import { validateHanset, validateEmail } from '@/utils/validator'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'

47
src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/AddForm.vue

@ -82,7 +82,7 @@
:key="'仓库和库区Operator'+cur.value" :key="'仓库和库区Operator'+cur.value"
/> />
</el-select> </el-select>
<el-input key="仓库和库区Value" style="flex:1" placeholder="请选择仓库或者库区" v-model="item.Value" @blur="blurWarehouseByCodes" :disabled="formData.priority==0&&formType=='update'"/> <el-input key="仓库和库区Value" style="flex:1" placeholder="请选择仓库或者库区" v-model="item.Value" @blur="blurWarehouseByCodes(item.ParamCode)" :disabled="formData.priority==0&&formType=='update'"/>
<el-button type="info" plain @click="searchWarehouse" :disabled="formData.priority==0&&formType=='update'"> <el-button type="info" plain @click="searchWarehouse" :disabled="formData.priority==0&&formType=='update'">
<Icon icon="ep:search" /> <Icon icon="ep:search" />
</el-button> </el-button>
@ -563,7 +563,8 @@ const searchTableSuccess = (formField, searchField, val, type, row) => {
} }
} }
// //
const blurWarehouseByCodes = async ()=>{ const blurWarehouseByCodes = async (formField) => {
if (formField == 'WarehouseCode') {
let WarehouseCode = formData.value.condition.find(item=>item['ParamCode']=='WarehouseCode') let WarehouseCode = formData.value.condition.find(item=>item['ParamCode']=='WarehouseCode')
if(WarehouseCode&&WarehouseCode.Value){ if(WarehouseCode&&WarehouseCode.Value){
let verifyRes = await WarehouseApi.getWarehouseByCodes({ let verifyRes = await WarehouseApi.getWarehouseByCodes({
@ -598,10 +599,48 @@ const blurWarehouseByCodes = async ()=>{
// formData.value.configuration.Receiver='' // formData.value.configuration.Receiver=''
// formData.value.configuration.PhoneNumber='' // formData.value.configuration.PhoneNumber=''
} }
} else {
let AreaCode = formData.value.condition.find(item=>item['ParamCode']=='AreaCode')
if(AreaCode&&AreaCode.Value){
let verifyRes = await AreaApi.getAreabasicByCodes({
codes:AreaCode.Value
})
console.log('事务类型verifyRes',verifyRes)
if (verifyRes && verifyRes.length > 0) {
const arr1 = AreaCode.Value.split(',')
if (arr1.length != verifyRes.length) {
const arr2 = verifyRes.map((item) => item.code)
const str = [
...arr1.filter((item) => !arr2.includes(item)),
...arr2.filter((item) => !arr1.includes(item))
].join(',')
message.alert('代码' + str + '没有找到对应数据')
AreaCode.Value = ''
// formData.value.configuration.DockCode=''
// formData.value.configuration.Receiver=''
// formData.value.configuration.PhoneNumber=''
return
}
} else {
AreaCode.Value = ''
// formData.value.configuration.DockCode=''
// formData.value.configuration.Receiver=''
// formData.value.configuration.PhoneNumber=''
message.alert('暂无数据')
}
}else{
WarehouseCode.Value = ''
// formData.value.configuration.DockCode=''
// formData.value.configuration.Receiver=''
// formData.value.configuration.PhoneNumber=''
}
}
} }
// //
const blurSupplierCode = async ()=>{ const blurSupplierCode = async () => {
let SupplierCode = formData.value.condition.find(item=>item['ParamCode']=='SupplierCode') let SupplierCode = formData.value.condition.find(item => item['ParamCode'] == 'SupplierCode')
console.log(77,SupplierCode)
if(SupplierCode&&SupplierCode.Value){ if(SupplierCode&&SupplierCode.Value){
let verifyRes = await SupplierApi.getSupplierListByCodes({ let verifyRes = await SupplierApi.getSupplierListByCodes({
codes:SupplierCode.Value codes:SupplierCode.Value

89
src/views/wms/inventoryManage/balance/index.vue

@ -76,7 +76,23 @@
/> />
<!-- 标签打印 --> <!-- 标签打印 -->
<SearchTable style="width:905px" ref="searchTableRef" @searchTableSuccess="searchTableSuccessLabel" /> // <SearchTable style="width:905px" ref="searchTableRef" @searchTableSuccess="searchTableSuccessLabel" />
<BasicForm
ref="labelPointFormRef"
@success="getList"
:tableAllSchemas="SupplierdeliverRequestPackage.allSchemas"
:tableFormRules="SupplierdeliverRequestPackageRules"
:tableData="detatableData1"
:isBusiness="true"
:isShowButton="false"
@searchTableSuccess="searchTableSuccessLabel"
:isShowReduceButton="false"
@clearInput="clearInput"
:footButttondata="footButttondata"
@footButtonClick="footButtonClick"
/>
<!-- 导入 --> <!-- 导入 -->
<ImportForm <ImportForm
@ -103,8 +119,10 @@ import { getJmreportBaseUrl } from '@/utils/systemParam'
import { formatDate } from '@/utils/formatTime' import { formatDate } from '@/utils/formatTime'
import { usePageLoading } from '@/hooks/web/usePageLoading' import { usePageLoading } from '@/hooks/web/usePageLoading'
import { import {
SupplierdeliverRequestPackage SupplierdeliverRequestPackage,
SupplierdeliverRequestPackageRules
} from '@/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data' } from '@/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data'
console.log(222,SupplierdeliverRequestPackage)
const { loadStart, loadDone } = usePageLoading() const { loadStart, loadDone } = usePageLoading()
// //
defineOptions({ name: 'Balance' }) defineOptions({ name: 'Balance' })
@ -309,23 +327,21 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
const BASE_URL = getJmreportBaseUrl() const BASE_URL = getJmreportBaseUrl()
const labelType = ref('') // const labelType = ref('') //
const labelPointFormRef = ref()
const detatableData1 = ref([])
const handlePoint = async (row) => { const handlePoint = async (row) => {
console.log(2333) await getLabelDetailPage(row,false)
tableObject.loading = true labelPointFormRef.value.open('create', row, null, 'createLabel') // createLabel
//
// await getLabelType(row,false)
await getLabelDetailPage(row, false)
} }
const searchTableRef = ref() const searchTableRef = ref()
const getLabelDetailPage = async (row, useToPackingNumber) => { const getLabelDetailPage = async (row, useToPackingNumber) => {
//// ////
let defaultParams = { let defaultParams = {
moduleName: 'move', moduleName: 'move',
recordNumber: '', recordNumber: '',
itemCode: row.itemCode, itemCode: row.itemCode,
packQty: row.packQty,
batch: row.batch batch: row.batch
} }
const { tableObject: tableObjectPrint, tableMethods } = useTable({ const { tableObject: tableObjectPrint, tableMethods } = useTable({
@ -335,13 +351,21 @@ const getLabelDetailPage = async (row, useToPackingNumber) => {
// //
const { getList: getListPrint } = tableMethods const { getList: getListPrint } = tableMethods
await getListPrint() await getListPrint()
console.log('tableObjectPrint', tableObjectPrint)
tableObject.loading = false tableObject.loading = false
const tableColumns = SupplierdeliverRequestPackage.allSchemas.tableFormColumns const tableColumns = SupplierdeliverRequestPackage.allSchemas.tableFormColumns
tableColumns.forEach((item) => { tableColumns.forEach((item) => {
item.width = item.table?.width || 150 item.width = item.table?.width || 150
}) })
searchTableRef.value.openData('标签信息', tableObjectPrint, { tableColumns }, true) detatableData1.value = tableObjectPrint.tableList
detatableData1.value.forEach(item => {
if (!item.batch) {
item.batch = formatDate(new Date(),'YYYYMMDD')
item['disabled_batch'] = false
} else {
item['disabled_batch'] = true
}
})
// searchTableRef.value.openData('', tableObjectPrint, { tableColumns }, true)
} }
// -- // --
@ -440,6 +464,49 @@ const changeTabs = (item) => {
apiPage.value = '' apiPage.value = ''
} }
} }
const footButttondata = ref([
defaultButtons.formSureBtn(null), //
defaultButtons.formCloseBtn(null) // BOM
])
const footButtonClick = async (val) => {
if (val == 'sure') {
const validateForm = await labelPointFormRef.value.tableFormRef.validateForm()
// console.log(11,detatableData1.value)
if (!validateForm) {
return
}
pointLabel()
} else if (val == 'close') {
labelPointFormRef.value.dialogVisible = false
}
}
const pointLabel = async () => {
// const array =detatableData1.value.map(item=>{
// return {
// packingNumber:item.number,
// batch: item.batch,
// printQty:item.printQty,
// }
// })
const obj = {
itemCode:detatableData1.value[0].itemCode,
packingNumber:detatableData1.value[0].number,
batch:detatableData1.value[0].batch,
printQty:detatableData1.value[0].printQty,
}
// const isHave = detatableData1.value.find(item => parseFloat(item.printQty) <= 0)
if(!parseFloat(obj.printQty) ){
message.error(`物料号${obj.itemCode}打印数量不可以为0`)
return;
}
await PackageApi.batchPrintingLableGet(obj).then(res => {
const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken())
window.open(src.value+'&asn_number='+res)
}).catch(err => {
console.log(err)
message.error('创建标签失败')
})
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()

6
src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/inventoryinitRequestMain.data.ts

@ -914,9 +914,11 @@ export const InventoryinitRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
}, },
form: { form: {
componentProps: { componentProps: {
disabled:true
} }
}, },
tableForm: { tableForm: {
disabled: true
} }
}, },
// { // {
@ -1223,8 +1225,8 @@ export const InventoryinitRequestDetailRules = reactive({
packUnit:[ packUnit:[
{ required: true, message: '请选择包装规格', trigger: 'change' } { required: true, message: '请选择包装规格', trigger: 'change' }
], ],
balancePackUnit:[ packQty:[
{ required: true, message: '请选择入库存包装规格', trigger: 'change' } { required: true, message: '默认包装数量不能为空', trigger: 'change' }
], ],
dataTypeLine:[{ required: true, message: '请选择是否是线边需要生成包装', trigger: 'change' }] dataTypeLine:[{ required: true, message: '请选择是否是线边需要生成包装', trigger: 'change' }]
}) })

3
src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue

@ -275,6 +275,9 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
} }
if (formField === 'projectCode') { if (formField === 'projectCode') {
setV['projectCode'] = val[0]['projectCode'] setV['projectCode'] = val[0]['projectCode']
}
if (formField === 'fromWarehouseCode' &&formRef.formModel.fromWarehouseCode != val[0]['code']) {
tableData.value = []
} }
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
formRef.setValues(setV) formRef.setValues(setV)

2
src/views/wms/productionManage/productreceipt/productreceiptJobMain/productreceiptJobMain.data.ts

@ -80,6 +80,7 @@ export const ProductreceiptJobMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'teamName', field: 'teamName',
sort: 'custom', sort: 'custom',
isTable:true, isTable:true,
isDetail:false,
table: { table: {
width: 150 width: 150
}, },
@ -98,6 +99,7 @@ export const ProductreceiptJobMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'shiftName', field: 'shiftName',
sort: 'custom', sort: 'custom',
isTable:true, isTable:true,
isDetail:false,
table: { table: {
width: 150 width: 150
}, },

2
src/views/wms/productionManage/productreceipt/productreceiptRecordMain/productreceiptRecordMain.data.ts

@ -75,6 +75,7 @@ export const ProductreceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '班组', label: '班组',
field: 'teamName', field: 'teamName',
sort: 'custom', sort: 'custom',
isDetail:false,
table: { table: {
width: 150 width: 150
}, },
@ -93,6 +94,7 @@ export const ProductreceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
label: '班次', label: '班次',
field: 'shiftName', field: 'shiftName',
sort: 'custom', sort: 'custom',
isDetail:false,
table: { table: {
width: 150 width: 150
}, },

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

@ -233,6 +233,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isDetail:false,
isForm:false, isForm:false,
sortTableDefault: 1001, sortTableDefault: 1001,
}, },
@ -273,6 +274,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
isForm:false, isForm:false,
isDetail:false,
sortTableDefault: 1001, sortTableDefault: 1001,
isSearch: true, isSearch: true,
search: { search: {
@ -1834,53 +1836,53 @@ export const ProductreceiptRequestLabel = useCrudSchemas(reactive<CrudSchema[]>(
isTable: false, isTable: false,
tableForm: { tableForm: {
disabled: true, disabled: true,
isInpuFocusShow: true, // isInpuFocusShow: true,
searchListPlaceholder: '请选择生产线代码', // searchListPlaceholder: '请选择生产线代码',
searchField: 'code', // searchField: 'code',
searchTitle: '生产线信息', // searchTitle: '生产线信息',
searchAllSchemas: Productionline.allSchemas, // searchAllSchemas: Productionline.allSchemas,
searchPage: ProductionlineApi.getProductionlinePage, // searchPage: ProductionlineApi.getProductionlinePage,
searchCondition: [{ // searchCondition: [{
key: 'available', // key: 'available',
value: 'TRUE', // value: 'TRUE',
isMainValue: false // isMainValue: false
}, { // }, {
key: 'workshopCode', // key: 'workshopCode',
value: 'workshopCode', // value: 'workshopCode',
message: '请填写车间代码!', // message: '请填写车间代码!',
isMainValue: true // isMainValue: true
}] // }]
}, },
form: { // form: {
// labelMessage: '信息提示说明!!!', // // labelMessage: '信息提示说明!!!',
componentProps: { // componentProps: {
enterSearch: true, // enterSearch: true,
isSearchList: true, // isSearchList: true,
searchListPlaceholder: '请选择生产线代码', // searchListPlaceholder: '请选择生产线代码',
searchField: 'code', // searchField: 'code',
searchTitle: '生产线信息', // searchTitle: '生产线信息',
searchAllSchemas: Productionline.allSchemas, // searchAllSchemas: Productionline.allSchemas,
searchPage: ProductionlineApi.getProductionlinePage, // searchPage: ProductionlineApi.getProductionlinePage,
searchCondition: [{ // searchCondition: [{
key: 'available', // key: 'available',
value: 'TRUE', // value: 'TRUE',
isMainValue: false // isMainValue: false
}, { // }, {
key: 'workshopCode', // key: 'workshopCode',
value: 'workshopCode', // value: 'workshopCode',
message: '请填写车间代码!', // message: '请填写车间代码!',
isMainValue: true // isMainValue: true
}], // }],
verificationParams: [{ // verificationParams: [{
key: 'code', // key: 'code',
action: '==', // action: '==',
value: '', // value: '',
isMainValue: false, // isMainValue: false,
isSearch: true, // isSearch: true,
isFormModel: true, // isFormModel: true,
}], // 失去焦点校验参数 // }], // 失去焦点校验参数
} // }
} // }
}, },
{ {
label: '供应商代码', label: '供应商代码',

73
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts

@ -1775,16 +1775,32 @@ export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive<CrudSch
}, },
])) ]))
//表单校验
export const SupplierdeliverRequestPackageRules = reactive({
batch: [
{ required: true, message: '请输入批次', trigger: 'change' },
{ max: 50, message: '不得超过50个字符', trigger: 'change' },
{ validator: validateBatch, trigger: 'change' }
],
// printQty: [
// { required: true, message: '请输入打印数量', trigger: 'blur' },
// { validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' }
// ],
})
export const SupplierdeliverRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([ export const SupplierdeliverRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([
{ // {
label: '包装号', // label: '包装号',
field: 'number', // field: 'number',
sort: 'custom', // sort: 'custom',
isSearch: true, // isSearch: true,
table: { // table: {
fixed: 'left' // },
}, // tableForm: {
}, // disabled: true
// }
// },
{ {
label: '物料代码', label: '物料代码',
field: 'itemCode', field: 'itemCode',
@ -1792,21 +1808,48 @@ export const SupplierdeliverRequestPackage = useCrudSchemas(reactive<CrudSchema[
isSearch: true, isSearch: true,
table: { table: {
}, },
tableForm: {
disabled: true
}
}, },
{ {
label: '批次', label: '批次',
field: 'batch', field: 'batch',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
tableForm: {
type: 'FormDate',
format: 'YYYYMMDD',
valueFormat: 'YYYYMMDD',
}
},
{
label: '打印数量',
field: 'printQty',
sort: 'custom',
table: { table: {
}, },
tableForm: {
type: 'InputNumber',
precision: 0,
min:0
}
}, },
{ {
label: '数量', label: '包装规格',
field: 'qty', field: 'packUnit',
sort: 'custom', sort: 'custom',
table: { tableForm: {
disabled: true
}
}, },
{
label: '标包数量',
field: 'packQty',
sort: 'custom',
tableForm: {
disabled: true
}
}, },
{ {
label: '计量单位', label: '计量单位',
@ -1815,10 +1858,14 @@ export const SupplierdeliverRequestPackage = useCrudSchemas(reactive<CrudSchema[
dictType: DICT_TYPE.UOM, dictType: DICT_TYPE.UOM,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑 dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: { form: {
component: 'SelectV2' component: 'Select'
}, },
table: { table: {
}, },
tableForm: {
type: 'Select',
disabled: true
}
}, },
])) ]))

Loading…
Cancel
Save