Browse Source

修改生成标签页面

master_hella_20240701
zhaoxuebing 9 months ago
parent
commit
d95918786c
  1. 3
      src/locales/en-US.ts
  2. 3
      src/locales/zh-CN.ts
  3. 1
      src/utils/dict.ts
  4. 5
      src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue
  5. 26
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts
  6. 103
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue
  7. 114
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/point.vue
  8. 445
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts

3
src/locales/en-US.ts

@ -310,7 +310,8 @@ export default {
typeUpdate: 'Dict Type Eidt',
dataCreate: 'Dict Data Create',
dataUpdate: 'Dict Data Eidt',
fileUpload: 'File Upload'
fileUpload: 'File Upload',
createLabel: 'create label'
},
dialog: {
dialog: 'Dialog',

3
src/locales/zh-CN.ts

@ -309,7 +309,8 @@ export default {
typeCreate: '字典类型新增',
typeUpdate: '字典类型编辑',
dataCreate: '字典数据新增',
dataUpdate: '字典数据编辑'
dataUpdate: '字典数据编辑',
createLabel: '创建标签'
},
dialog: {
dialog: '弹窗',

1
src/utils/dict.ts

@ -275,4 +275,5 @@ export enum DICT_TYPE {
PREDICT_TIME_TYPE = 'predict_time_type', // 预测时间类型
PACK_UNIT_TYPE = 'pack_unit_type', // 包装规格类型
TRANSFER_REASON = 'transfer_reason', // 调拨出入库原因
PURCHASERECEIPT_SOURCE_TYPE="purchasereceipt_source_type",//采购收货数据来源
}

5
src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue

@ -110,13 +110,8 @@ import {
import * as UnplannedreceiptRequestMainApi from '@/api/wms/unplannedreceiptRequestMain'
import * as UnplannedreceiptRequestDetailApi from '@/api/wms/unplannedreceiptRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import {
ProductionreturnRequestDetailLabel, ProductionreturnRequestDetailLabelRules
} from "@/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data";
import * as ProductionreturnRequestDetailApi from "@/api/wms/productionreturnRequestDetail";
import * as ItembasicApi from "@/api/wms/itembasic";
import * as PackageApi from "@/api/wms/package";
import {UnplannedreceiptRequestDetailVO} from "@/api/wms/unplannedreceiptRequestDetail";
import { formatTime } from '@/utils/index'
//

26
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts

@ -143,6 +143,32 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
width: 150
},
},
{
label: '运输方式',
field: 'transferMode',
dictType: DICT_TYPE.TRANSFER_MODE,
sort: 'custom',
table: {
width: 150
},
isSearch: true,
},
{
label: '数据来源',
field: 'sourceType',
dictType: DICT_TYPE.PURCHASERECEIPT_SOURCE_TYPE,
sort: 'custom',
table: {
width: 150
},
form: {
value: 'ASN_ExternalReceipt',
componentProps: {
disabled: true
}
},
isSearch: false,
},
{
label: '从仓库代码',
field: 'fromWarehouseCode',

103
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

@ -72,7 +72,6 @@
:apiUpdate="SupplierdeliverRequestDetailApi.updateSupplierdeliverRequestDetail"
:apiPage="SupplierdeliverRequestDetailApi.getSupplierdeliverRequestDetailPage"
:apiDelete="SupplierdeliverRequestDetailApi.deleteSupplierdeliverRequestDetail"
:Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail"
/>
@ -87,8 +86,18 @@
:mode="2"
/>
<!-- 打印 -->
<point ref="pointRef" :detailListTableColumns="detailListTableColumns" />
<!-- 创建标签 -->
<BasicForm
ref="formLabelRef"
@success="getList"
:tableAllSchemas="SupplierdeliverRequestDetailLabel.allSchemas"
:tableFormRules="SupplierdeliverRequestDetailRules"
:tableData="detatableData.tableList"
:isBusiness="true"
:isShowButton="false"
@submitForm="submitFormLabel"
/>
</template>
@ -100,12 +109,12 @@ import {
SupplierdeliverRequestMain,
SupplierdeliverRequestMainRules,
SupplierdeliverRequestDetail,
SupplierdeliverRequestDetailRules
SupplierdeliverRequestDetailRules,
SupplierdeliverRequestDetailLabel,
} from './supplierdeliverRequestMain.data'
import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequestMain'
import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import point from '@/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/point.vue'
import { formatDate } from '@/utils/formatTime'
//
@ -113,7 +122,7 @@ defineOptions({ name: 'SupplierdeliverRequestMain' })
const message = useMessage() //
const { t } = useI18n() //
const genLabelId = ref();
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
@ -181,10 +190,6 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
})
}
//
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = []
const { tableObject, tableMethods } = useTable({
getListApi: SupplierdeliverRequestMainApi.getSupplierdeliverRequestMainPage //
})
@ -310,8 +315,22 @@ const buttonTableClick = async (val, row) => {
//
handleDelete(row.id)
} else if (val == 'ssbq') {
//
handlePoint(row)
await SupplierdeliverRequestMainApi.selfCheckReport(row.id).then(async (res) => {
if(!res){
message.warning("请先上传自检报告!")
return
}else{
//
detatableData.params = {
masterId:row.id
}
genLabelId.value = row.id
await getDetailList()
formLabelRef.value.open('create', row, null,'createLabel')// createLabel
}
}).catch(err => {
console.log("自检报告校验异常",err)
})
} else if (val == 'point') {
//
labelPrint(row)
@ -512,57 +531,33 @@ const handleExport = async () => {
}
}
const detailTableColumns = ref(SupplierdeliverRequestDetail.allSchemas.tableColumns)
const detailListTableColumns = detailTableColumns.value.filter(
(item) =>
item.label != '操作' &&
item.label != '创建者' &&
item.label != '创建时间' &&
item.label != '最后更新者' &&
item.label != '最后更新时间'
)
const dialogVisible = ref(false)
const isShow = ref(false)
const dialogTitle = ref('')
const closeDialog = () => {
dialogVisible.value = false
isShow.value = false
}
//
const isCreateLabel = ref(false)
const formLabelRef = ref()
const { tableObject: detatableData, tableMethods: detatableMethods } =useTable({
getListApi: SupplierdeliverRequestDetailApi.getSupplierdeliverRequestDetailPage
})
const { getList:getDetailList } = detatableMethods
/** 生成标签按钮操作 */
const genLabel = async () => {
//
const submitFormLabel = async (formType, data) => {
try {
//
console.log("data",data)
await message.confirm('是否为此数据生成标签?')
//
await SupplierdeliverRequestMainApi.genLabel(genLabelId.value)
dialogVisible.value = false
isShow.value = false
message.success(t('生成标签成功!'))
//
await getList()
} catch {}
isCreateLabel.value = true
message.success('创建标签成功')
} finally {
formLabelRef.value.formLoading = false
formLabelRef.value.dialogVisible = false
}
}
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
const genLabelId = ref()
//
const pointRef = ref()
const handlePoint = async (row) => {
await SupplierdeliverRequestMainApi.selfCheckReport(row.id).then(res => {
console.log(row.id)
if(!res){
message.warning("请先上传自检报告!")
return
}else{
pointRef.value.openPoint(row.id)
}
}).catch(err => {
console.log("自检报告校验异常",err)
})
}
//
const labelPrint = async (row) => {
window.open(src.value + '&asn_number=' + row.asnNumber)

114
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/point.vue

@ -1,114 +0,0 @@
<template>
<!-- 打印 -->
<el-dialog v-model="dialogVisiblePoint" :title="dialogTitle" width="60%">
<ContentWrap>
<Table :columns="detailListTableColumns" :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 #batch="{ row }">
<el-input v-model="row.batch">{{ row.batch }}</el-input>
</template> -->
</Table>
</ContentWrap>
<ButtonBase :Butttondata="Butttondata" @button-base-click="buttonTableClick($event)"/>
</el-dialog>
</template>
<script setup lang="ts">
import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequestMain'
import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
const props = defineProps({
//
detailListTableColumns: {
type: Array,
required: true,
default: null
},
})
//
defineOptions({ name: 'SupplierdeliverRequestMain' })
const message = useMessage() //
const { t } = useI18n() //
const Butttondata = [
{
label: '生成标签',
name: 'ssbq',
hide: false,
type: 'primary',
icon: 'ep:select',
color: '',
hasPermi: '',
link: false, //
},
defaultButtons.formCloseBtn(null) //
]
const dialogVisiblePoint = ref(false)
const { tableObject, tableMethods } = useTable({
getListApi: SupplierdeliverRequestDetailApi.getSupplierdeliverRequestDetailPage //
})
const dialogVisible = ref(false)
const isShow = ref(false)
const dialogTitle = ref('')
const closeDialog = () => {
dialogVisiblePoint.value = false
isShow.value = false
}
/** 生成标签按钮操作 */
const genLabel = async () => {
try {
//
await message.confirm('是否为此数据生成标签?')
tableObject.loading = true
//
await SupplierdeliverRequestMainApi.genLabel(genLabelId.value)
dialogVisible.value = false
isShow.value = false
message.success(t('生成标签成功!'))
dialogVisiblePoint.value = false
isShow.value = false
tableObject.loading = false
//
await getList()
} catch {
tableObject.loading = false
} finally{
tableObject.loading = false
}
}
//
const { getList } = tableMethods
const genLabelId = ref();
const openPoint = async (masterId)=>{
tableObject.params = {
masterId:masterId,
}
dialogVisiblePoint.value = true
genLabelId.value = masterId
getList()
}
defineExpose({ openPoint }) // open
// -
const buttonTableClick = async (val) => {
if (val == 'ssbq') { //
genLabel()
} else if (val == 'close') {//
closeDialog()
}
}
/** 初始化 **/
onMounted(async () => {
})
</script>

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

@ -1110,3 +1110,448 @@ export const SupplierdeliverRequestDetailRules = reactive({
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
})
export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true
}
},
{
label: '生产日期',
field: 'produceDate',
formatter: dateFormatter2,
detail: {
dateFormat: 'YYYY-MM-DD'
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
disabled:true,
style: {width: '100%'},
type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
}
},
tableForm: {
disabled:true,
type: 'FormDate',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
}
},
{
label: '替代批次',
field: 'altBatch',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
tableForm:{
disabled:true
}
},
{
label: '到货日期',
field: 'arriveDate',
formatter: dateFormatter2,
detail: {
dateFormat: 'YYYY-MM-DD'
},
sort: 'custom',
table: {
width: 180
},
isForm: false,
form: {
component: 'DatePicker',
componentProps: {
disabled:true,
style: {width: '100%'},
type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
}
},
isTableForm: false,
tableForm: {
disabled:true,
type: 'FormDate',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
}
},
{
label: '过期日期',
field: 'expireDate',
formatter: dateFormatter2,
detail: {
dateFormat: 'YYYY-MM-DD',
},
sort: 'custom',
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
disabled:true,
style: {width: '100%'},
type: 'date',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
}
},
tableForm: {
disabled:true,
type: 'FormDate',
dateFormat: 'YYYY-MM-DD',
valueFormat: 'x',
}
},
{
label: '订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
disabled:true,
isSearchList: false,
searchListPlaceholder: '请选择订单号',
searchField: 'number',
searchTitle: '要货计划信息',
searchAllSchemas: PurchasePlanDetail.allSchemas,
searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPage,
searchCondition: [
{
key: 'number',
value: 'ppNumber',
message: '请填写要货计划单号!',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
},
tableForm: {
isInpuFocusShow: false,
disabled:true,
searchListPlaceholder: '请选择订单号',
searchField: 'number',
searchTitle: '要货计划信息',
searchAllSchemas: PurchasePlanDetail.allSchemas,
searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPage,
searchCondition: [
{
key: 'number',
value: 'ppNumber',
message: '请填写要货计划单号!',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
{
label: '订单行',
field: 'poLine',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
tableForm: {
disabled: true
}
},
{
label: '订单数量',
field: 'orderQty',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
disabled: true,
min: 0,
precision: 6
}
},
tableForm: {
disabled: true,
type: 'InputNumber',
min: 0,
precision: 6
}
},
{
label: '供应商计量数量',
field: 'supplierPackQty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
disabled:true,
min: 1,
precision: 6
}
},
isTableForm: false,
isForm: false,
tableForm: {
disabled:true,
type: 'InputNumber',
min: 1,
precision: 6
}
},
{
label: '供应商计量单位',
field: 'supplierPackUnit',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false,
tableForm: {
disabled:true,
type: 'Select'
}
},
{
label: '转换率',
field: 'convertRate',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 0
}
},
isTableForm: false,
isForm: false,
tableForm: {
disabled:true,
type: 'InputNumber',
min: 0
}
},
{
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 180
},
isTableForm: false,
form: {
componentProps: {
disabled: true
}
}
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
disabled: true
}
},
tableForm: {
disabled: true
}
},
{
label: '计量单位',
field: 'uom',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isSearch: true,
isTable: true,
table: {
width: 150
},
tableForm: {
disabled:true,
type: 'Select'
}
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
disabled:true,
min: 1,
precision: 6
}
},
tableForm: {
disabled:true,
type: 'InputNumber',
min: 1,
precision: 6
}
},
{
label: '包装数量',
field: 'packQty',
sort: 'custom',
table: {
width: 150
},
form: {
componentProps: {
disabled:true,
isSearchList: false,
searchListPlaceholder: '请选择包装',
searchField: 'packQty',
searchTitle: '物品包装信息',
searchAllSchemas: Itempackaging.allSchemas,
searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
searchCondition: [
{
key: 'itemCode',
value: 'itemCode',
message: '请选择订单行',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
},
tableForm: {
isInpuFocusShow: false,
disabled:true,
searchListPlaceholder: '请选择包装',
searchField: 'packQty',
searchTitle: '物品包装信息',
searchAllSchemas: Itempackaging.allSchemas,
searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver,
searchCondition: [
{
key: 'itemCode',
value: 'itemCode',
message: '请选择订单行',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
{
label: '包装规格',
field: 'packUnit',
isTable: true,
sort: 'custom',
table: {
width: 150,
componentProps: {
disabled: true
}
},
tableForm: {
disabled: true,
}
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '物料描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '物料描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
{
label: '项目代码',
field: 'projectCode',
sort: 'custom',
table: {
width: 150
},
isTableForm: false,
isForm: false
},
]))
Loading…
Cancel
Save