{search.value ? (
) : undefined}
- {screenfull.value ? (
+ {/* {screenfull.value ? (
- ) : undefined}
- {size.value ? (
+ ) : undefined} */}
+ {/* {size.value ? (
- ) : undefined}
- {locale.value ? (
+ ) : undefined} */}
+ {/* {locale.value ? (
- ) : undefined}
+ ) : undefined} */}
{message.value ? (
) : undefined}
diff --git a/src/layout/components/UserInfo/src/UserInfo.vue b/src/layout/components/UserInfo/src/UserInfo.vue
index 3c03ea7d2..3521bd443 100644
--- a/src/layout/components/UserInfo/src/UserInfo.vue
+++ b/src/layout/components/UserInfo/src/UserInfo.vue
@@ -54,7 +54,7 @@ const toDocument = () => {
-
@@ -62,7 +62,7 @@ const toDocument = () => {
- {{ t('common.profile') }}
+ {{ t('common.profile') }}
-
+
\ No newline at end of file
diff --git a/src/views/wms/issueManage/issue/issueRequestMain/index.vue b/src/views/wms/issueManage/issue/issueRequestMain/index.vue
index 568bb3152..1bb24f9f6 100644
--- a/src/views/wms/issueManage/issue/issueRequestMain/index.vue
+++ b/src/views/wms/issueManage/issue/issueRequestMain/index.vue
@@ -60,6 +60,7 @@
@searchTableSuccess="searchTableSuccess"
@submitForm="submitForm"
@onEnter="onEnter"
+ @onChange="onChange"
/>
@@ -108,7 +109,16 @@ const tableColumns = ref([...IssueRequestMain.allSchemas.tableColumns,...IssueRe
const updataTableColumns = (val) => {
tableColumns.value = val
}
-
+const onChange = async (field,value) => {
+ console.log('onChange',field,value)
+ if (field == 'workshopCode') {
+ //车间代码
+ const setV = {}
+ setV['productionLineCode'] = ''
+ setV['workStationCode'] = ''
+ formRef.value.formRef.setValues(setV)
+ }
+}
const onEnter = async (field,value) => {
if (field == 'productionLineCode') {
//生产线
@@ -168,6 +178,11 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
setV['fromWarehouseCode'] = val[0]['code']
setV['toWarehouseCode'] = val[0]['code']
}
+ if (formField == 'workshopCode') {
+ //车间代码
+ setV['productionLineCode'] = ''
+ setV['workStationCode'] = ''
+ }
if (formField == 'productionLineCode') {
//生产线
let res = await WorkstationApi.getWorkstationPage({
From b7c654d15bcdf116a8f1f16417a58ae60267cd51 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=B7=BB=E7=A0=96-JAVA=5CAdministrator?= <591141169@qq.com>
Date: Tue, 9 Jul 2024 19:52:21 +0800
Subject: [PATCH 37/38] =?UTF-8?q?BUG=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../purchasereturnRequestMain/index.vue | 288 +-
.../supplierdeliverRequestMain.data.ts | 2933 ++++++++---------
2 files changed, 1609 insertions(+), 1612 deletions(-)
diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue
index d32bddadf..d09d0bc40 100644
--- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue
+++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue
@@ -2,7 +2,10 @@
@@ -21,7 +24,8 @@
- {{ row.number }}
-
+
@@ -87,8 +91,8 @@
:detailValidate="detailValidate"
/>
-
-
+
-
+
{
tableColumns.value = val
}
-const onEnter = async (field,value)=>{
- console.log(field,value)
- if('supplierCode'==field){
+const onEnter = async (field, value) => {
+ console.log(field, value)
+ if ('supplierCode' == field) {
//供应商代码
- formRef.value.opensearchTable('purchaseReceiptRecordNumber', 'number', '采购收货记录', PurchasereceiptRecordMain1.allSchemas, PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageReturn,[{
+ formRef.value.opensearchTable(
+ 'purchaseReceiptRecordNumber',
+ 'number',
+ '采购收货记录',
+ PurchasereceiptRecordMain1.allSchemas,
+ PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageReturn,
+ [
+ {
key: 'supplierCode',
value: 'supplierCode',
isMainValue: true
- }])
- }else if('purchaseReceiptRecordNumber' == field){
+ }
+ ]
+ )
+ } else if ('purchaseReceiptRecordNumber' == field) {
//采购收货记录
}
}
@@ -171,22 +185,22 @@ const onEnter = async (field,value)=>{
// 生成标签
const isCreateLabel = ref(false)
const formLabelRef = ref()
-const { tableObject: detatableData, tableMethods: detatableMethods } =useTable({
+const { tableObject: detatableData, tableMethods: detatableMethods } = useTable({
getListApi: PurchasereturnRequestDetailApi.getPurchasereturnRequestDetailPage
})
-const { getList:getDetailList } = detatableMethods
+const { getList: getDetailList } = detatableMethods
// 生成标签按钮操作
const submitFormLabel = async (formType, submitData) => {
- let data = {...submitData}
- if(data.masterId){
+ let data = { ...submitData }
+ if (data.masterId) {
data.id = data.masterId
}
try {
- console.log("formType==",formType)
- console.log("data==",data)
+ console.log('formType==', formType)
+ console.log('data==', data)
data.subList = detatableData.tableList
- console.log("detatableData",detatableData)
+ console.log('detatableData', detatableData)
await message.confirm(t('ts.是否为此数据生成标签?'))
await PurchasereturnRequestMainApi.genLabel(data) //genLabelId.value
isCreateLabel.value = true
@@ -207,21 +221,20 @@ const searchTableSuccessLabel = (formField, searchField, val, formRef, type, row
row['packUnit'] = val[0]['packUnit']
row['packQty'] = val[0]['packQty']
}
- }
+ }
})
}
// 查询页面返回
-const searchTableSuccess = async(formField, searchField, val, formRef, type, row) => {
-
- console.log('searchTableSuccess',formField, searchField, val, formRef, type, row)
- console.log('searchTableSuccess123',val)
- nextTick( async () => {
-
+const searchTableSuccess = async (formField, searchField, val, formRef, type, row) => {
+ console.log('searchTableSuccess', formField, searchField, val, formRef, type, row)
+ console.log('searchTableSuccess123', val)
+ nextTick(async () => {
if (type == 'tableForm') {
// 明细查询页赋值
row[formField] = val[0][searchField]
- if(formField=='purchaseReceiptRecordNumber'){//搜索记录单号--回显数据
+ if (formField == 'purchaseReceiptRecordNumber') {
+ //搜索记录单号--回显数据
row['supplierCode'] = val[0]['supplierCode']
row['poNumber'] = val[0]['poNumber']
row['poLine'] = val[0]['poLine']
@@ -257,14 +270,14 @@ const searchTableSuccess = async(formField, searchField, val, formRef, type, row
row['singlePrice'] = val[0]['singlePrice']
row['amount'] = val[0]['amount']
row['projectCode'] = val[0]['projectCode']
- }else if(formField == 'itemCode'){
+ } else if (formField == 'itemCode') {
row['batch'] = val[0]['toBatch']
row['containerNumber'] = val[0]['toContainerNumber']
row['containerNumber'] = val[0]['containerNumber']
row['containerNumber'] = val[0]['containerNumber']
// row['fromLocationCode'] = val[0]['fromLocationCode']
row['toLocationCode'] = val[0]['toLocationCode']
- }else if(formField=='fromLocationCode'){
+ } else if (formField == 'fromLocationCode') {
// let params = {
// itemCode: row.itemCode,
// batch: row.batch,
@@ -273,12 +286,12 @@ const searchTableSuccess = async(formField, searchField, val, formRef, type, row
// let aa = await BalanceApi.getSumByConditions(params);
// console.log('23423423',aa);
// row['inventoryBalance'] = aa//库存余额
- }else if(formField=='packingNumber'){
- row['inventoryBalance'] = val[0]['qty']//库存余额
+ } else if (formField == 'packingNumber') {
+ row['inventoryBalance'] = val[0]['qty'] //库存余额
}
} else {
const setV = {}
- if(formField == 'purchaseReceiptRecordNumber'){
+ if (formField == 'purchaseReceiptRecordNumber') {
// isShowButton.value = false
setV[formField] = val[0][searchField]
setV['purchaseReceiptRecordNumber'] = val[0]['number']
@@ -287,9 +300,10 @@ const searchTableSuccess = async(formField, searchField, val, formRef, type, row
setV['ppNumber'] = val[0]['ppNumber']
// 获取子表数据 getBomDisassemble
// PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailList({
- PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailListToRepeat({
+ PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailListToRepeat({
masterId: val[0]['masterId']
- }).then((res) => {
+ })
+ .then((res) => {
if (res) tableData.value = res
tableData.value.forEach((item) => {
item.batch = item.toBatch
@@ -307,7 +321,7 @@ const searchTableSuccess = async(formField, searchField, val, formRef, type, row
// item.fromLocationGroupCode = item.fromLocationGroupCode
})
originTableData.value = JSON.parse(JSON.stringify(tableData.value))
-
+
PurchasereturnRequestMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'supplierCode') {
item.componentProps.disabled = true
@@ -331,11 +345,12 @@ const searchTableSuccess = async(formField, searchField, val, formRef, type, row
item.tableForm.isInpuFocusShow = false
}
})
- }).catch((err) => {
- console.log(err)
- })
+ })
+ .catch((err) => {
+ console.log(err)
+ })
}
- if(formField == 'supplierCode'){
+ if (formField == 'supplierCode') {
// isShowButton.value = true
setV['supplierCode'] = val[0]['code']
// setV['purchaseReceiptRecordNumber'] = ''
@@ -349,7 +364,7 @@ const searchTableSuccess = async(formField, searchField, val, formRef, type, row
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
- if(formField == 'poLine' || formField == 'itemCode'){
+ if (formField == 'poLine' || formField == 'itemCode') {
console.log(val)
setV['poLine'] = val[0]['poLine']
setV['poNumber'] = val[0]['poNumber']
@@ -387,7 +402,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
setV['amount'] = val[0]['amount']
setV['projectCode'] = val[0]['projectCode']
- if(formField == 'itemCode'){
+ if (formField == 'itemCode') {
setV['batch'] = val[0]['toBatch']
setV['containerNumber'] = val[0]['toContainerNumber']
setV['containerNumber'] = val[0]['containerNumber']
@@ -395,7 +410,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
// setV['fromLocationCode'] = val[0]['fromLocationCode']
// setV['toLocationCode'] = val[0]['toLocationCode']
}
- }else {
+ } else {
setV[formField] = val[0][searchField]
}
formRef.setValues(setV)
@@ -439,7 +454,7 @@ const buttonBaseClick = (val, item) => {
handleExport()
} else if (val == 'refresh') {
// 刷新
- if (tableObject.params.filters && tableObject.params.filters.length > 0 ) {
+ if (tableObject.params.filters && tableObject.params.filters.length > 0) {
searchFormClick({
filters: tableObject.params.filters
})
@@ -464,9 +479,11 @@ const isShowMainButton = (row, val) => {
}
// 列表-操作按钮
-const butttondata = (row,$index) => {
- const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
- if(findIndex>-1&&findIndex<$index){
+const butttondata = (row, $index) => {
+ const findIndex = row['masterId']
+ ? tableObject.tableList.findIndex((item) => item['masterId'] == row['masterId'])
+ : -1
+ if (findIndex > -1 && findIndex < $index) {
return []
}
return [
@@ -497,7 +514,7 @@ const butttondata = (row,$index) => {
defaultButtons.mainListEditBtn({
hide: isShowMainButton(row, ['1']),
hasPermi: 'wms:purchasereceipt-request-main:update'
- }), // 编辑
+ }) // 编辑
// {
// label: '生成标签',
// name: 'ssbq',
@@ -535,18 +552,18 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'edit') {
// 编辑
openForm('update', row)
- } else if(val == 'ssbq'){
- // 生成标签
- detatableData.params = {
- masterId:row.masterId
- }
+ } else if (val == 'ssbq') {
+ // 生成标签
+ detatableData.params = {
+ masterId: row.masterId
+ }
genLabelId.value = row.masterId
await getDetailList()
- formLabelRef.value.open('create', row, null,'createLabel')//创建标签页面 createLabel 标题
+ formLabelRef.value.open('create', row, null, 'createLabel') //创建标签页面 createLabel 标题
} else if (val == 'point') {
// 标签打印
labelPrint(row)
- }
+ }
}
/** 添加/修改操作 */
@@ -555,25 +572,25 @@ const openForm = async (type: string, row?: number) => {
originTableData.value = [] // 重置明细数据
tableData.value = [] // 重置明细数据
isShowButton.value = true
- if(type == 'create'){
+ if (type == 'create') {
PurchasereturnRequestMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'supplierCode') {
item.componentProps.disabled = true
item.componentProps.isSearchList = true
}
- if(item.field == 'purchaseReceiptRecordNumber'){
+ if (item.field == 'purchaseReceiptRecordNumber') {
item.componentProps.disabled = true
item.componentProps.isSearchList = true
}
})
}
- if(type == 'update'){
+ if (type == 'update') {
PurchasereturnRequestMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'supplierCode') {
item.componentProps.disabled = true
item.componentProps.isSearchList = false
}
- if(item.field == 'purchaseReceiptRecordNumber'){
+ if (item.field == 'purchaseReceiptRecordNumber') {
item.componentProps.disabled = true
item.componentProps.isSearchList = false
}
@@ -588,11 +605,16 @@ const { wsCache } = useCache()
const detailRef = ref()
const purchaseReceiptRecordNumberRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
- purchaseReceiptRecordNumberRef.value = row.purchaseReceiptRecordNumber;
- const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
+ purchaseReceiptRecordNumberRef.value = row.purchaseReceiptRecordNumber
+ const departmentCode = wsCache
+ .get(CACHE_KEY.DEPT)
+ .find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
- PurchasereturnRequestDetail.allSchemas.tableColumns = PurchasereturnRequestDetail.allSchemas.tableColumns.filter(item=>item.field!='inventoryBalance')
- detailRef.value.openDetail(row, titleName, titleValue,'requestPurchasereturnMain')
+ PurchasereturnRequestDetail.allSchemas.tableColumns =
+ PurchasereturnRequestDetail.allSchemas.tableColumns.filter(
+ (item) => item.field != 'inventoryBalance'
+ )
+ detailRef.value.openDetail(row, titleName, titleValue, 'requestPurchasereturnMain')
}
/** 关闭按钮操作 */
@@ -603,7 +625,8 @@ const handleClose = async (id: number) => {
await PurchasereturnRequestMainApi.closePurchasereturnRequestMain(id)
message.success(t('common.closeSuccess'))
await getList()
- } catch {}finally{
+ } catch {
+ } finally {
tableObject.loading = false
}
}
@@ -616,7 +639,8 @@ const handleReAdd = async (id: number) => {
await PurchasereturnRequestMainApi.reAddPurchasereturnRequestMain(id)
message.success(t('common.reAddSuccess'))
await getList()
- } catch {}finally{
+ } catch {
+ } finally {
tableObject.loading = false
}
}
@@ -629,7 +653,8 @@ const handleAgree = async (id: number) => {
await PurchasereturnRequestMainApi.agreePurchasereturnRequestMain(id)
message.success(t('common.agreeSuccess'))
await getList()
- } catch {}finally{
+ } catch {
+ } finally {
tableObject.loading = false
}
}
@@ -642,7 +667,8 @@ const handleRefused = async (id: number) => {
await PurchasereturnRequestMainApi.refusedPurchasereturnRequestMain(id)
message.success(t('common.refusedSuccess'))
await getList()
- } catch {}finally{
+ } catch {
+ } finally {
tableObject.loading = false
}
}
@@ -655,7 +681,8 @@ const handleHandle = async (id: number) => {
await PurchasereturnRequestMainApi.handlePurchasereturnRequestMain(id)
message.success(t('common.handleSuccess'))
await getList()
- } catch {}finally{
+ } catch {
+ } finally {
tableObject.loading = false
}
}
@@ -680,7 +707,9 @@ const handleExport = async () => {
await message.exportConfirm()
// 发起导出
exportLoading.value = true
- const data = await PurchasereturnRequestMainApi.exportPurchasereturnRequestMain(tableObject.params)
+ const data = await PurchasereturnRequestMainApi.exportPurchasereturnRequestMain(
+ tableObject.params
+ )
download.excel(data, '采购退货申请主.xlsx')
} catch {
} finally {
@@ -698,15 +727,15 @@ PurchasereturnRequestDetail.allSchemas.tableFormColumns.forEach((item) => {
const tableData = ref([])
const originTableData = ref([])
-
const searchTableRef = ref()
// 添加明细
const handleAddTable = () => {
-
- const subTableDFata = originTableData.value.filter(item=> !tableData.value.find(item1=>item1.id == item.id))
- if(subTableDFata.length==0){
+ const subTableDFata = originTableData.value.filter(
+ (item) => !tableData.value.find((item1) => item1.id == item.id)
+ )
+ if (subTableDFata.length == 0) {
message.warning('暂无可选择数据!')
- return
+ return
}
const tableObject = {
@@ -718,7 +747,7 @@ const handleAddTable = () => {
loading: false,
// 页数
pageSize: subTableDFata.length,
- params:null,
+ params: null,
// 排序
sort: {
order: '', // 排序规则
@@ -728,7 +757,7 @@ const handleAddTable = () => {
total: subTableDFata.length,
// 表格数据
tableList: subTableDFata,
- currentRow:null
+ currentRow: null
}
const tableColumns = PurchasereturnRequestDetail.allSchemas.tableFormColumns
@@ -736,7 +765,7 @@ const handleAddTable = () => {
item.width = item.table?.width || 150
})
- searchTableRef.value.openData("采购收货记录单号",tableObject,{tableColumns},true)
+ searchTableRef.value.openData('采购收货记录单号', tableObject, { tableColumns }, true)
// searchTableRef.value.open(
// ('供应商信息',
// // _searchTableAllSchemas,
@@ -750,7 +779,6 @@ const handleAddTable = () => {
// )
// )
-
// console.log(subTableDFata)
// const {tableObject, tableMethods } = useTable({
// getListApi: getPage.value // 分页接口
@@ -799,12 +827,12 @@ const handleAddTable = () => {
}
const searchTableSuccess1 = (formField, searchField, val, formRef, type, row) => {
console.log(val)
- tableData.value = [...tableData.value,...val]
+ tableData.value = [...tableData.value, ...val]
}
// 删除明细
const handleDeleteTable = (item, index, formRef) => {
let itemIndex = tableData.value.indexOf(item)
- if(itemIndex>-1){
+ if (itemIndex > -1) {
tableData.value.splice(itemIndex, 1)
}
if (tableData.value.length == 0) {
@@ -814,11 +842,10 @@ const handleDeleteTable = (item, index, formRef) => {
item.componentProps.disabled = false
}
})
-
}
}
const tableSelectionDelete = (selection) => {
- tableData.value = tableData.value.filter(item => !selection.includes(item))
+ tableData.value = tableData.value.filter((item) => !selection.includes(item))
if (tableData.value.length == 0) {
isShowButton.value = true
PurchasereturnRequestMain.allSchemas.formSchema.forEach((item) => {
@@ -837,31 +864,31 @@ const tableSelectionDelete = (selection) => {
// 主子数据 提交
const submitForm = async (formType, submitData) => {
- let data = {...submitData}
- if(data.masterId){
+ let data = { ...submitData }
+ if (data.masterId) {
data.id = data.masterId
}
- console.log('submitForm',tableData.value)
+ console.log('submitForm', tableData.value)
// if(tableData.value.find(item=>Number(item.returnedQty)>Number(item.receiptQty))){
// message.warning("退货数量不能大于收获数量")
// return;
// }
- if(tableData.value.find(item=>Number(item.qty)>Number(item.inventoryBalance))){
- message.warning("退货数量不能大于库存余额")
- return;
+ if (tableData.value.find((item) => Number(item.qty) > Number(item.inventoryBalance))) {
+ message.warning('退货数量不能大于库存余额')
+ return
}
data.subList = tableData.value // 拼接子表数据参数
try {
if (formType === 'create') {
- let flag = false;
+ let flag = false
data.subList.forEach((item) => {
- if(item.qty == 0){
- message.warning("数量不能为0")
- flag = true;
- return;
- }
+ if (item.qty == 0) {
+ message.warning('数量不能为0')
+ flag = true
+ return
+ }
})
- if(flag){
+ if (flag) {
formRef.value.formLoading = false
return
}
@@ -881,14 +908,14 @@ const submitForm = async (formType, submitData) => {
// 子表新增/编辑校验
const detailValidate = (data) => {
- let tag = false;
- if(data.qty <= 0){
+ let tag = false
+ if (data.qty <= 0) {
message.warning('数量必须大于0')
- tag = false;
- return tag;
- }else {
- tag = true;
- return tag;
+ tag = false
+ return tag
+ } else {
+ tag = true
+ return tag
}
}
@@ -918,26 +945,26 @@ const searchFormClick = (searchData) => {
getList() // 刷新当前列表
}
-const detailOpenForm = (type, row) =>{
- console.log("type",type);
- console.log("row",row);
- console.log("AAAAAA",purchaseReceiptRecordNumberRef.value);
+const detailOpenForm = (type, row) => {
+ console.log('type', type)
+ console.log('row', row)
+ console.log('AAAAAA', purchaseReceiptRecordNumberRef.value)
PurchasereturnRequestDetail.allSchemas.tableFormColumns.map((item) => {
- if(purchaseReceiptRecordNumberRef.value == ''){
+ if (purchaseReceiptRecordNumberRef.value == '') {
if (item.field == 'itemCode') {
item.form.componentProps.disabled = true
item.form.componentProps.isSearchList = true
}
- if(item.field == 'poLine'){
+ if (item.field == 'poLine') {
item.form.componentProps.disabled = true
item.form.componentProps.isSearchList = false
}
- }else{
+ } else {
if (item.field == 'itemCode') {
item.form.componentProps.disabled = true
item.form.componentProps.isSearchList = false
}
- if(item.field == 'poLine'){
+ if (item.field == 'poLine') {
item.form.componentProps.disabled = true
item.form.componentProps.isSearchList = true
}
@@ -945,7 +972,6 @@ const detailOpenForm = (type, row) =>{
})
}
-
const BASE_URL = getJmreportBaseUrl()
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
@@ -953,38 +979,40 @@ const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAcces
const showLabelRef = ref()
const labelPrint = async (row) => {
tableObject.loading = true
- const defaultParams = {'moduleName':'purchasereturn','recordNumber':row.number}
- const {tableObject:tableObjectPrint ,tableMethods} = useTable({
+ const defaultParams = { moduleName: 'purchasereturn', recordNumber: row.number }
+ const { tableObject: tableObjectPrint, tableMethods } = useTable({
defaultParams,
- getListApi: PackageApi.getLabelDetailPage // 分页接口
+ getListApi: PackageApi.getLabelDetailPage // 分页接口
})
// 获得表格的各种操作
- const { getList:getListPrint } = tableMethods
+ const { getList: getListPrint } = tableMethods
getListPrint()
tableObject.loading = false
const tableColumns = SupplierdeliverRequestPackage.allSchemas.tableFormColumns
tableColumns.forEach((item) => {
item.width = item.table?.width || 150
})
- showLabelRef.value.openData("标签信息",tableObjectPrint,{tableColumns},true)
+ showLabelRef.value.openData('标签信息', tableObjectPrint, { tableColumns }, true)
}
// 批量打印---采购收货申请
const showLabelSuccess = async (formField, searchField, val, formRef, type, row) => {
- console.log('批量打印',val)
-
- if(val.length == 0){
- message.warning("请先选择要打印的数据!")
+ console.log('批量打印', val)
+
+ if (val.length == 0) {
+ message.warning('请先选择要打印的数据!')
return
}
- await PackageApi.batchPrintingLable(val.map(item1=>item1.number).join(',')).then(res => {
+ await PackageApi.batchPrintingLable(val.map((item1) => item1.number).join(','))
+ .then((res) => {
console.log(res)
window.open(src.value + '&asn_number=' + res)
- }).catch(err => {
- console.log(err)
- message.error('创建标签失败')
- })
+ })
+ .catch((err) => {
+ console.log(err)
+ message.error('创建标签失败')
+ })
}
/** 初始化 **/
diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts
index 12e3371d4..8bdd03730 100644
--- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts
+++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts
@@ -1,5 +1,5 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
-import { dateFormatter,dateFormatter2 } from '@/utils/formatTime'
+import { dateFormatter, dateFormatter2 } from '@/utils/formatTime'
import * as SupplierApi from '@/api/wms/supplier'
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data'
import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
@@ -9,7 +9,7 @@ import { validateHanset, validateEmail } from '@/utils/validator'
import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data'
import * as ItemPackageApi from '@/api/wms/itempackage/index'
-import {validateInteger} from '@/utils/validator'
+import { validateInteger } from '@/utils/validator'
const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
@@ -21,512 +21,507 @@ const queryParams = {
const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
const requestsettingData = data?.list[0] || {}
- // 获取当前操作人的部门
+// 获取当前操作人的部门
import { useUserStore } from '@/store/modules/user'
import { TableColumn } from '@/types/table'
import { tr } from 'element-plus/es/locale'
- const userStore = useUserStore()
- const userDept = userStore.userSelfInfo.dept
- // id 转str 否则form回显匹配不到
- userDept.id = userDept.id.toString()
- const userDeptArray:any = [userDept]
+const userStore = useUserStore()
+const userDept = userStore.userSelfInfo.dept
+// id 转str 否则form回显匹配不到
+userDept.id = userDept.id.toString()
+const userDeptArray: any = [userDept]
/**
* @returns {Array} 供应商发货申请主表
*/
-export const SupplierdeliverRequestMain = useCrudSchemas(reactive([
- {
- label: '单据号',
- field: 'number',
- sort: 'custom',
- table: {
- width: 180,
- fixed: 'left'
- },
- isForm: false,
- isSearch: true,
- },
- {
- label: '供应商代码',
- field: 'supplierCode',
- sort: 'custom',
- table: {
- width: 150
- },
- sortTableDefault:2,
- isSearch: true,
- form: {
- // labelMessage: '信息提示说明!!!',
- componentProps: {
- enterSearch: true,
- isSearchList: true, // 开启查询弹窗
- searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
- searchField: 'code', // 查询弹窗赋值字段
- searchTitle: '供应商信息', // 查询弹窗标题
- searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
- searchPage: SupplierApi.getSupplierPageSCP // 查询弹窗所需分页方法
+export const SupplierdeliverRequestMain = useCrudSchemas(
+ reactive([
+ {
+ label: '单据号',
+ field: 'number',
+ sort: 'custom',
+ table: {
+ width: 180,
+ fixed: 'left'
+ },
+ isForm: false,
+ isSearch: true
+ },
+ {
+ label: '供应商代码',
+ field: 'supplierCode',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ sortTableDefault: 2,
+ isSearch: true,
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ enterSearch: true,
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择供应商代码', // 输入框占位文本
+ searchField: 'code', // 查询弹窗赋值字段
+ searchTitle: '供应商信息', // 查询弹窗标题
+ searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
+ searchPage: SupplierApi.getSupplierPageSCP // 查询弹窗所需分页方法
+ }
}
- }
- },
- {
- label: '发货单号',
- field: 'asnNumber',
- sort: 'custom',
- table: {
- width: 150
- },
- isSearch: true,
- isForm: true
- },
- {
- label: '要货计划单号',
- field: 'ppNumber',
- sort: 'custom',
- isTable:true,
- table: {
- width: 150
- },
- sortTableDefault:1,
- form: {
- // labelMessage: '信息提示说明!!!',
- componentProps: {
- dialogWidth:'1055px',//搜索出来弹窗的宽度
- isSearchList: true, // 开启查询弹窗
- searchListPlaceholder: '请选择要货计划单号', // 输入框占位文本
- searchField: 'number', // 查询弹窗赋值字段
- searchTitle: '要货计划信息', // 查询弹窗标题
- searchAllSchemas: PurchasePlanDetail.allSchemas, // 查询弹窗所需类
- searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPage, // 查询弹窗所需分页方法
- searchCondition: [
- {
- key: 'supplierCode',
- value: 'supplierCode',
- message: '请填写供应商代码!',
- isMainValue: true
- },
- {
- key: 'status',
- value: 4,
- isMainValue: false
- },
- {
- key: 'available',
- value: "TRUE",
- isMainValue: false
- }]
+ },
+ {
+ label: '发货单号',
+ field: 'asnNumber',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isSearch: true,
+ isForm: true
+ },
+ {
+ label: '要货计划单号',
+ field: 'ppNumber',
+ sort: 'custom',
+ isTable: true,
+ table: {
+ width: 150
+ },
+ sortTableDefault: 1,
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ dialogWidth: '1055px', //搜索出来弹窗的宽度
+ isSearchList: true, // 开启查询弹窗
+ searchListPlaceholder: '请选择要货计划单号', // 输入框占位文本
+ searchField: 'number', // 查询弹窗赋值字段
+ searchTitle: '要货计划信息', // 查询弹窗标题
+ searchAllSchemas: PurchasePlanDetail.allSchemas, // 查询弹窗所需类
+ searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPage, // 查询弹窗所需分页方法
+ searchCondition: [
+ {
+ key: 'supplierCode',
+ value: 'supplierCode',
+ message: '请填写供应商代码!',
+ isMainValue: true
+ },
+ {
+ key: 'status',
+ value: 4,
+ isMainValue: false
+ },
+ {
+ key: 'available',
+ value: 'TRUE',
+ isMainValue: false
+ }
+ ]
+ }
}
- }
- },
- {
- label: '联系人姓名',
- field: 'contactName',
- sort: 'custom',
- isTable:false,
- table: {
- width: 150
- },
- },
- {
- label: '联系人电话',
- field: 'contactPhone',
- sort: 'custom',
- isTable:false,
- table: {
- width: 150
- },
- },
- {
- label: '联系人电子邮件',
- field: 'contactEmail',
- sort: 'custom',
- isTable:false,
- table: {
- width: 150
- },
- },
- {
- label: '供应商发货仓库代码',
- field: 'fromWarehouseCode',
- sort: 'custom',
- isTable:false,
- table: {
- width: 150
- },
- form: {
- componentProps: {
- disbaled: true
+ },
+ {
+ label: '联系人姓名',
+ field: 'contactName',
+ sort: 'custom',
+ isTable: false,
+ table: {
+ width: 150
}
},
- isForm: true
- },
- {
- label: '到仓库代码',
- field: 'toWarehouseCode',
- sort: 'custom',
- isTable:false,
- table: {
- width: 150
- },
- isForm: false
- },
- {
- label: '到月台代码',
- field: 'toDockCode',
- sort: 'custom',
- isTable:false,
- table: {
- width: 150
- },
- isForm: false
- },
- {
- label: '时间窗口',
- field: 'timeWindow',
- sort: 'custom',
- isTable:false,
- table: {
- width: 150
- },
- isForm: false
- },
- {
- label: '计划到货时间',
- field: 'planArriveTime',
- formatter: dateFormatter,
- detail: {
- dateFormat: 'YYYY-MM-DD HH:mm:ss'
- },
- sort: 'custom',
- table: {
- width: 180
- },
- isTable:false,
- form: {
- disabled:true,
- component: 'DatePicker',
- componentProps: {
- style: { width: '100%' },
- type: 'datetime',
- dateFormat: 'YYYY-MM-DD HH:mm:ss',
- valueFormat: 'x',
+ {
+ label: '联系人电话',
+ field: 'contactPhone',
+ sort: 'custom',
+ isTable: false,
+ table: {
+ width: 150
}
},
- },
- {
- label: '承运商',
- field: 'carrierCode',
- sort: 'custom',
- isTable:false,
- table: {
- width: 150
- },
- },
- {
- label: '运输方式',
- field: 'transferMode',
- dictType: DICT_TYPE.TRANSFER_MODE,
- sort: 'custom',
- isTable:false,
- table: {
- width: 150
- },
- },
- {
- label: '车牌号',
- field: 'vehiclePlateNumber',
- sort: 'custom',
- isTable:false,
- table: {
- width: 150
- },
- },
- // {
- // label: '业务类型',
- // field: 'businessType',
- // sort: 'custom',
- // table: {
- // width: 150
- // },
- // form: {
- // value: 'SupplierDeliver',
- // componentProps: {
- // disabled: true,
- // }
- // }
- // },
- {
- label: '备注',
- field: 'remark',
- sort: 'custom',
- table: {
- width: 150
- },
- isTable: false
- },
- {
- label: '创建时间',
- field: 'createTime',
- formatter: dateFormatter,
- detail: {
- dateFormat: 'YYYY-MM-DD HH:mm:ss'
- },
- sort: 'custom',
- isTable:false,
- table: {
- width: 180
- },
- form: {
- component: 'DatePicker',
- componentProps: {
- style: { width: '100%' },
- type: 'datetime',
- dateFormat: 'YYYY-MM-DD HH:mm:ss',
- valueFormat: 'x',
+ {
+ label: '联系人电子邮件',
+ field: 'contactEmail',
+ sort: 'custom',
+ isTable: false,
+ table: {
+ width: 150
}
},
- isForm: false
- },
- {
- label: '创建者',
- field: 'creator',
- sort: 'custom',
- isTable:false,
- table: {
- width: 150
- },
- isForm: false
- },
- {
- label: '申请时间',
- field: 'requestTime',
- formatter: dateFormatter,
- detail: {
- dateFormat: 'YYYY-MM-DD HH:mm:ss'
- },
- sort: 'custom',
- isTable:false,
- table: {
- width: 180
- },
- form: {
- component: 'DatePicker',
- componentProps: {
- style: { width: '100%' },
- type: 'datetime',
- dateFormat: 'YYYY-MM-DD HH:mm:ss',
- valueFormat: 'x',
+ {
+ label: '供应商发货仓库代码',
+ field: 'fromWarehouseCode',
+ sort: 'custom',
+ isTable: false,
+ table: {
+ width: 150
+ },
+ form: {
+ componentProps: {
+ disbaled: true
+ }
+ },
+ isForm: true
+ },
+ {
+ label: '到仓库代码',
+ field: 'toWarehouseCode',
+ sort: 'custom',
+ isTable: false,
+ table: {
+ width: 150
+ },
+ isForm: false
+ },
+ {
+ label: '到月台代码',
+ field: 'toDockCode',
+ sort: 'custom',
+ isTable: false,
+ table: {
+ width: 150
+ },
+ isForm: false
+ },
+ {
+ label: '时间窗口',
+ field: 'timeWindow',
+ sort: 'custom',
+ isTable: false,
+ table: {
+ width: 150
+ },
+ isForm: false
+ },
+ {
+ label: '计划到货时间',
+ field: 'planArriveTime',
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ table: {
+ width: 180
+ },
+ isTable: false,
+ form: {
+ disabled: true,
+ component: 'DatePicker',
+ componentProps: {
+ style: { width: '100%' },
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x'
+ }
}
},
- isForm: false
- },
- {
- label: '截止时间',
- field: 'dueTime',
- formatter: dateFormatter,
- detaul: {
- dateFormat: 'YYYY-MM-DD HH:mm:ss'
- },
- sort: 'custom',
- isTable:false,
- table: {
- width: 180
- },
- form: {
- component: 'DatePicker',
- componentProps: {
- style: { width: '100%' },
- type: 'datetime',
- dateFormat: 'YYYY-MM-DD HH:mm:ss',
- valueFormat: 'x',
+ {
+ label: '承运商',
+ field: 'carrierCode',
+ sort: 'custom',
+ isTable: false,
+ table: {
+ width: 150
}
},
- isForm: false
- },
- // {
- // label: '部门',
- // field: 'departmentCode',
- // sort: 'custom',
- // table: {
- // width: 150
- // },
- // formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
- // return userDeptArray.find((account) => account.id == cellValue)?.name
- // },
- // form: {
- // value: userDept.id,
- // component: 'Select',
- // api: () => userDeptArray,
- // componentProps: {
- // disabled: true,
- // optionsAlias: {
- // labelField: 'name',
- // valueField: 'id'
- // }
- // }
- // }
- // },
- {
- label: '状态',
- field: 'status',
- dictType: DICT_TYPE.REQUEST_STATUS,
- dictClass: 'string',
- isTable: true,
- isForm:false,
- isSearch: false,
- sort: 'custom',
- table: {
- width: 150
- },
- form: {
- value: '1',
- componentProps: {
- disabled: true
+ {
+ label: '运输方式',
+ field: 'transferMode',
+ dictType: DICT_TYPE.TRANSFER_MODE,
+ sort: 'custom',
+ isTable: false,
+ table: {
+ width: 150
}
- }
- },
- {
- label: '最后更新时间',
- field: 'updateTime',
- formatter: dateFormatter,
- detail: {
- dateFormat: 'YYYY-MM-DD HH:mm:ss'
- },
- sort: 'custom',
- isTable:false,
- table: {
- width: 180
- },
- form: {
- component: 'DatePicker',
- componentProps: {
- style: { width: '100%' },
- type: 'datetime',
- dateFormat: 'YYYY-MM-DD HH:mm:ss',
- valueFormat: 'x',
+ },
+ {
+ label: '车牌号',
+ field: 'vehiclePlateNumber',
+ sort: 'custom',
+ isTable: false,
+ table: {
+ width: 150
}
},
- isForm: false
- },
- {
- label: '最后更新者',
- field: 'updater',
- sort: 'custom',
- table: {
- width: 150
- },
- isTable:false,
- isForm: false
- },
- {
- label: '自动提交',
- field: 'autoCommit',
- dictType: DICT_TYPE.TRUE_FALSE,
- dictClass: 'string',
- isTable:false,
- sort: 'custom',
- isForm:false,
- table: {
- width: 150
- },
- form: {
- component: 'Switch',
- value: requestsettingData.autoCommit,
- componentProps: {
- inactiveValue: 'FALSE',
- activeValue: 'TRUE',
- disabled: true,
+ // {
+ // label: '业务类型',
+ // field: 'businessType',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // form: {
+ // value: 'SupplierDeliver',
+ // componentProps: {
+ // disabled: true,
+ // }
+ // }
+ // },
+ {
+ label: '备注',
+ field: 'remark',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTable: false
+ },
+ {
+ label: '创建时间',
+ field: 'createTime',
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ isTable: false,
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: { width: '100%' },
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x'
+ }
+ },
+ isForm: false
+ },
+ {
+ label: '创建者',
+ field: 'creator',
+ sort: 'custom',
+ isTable: false,
+ table: {
+ width: 150
+ },
+ isForm: false
+ },
+ {
+ label: '申请时间',
+ field: 'requestTime',
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ isTable: false,
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: { width: '100%' },
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x'
+ }
+ },
+ isForm: false
+ },
+ {
+ label: '截止时间',
+ field: 'dueTime',
+ formatter: dateFormatter,
+ detaul: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ isTable: false,
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: { width: '100%' },
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x'
+ }
+ },
+ isForm: false
+ },
+ // {
+ // label: '部门',
+ // field: 'departmentCode',
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
+ // return userDeptArray.find((account) => account.id == cellValue)?.name
+ // },
+ // form: {
+ // value: userDept.id,
+ // component: 'Select',
+ // api: () => userDeptArray,
+ // componentProps: {
+ // disabled: true,
+ // optionsAlias: {
+ // labelField: 'name',
+ // valueField: 'id'
+ // }
+ // }
+ // }
+ // },
+ {
+ label: '状态',
+ field: 'status',
+ dictType: DICT_TYPE.REQUEST_STATUS,
+ dictClass: 'string',
+ isTable: true,
+ isForm: false,
+ isSearch: false,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ value: '1',
+ componentProps: {
+ disabled: true
+ }
}
- }
- },
- {
- label: '自动通过',
- field: 'autoAgree',
- dictType: DICT_TYPE.TRUE_FALSE,
- dictClass: 'string',
- isTable: false,
- sort: 'custom',
- table: {
- width: 150
- },
- isForm:false,
- form: {
- component: 'Switch',
- value: requestsettingData.autoAgree,
- componentProps: {
- inactiveValue: 'FALSE',
- activeValue: 'TRUE',
- disabled: true,
+ },
+ {
+ label: '最后更新时间',
+ field: 'updateTime',
+ formatter: dateFormatter,
+ detail: {
+ dateFormat: 'YYYY-MM-DD HH:mm:ss'
+ },
+ sort: 'custom',
+ isTable: false,
+ table: {
+ width: 180
+ },
+ form: {
+ component: 'DatePicker',
+ componentProps: {
+ style: { width: '100%' },
+ type: 'datetime',
+ dateFormat: 'YYYY-MM-DD HH:mm:ss',
+ valueFormat: 'x'
+ }
+ },
+ isForm: false
+ },
+ {
+ label: '最后更新者',
+ field: 'updater',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isTable: false,
+ isForm: false
+ },
+ {
+ label: '自动提交',
+ field: 'autoCommit',
+ dictType: DICT_TYPE.TRUE_FALSE,
+ dictClass: 'string',
+ isTable: false,
+ sort: 'custom',
+ isForm: false,
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'Switch',
+ value: requestsettingData.autoCommit,
+ componentProps: {
+ inactiveValue: 'FALSE',
+ activeValue: 'TRUE',
+ disabled: true
+ }
}
- }
- },
- {
- label: '自动执行',
- field: 'autoExecute',
- dictType: DICT_TYPE.TRUE_FALSE,
- dictClass: 'string',
- isTable: false,
- sort: 'custom',
- table: {
- width: 150
- },
- isForm:false,
- form: {
- component: 'Switch',
- value: requestsettingData.autoExecute,
- componentProps: {
- inactiveValue: 'FALSE',
- activeValue: 'TRUE',
- disabled: true,
+ },
+ {
+ label: '自动通过',
+ field: 'autoAgree',
+ dictType: DICT_TYPE.TRUE_FALSE,
+ dictClass: 'string',
+ isTable: false,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isForm: false,
+ form: {
+ component: 'Switch',
+ value: requestsettingData.autoAgree,
+ componentProps: {
+ inactiveValue: 'FALSE',
+ activeValue: 'TRUE',
+ disabled: true
+ }
}
- }
- },
- {
- label: '直接生成记录',
- field: 'directCreateRecord',
- dictType: DICT_TYPE.TRUE_FALSE,
- dictClass: 'string',
- isForm: false,
- isTable: false,
- sort: 'custom',
- table: {
- width: 150
- },
- form: {
- component: 'Switch',
- value: requestsettingData.directCreateRecord,
- componentProps: {
- inactiveValue: 'FALSE',
- activeValue: 'TRUE',
- disabled: true,
+ },
+ {
+ label: '自动执行',
+ field: 'autoExecute',
+ dictType: DICT_TYPE.TRUE_FALSE,
+ dictClass: 'string',
+ isTable: false,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isForm: false,
+ form: {
+ component: 'Switch',
+ value: requestsettingData.autoExecute,
+ componentProps: {
+ inactiveValue: 'FALSE',
+ activeValue: 'TRUE',
+ disabled: true
+ }
}
- }
- },
- {
- label: '操作',
- field: 'action',
- isDetail: false,
- isForm: false,
- table: {
- width: 450,
- fixed: 'right'
},
- }
-]))
+ {
+ label: '直接生成记录',
+ field: 'directCreateRecord',
+ dictType: DICT_TYPE.TRUE_FALSE,
+ dictClass: 'string',
+ isForm: false,
+ isTable: false,
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'Switch',
+ value: requestsettingData.directCreateRecord,
+ componentProps: {
+ inactiveValue: 'FALSE',
+ activeValue: 'TRUE',
+ disabled: true
+ }
+ }
+ },
+ {
+ label: '操作',
+ field: 'action',
+ isDetail: false,
+ isForm: false,
+ table: {
+ width: 450,
+ fixed: 'right'
+ }
+ }
+ ])
+)
//表单校验
export const SupplierdeliverRequestMainRules = reactive({
- supplierCode: [
- { required: true, message: '请输入供应商代码', trigger: 'blur' }
- ],
- ppNumber: [
- { required: true, message: '请输入要货计划单号', trigger: 'blur' }
- ],
- asnNumber: [
- { max: 50, message: '不得超过50个字符', trigger: 'blur' }
- ],
- contactName: [
- { max: 50, message: '不得超过50个字符', trigger: 'blur' }
- ],
+ supplierCode: [{ required: true, message: '请输入供应商代码', trigger: 'blur' }],
+ ppNumber: [{ required: true, message: '请输入要货计划单号', trigger: 'blur' }],
+ asnNumber: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }],
+ contactName: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }],
contactPhone: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator: validateHanset, message: '请输入正确的手机号', trigger: 'blur' }
@@ -535,36 +530,20 @@ export const SupplierdeliverRequestMainRules = reactive({
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator: validateEmail, message: '请输入正确的邮箱地址', trigger: 'blur' }
],
- carrierCode: [
- { max: 50, message: '不得超过50个字符', trigger: 'blur' }
- ],
- transferMode: [
- { max: 50, message: '不得超过50个字符', trigger: 'blur' }
- ],
- vehiclePlateNumber: [
- { max: 50, message: '不得超过50个字符', trigger: 'blur' }
- ],
- remark: [
- { max: 50, message: '不得超过50个字符', trigger: 'blur' }
- ],
- planArriveTime: [
- { required: true, message: '请输入计划到货时间', trigger: 'blur' }
- ],
+ carrierCode: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }],
+ transferMode: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }],
+ vehiclePlateNumber: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }],
+ remark: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }],
+ planArriveTime: [{ required: true, message: '请输入计划到货时间', trigger: 'blur' }],
// departmentCode: [
// { required: true, message: '请输入部门', trigger: 'blur' }
// ],
- autoCommit: [
- { required: true, message: '请选择是否自动提交', trigger: 'change' }
- ],
- autoAgree: [
- { required: true, message: '请选择是否自动通过', trigger: 'change' }
- ],
- autoExecute: [
- { required: true, message: '请选择是否自动执行', trigger: 'change' }
- ],
+ autoCommit: [{ required: true, message: '请选择是否自动提交', trigger: 'change' }],
+ autoAgree: [{ required: true, message: '请选择是否自动通过', trigger: 'change' }],
+ autoExecute: [{ required: true, message: '请选择是否自动执行', trigger: 'change' }],
directCreateRecord: [
{ required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' }
- ],
+ ]
// businessType: [
// { required: true, message: '请输入业务类型', trigger: 'blur' }
// ],
@@ -573,19 +552,42 @@ export const SupplierdeliverRequestMainRules = reactive({
/**
* @returns {Array} 供应商发货申请子表
*/
-export const SupplierdeliverRequestDetail = useCrudSchemas(reactive([
- {
- label: '采购订单号',
- field: 'poNumber',
- sort: 'custom',
- table: {
- width: 150
- },
- isSearch:true,
- form: {
- // labelMessage: '信息提示说明!!!',
- componentProps: {
- isSearchList: true,
+export const SupplierdeliverRequestDetail = useCrudSchemas(
+ reactive([
+ {
+ label: '采购订单号',
+ field: 'poNumber',
+ sort: 'custom',
+ table: {
+ width: 150
+ },
+ isSearch: true,
+ form: {
+ // labelMessage: '信息提示说明!!!',
+ componentProps: {
+ isSearchList: 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
+ }
+ ]
+ }
+ },
+ tableForm: {
+ isInpuFocusShow: true,
searchListPlaceholder: '请选择订单号',
searchField: 'number',
searchTitle: '要货计划信息',
@@ -603,494 +605,473 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive {
- const reg = /^[_a-zA-Z0-9]+$/;
+ const reg = /^[_a-zA-Z0-9]+$/
if (value == '' || value == undefined || value == null) {
- callback();
+ callback()
} else {
- if (!reg.test(value)) {
- callback(new Error('英文字母、数字或下划线'));
- } else {
- callback();
- }
+ if (!reg.test(value)) {
+ callback(new Error('英文字母、数字或下划线'))
+ } else {
+ callback()
+ }
}
}
//表单校验
@@ -1098,173 +1079,178 @@ export const SupplierdeliverRequestDetailRules = reactive({
// packingNumber: [
// { required: true, message: '请输入包装号', trigger: 'blur' }
// ],
- qty:[
- { required: true, message: '请输入发货数量', trigger: 'change' },
- ],
+ qty: [{ required: true, message: '请输入发货数量', trigger: 'change' }],
batch: [
{ required: true, message: '请输入批次', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator: validateBatch, trigger: 'change' }
],
- produceDate: [
- { required: true, message: '请输入生产日期', trigger: 'blur' }
- ],
+ produceDate: [{ required: true, message: '请输入生产日期', trigger: 'blur' }],
packQty: [
- { required: true, message: '请输入包装数量', trigger: 'blur' },
- { validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' }
- ],
- poNumber: [
- { required: true, message: '请选择订单号', trigger: 'change' }
- ],
- poLine: [
- { required: true, message: '请选择订单行', trigger: 'change' }
- ],
- packUnit: [
- { required: true, message: '请选择包装规格', trigger: 'change' }
- ],
- secondPackUnit: [
- { required: false, message: '请选择包装规格2', trigger: 'change' }
+ { required: true, message: '请输入包装数量', trigger: 'blur' }
+ // { validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' }
],
+ poNumber: [{ required: true, message: '请选择订单号', trigger: 'change' }],
+ poLine: [{ required: true, message: '请选择订单行', trigger: 'change' }],
+ packUnit: [{ required: true, message: '请选择包装规格', trigger: 'change' }],
+ secondPackUnit: [{ required: false, message: '请选择包装规格2', trigger: 'change' }],
secondPackQty: [
- { required: false, message: '请输入包装数量2', trigger: 'blur' },
- { validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' }
- ],
- convertRate: [
- { required: true, message: '请输入转换率', trigger: 'blur' }
- ],
- itemCode: [
- { required: true, message: '请选择物料代码', trigger: 'change' }
- ],
- remark: [
- { max: 50, message: '不得超过50个字符', trigger: 'blur' }
+ { required: false, message: '请输入包装数量2', trigger: 'blur' }
+ // { validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' }
],
+ convertRate: [{ required: true, message: '请输入转换率', trigger: 'blur' }],
+ itemCode: [{ required: true, message: '请选择物料代码', trigger: 'change' }],
+ remark: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }]
// secondPackQty:[{ validator:validateInteger, message: '请输入正确的整数', trigger: 'blur'}]
})
-export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive([
- {
- 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',
+export const SupplierdeliverRequestDetailLabel = useCrudSchemas(
+ reactive([
+ {
+ 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',
-
+ 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',
+ // {
+ // 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',
+ 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',
+ {
+ 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',
+ 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,
+ {
+ 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: '要货计划信息',
@@ -1282,212 +1268,212 @@ export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive([
- {
- label: '包装号',
- field: 'number',
- sort: 'custom',
- isSearch: true,
- table: {
- fixed: 'left'
- },
- },
-{
- label: '物料代码',
- field: 'itemCode',
- sort: 'custom',
- isSearch: true,
- table: {
- },
- },
-{
- label: '批次',
- field: 'batch',
- sort: 'custom',
- isSearch: true,
- table: {
- },
- },
- {
- label: '数量',
- field: 'qty',
- sort: 'custom',
- table: {
- },
- },
- {
- label: '计量单位',
- field: 'uom',
- sort: 'custom',
- dictType: DICT_TYPE.UOM,
- dictClass: 'string', // 默认都是字符串类型其他暂不考虑
- form: {
- component: 'SelectV2'
- },
- table: {
- },
- },
-
-]))
+export const SupplierdeliverRequestPackage = useCrudSchemas(
+ reactive([
+ {
+ label: '包装号',
+ field: 'number',
+ sort: 'custom',
+ isSearch: true,
+ table: {
+ fixed: 'left'
+ }
+ },
+ {
+ label: '物料代码',
+ field: 'itemCode',
+ sort: 'custom',
+ isSearch: true,
+ table: {}
+ },
+ {
+ label: '批次',
+ field: 'batch',
+ sort: 'custom',
+ isSearch: true,
+ table: {}
+ },
+ {
+ label: '数量',
+ field: 'qty',
+ sort: 'custom',
+ table: {}
+ },
+ {
+ label: '计量单位',
+ field: 'uom',
+ sort: 'custom',
+ dictType: DICT_TYPE.UOM,
+ dictClass: 'string', // 默认都是字符串类型其他暂不考虑
+ form: {
+ component: 'SelectV2'
+ },
+ table: {}
+ }
+ ])
+)
From e336d617265864740e7e6660527f5007a8da2360 Mon Sep 17 00:00:00 2001
From: wangyufei <2267742828@qq.com>
Date: Tue, 9 Jul 2024 19:57:56 +0800
Subject: [PATCH 38/38] custom-hover1
---
src/components/RouterSearch/index.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/RouterSearch/index.vue b/src/components/RouterSearch/index.vue
index 7c938dc02..f8b79ab99 100644
--- a/src/components/RouterSearch/index.vue
+++ b/src/components/RouterSearch/index.vue
@@ -17,7 +17,7 @@
/>
-->
-