Browse Source

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

master_hella_20240701
zhaoxuebing 5 months ago
parent
commit
b026315483
  1. 7
      src/components/BasicForm/src/BasicForm.vue
  2. 15
      src/components/SearchTable/src/SearchTable.vue
  3. 2
      src/components/Table/src/Table.vue
  4. 2
      src/components/rowDrop/index.vue
  5. 16
      src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue
  6. 1
      src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/relegateRequestMain.data.ts
  7. 1
      src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts
  8. 3
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts
  9. 9
      src/views/wms/deliversettlementManage/saleShipmentMainRecord/saleShipmentMainRecord.data.ts
  10. 95
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue
  11. 55
      src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts
  12. 31
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue
  13. 21
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

7
src/components/BasicForm/src/BasicForm.vue

@ -121,7 +121,7 @@
</template> </template>
</Dialog> </Dialog>
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess" /> <SearchTable ref="searchTableRef" :showSearchTableQueryFields="showSearchTableQueryFields" @searchTableSuccess="searchTableSuccess" />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { SearchTable } from '@/components/SearchTable' import { SearchTable } from '@/components/SearchTable'
@ -309,6 +309,11 @@ const props = defineProps({
type:Function, type:Function,
required: false, required: false,
default: null default: null
},
showSearchTableQueryFields:{
type: Array,
required: false,
default: []
} }
}) })

15
src/components/SearchTable/src/SearchTable.vue

@ -1,9 +1,9 @@
<template> <template>
<Dialog :title="dialogTitle" v-model="searchDialogVisible" :width="dialogWidth" > <Dialog :title="dialogTitle" v-model="searchDialogVisible" :width="dialogWidth" >
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<!-- <ContentWrap> <ContentWrap v-if="searchQuery">
<Search :schema="searchSchema" @search="setSearchParamsRef" @reset="setSearchParamsRef" /> <Search :schema="searchSchema" @search="setSearchParamsRef" @reset="setSearchParamsRef" />
</ContentWrap> --> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
<TableHead <TableHead
@ -44,7 +44,13 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
const props = defineProps({
showSearchTableQueryFields:{
type: Array,
required: false,
default: []
}
})
const { t } = useI18n() // const { t } = useI18n() //
const message = useMessage() // const message = useMessage() //
@ -83,7 +89,7 @@ const rowRef = ref()
const allSchemasRef = ref() const allSchemasRef = ref()
const searchConditionRef = ref() const searchConditionRef = ref()
const searchTableSelectionsList = ref()// const searchTableSelectionsList = ref()//
const searchQuery = ref(false)
const openData = (titleName: any, tableObject:any ,allSchemas: any,multiple: any) => { const openData = (titleName: any, tableObject:any ,allSchemas: any,multiple: any) => {
dialogWidth.value = '80%' dialogWidth.value = '80%'
multipleBol.value = multiple multipleBol.value = multiple
@ -103,6 +109,7 @@ const openData = (titleName: any, tableObject:any ,allSchemas: any,multiple: any
tableColumns.value = allSchemas.tableColumns tableColumns.value = allSchemas.tableColumns
} }
const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, searchField: any,multiple: any, type: any, row: any, searchCondition:any , isCountRequestRe:any,isConcatDetailSchemas=false,detailSchemas: any, searchTableSelections:any) => { const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, searchField: any,multiple: any, type: any, row: any, searchCondition:any , isCountRequestRe:any,isConcatDetailSchemas=false,detailSchemas: any, searchTableSelections:any) => {
searchQuery.value = props.showSearchTableQueryFields.find(item=>item==formField)?true:false
dialogWidth.value = '80%' dialogWidth.value = '80%'
multipleBol.value = multiple multipleBol.value = multiple
HeadButttondata.value = multiple?[ HeadButttondata.value = multiple?[

2
src/components/Table/src/Table.vue

@ -315,7 +315,7 @@ export default defineComponent({
border border
} = unref(getProps) } = unref(getProps)
// //
updateSort(columns) // updateSort(columns)
return [...[renderTableExpand()], ...[renderTableSelection()]].concat( return [...[renderTableExpand()], ...[renderTableSelection()]].concat(
(columnsChildren || columns).map((v) => { (columnsChildren || columns).map((v) => {
const zhName = v.label || '';// const zhName = v.label || '';//

2
src/components/rowDrop/index.vue

@ -170,7 +170,7 @@ const initSelectSta = () => {
checkedDataList.value = [] checkedDataList.value = []
allData.value = [] allData.value = []
// //
const _showTableColumns = [...leftArr] let _showTableColumns = [...leftArr]
// //
JSON.parse(res).forEach((item, index) => { JSON.parse(res).forEach((item, index) => {
// //

16
src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue

@ -275,14 +275,14 @@ const butttondata = (row, $index) => {
return [] return []
} }
return [ return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['2','3','4']),hasPermi:'wms:relegate-request-main:close'}), // defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:deliver-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:relegate-request-main:reAdd'}), // defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:deliver-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:relegate-request-main:submit'}), // defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:deliver-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:relegate-request-main:refused'}), // defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:deliver-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:relegate-request-main:agree'}), // defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:deliver-request-main:agree'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:relegate-request-main:handle'}), // defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:deliver-request-main:handle'}), //
defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:relegate-request-main:update' }), // defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:deliver-request-main:update'}), //
// defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:relegate-request-main:delete' }), // // defaultButtons.mainListDeleteBtn({hasPermi:'wms:deliver-request-main:delete'}), //
] ]
} }

1
src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/relegateRequestMain.data.ts

@ -298,6 +298,7 @@ export const RelegateRequestDetailRules = reactive({
departmentCode: [required], departmentCode: [required],
concurrencyStamp: [required], concurrencyStamp: [required],
packUnit: [required], packUnit: [required],
toLocationCode: [required]
}) })
export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const RelegateRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([

1
src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts

@ -123,6 +123,7 @@ export const Callmaterials = useCrudSchemas(reactive<CrudSchema[]>([
width: 120 width: 120
}, },
form: { form: {
labelMessage: '指包装个数',
component: 'InputNumber', component: 'InputNumber',
componentProps: { componentProps: {
style: {width:'100%'}, style: {width:'100%'},

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

@ -431,6 +431,9 @@ export const DeliverPlanMainRules = reactive({
customerCode: [ customerCode: [
{ required: true, message: '请选择客户代码', trigger: 'change' } { required: true, message: '请选择客户代码', trigger: 'change' }
], ],
customerDockCode: [
{ required: true, message: '请选择客户月台', trigger: 'change' }
],
deliverType: [ deliverType: [
{ required: true, message: '发货库区类型不能为空', trigger: 'change' } { required: true, message: '发货库区类型不能为空', trigger: 'change' }
], ],

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

@ -37,6 +37,9 @@ export const SaleShipmentMainRecord = useCrudSchemas(reactive<CrudSchema[]>([
field: 'invoiceTime', field: 'invoiceTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -104,6 +107,9 @@ export const SaleShipmentMainRecord = useCrudSchemas(reactive<CrudSchema[]>([
field: 'createTime', field: 'createTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
@ -264,6 +270,9 @@ export const SaleShipmentDetailRecord = useCrudSchemas(reactive<CrudSchema[]>([
field: 'createTime', field: 'createTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {

95
src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue

@ -90,12 +90,15 @@
<ImportForm ref="importFormRef" url="/wms/productionreturn-request-main/hold-import" :importTemplateData="importTemplateData" <ImportForm ref="importFormRef" url="/wms/productionreturn-request-main/hold-import" :importTemplateData="importTemplateData"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" /> @success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
<!-- 标签打印 -->
<SearchTable style="width:905px" ref="searchTableRef" @searchTableSuccess="searchTableSuccess1" />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { ProductionreturnRequestMain,ProductionreturnRequestMainRules } from '../productionreturnRequestMain/productionreturnRequestMain.data' import { ProductionreturnRequestMain,ProductionreturnRequestMainRules } from '../productionreturnRequestMain/productionreturnRequestMain.data'
import { ProductionreturnRequestDetail,ProductionreturnRequestDetailRules, ProductionreturnRequestDetailNoLabel, ProductionreturnRequestDetailNoLabelRules } from './productionreturnRequestMainNo.data' import { ProductionreturnRequestDetail,ProductionreturnRequestDetailRules, ProductionreturnRequestDetailNoLabel, ProductionreturnRequestDetailNoLabelRules,SupplierdeliverRequestPackage } from './productionreturnRequestMainNo.data'
import * as ProductionreturnRequestMainNoApi from '@/api/wms/productionreturnRequestMainNo' import * as ProductionreturnRequestMainNoApi from '@/api/wms/productionreturnRequestMainNo'
import * as ProductionreturnRequestDetailNoApi from '@/api/wms/productionreturnRequestDetailNo' import * as ProductionreturnRequestDetailNoApi from '@/api/wms/productionreturnRequestDetailNo'
@ -473,7 +476,8 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.masterId) handleDelete(row.masterId)
} else if (val == 'point') { // } else if (val == 'point') { //
handlePoint(row) // handlePoint(row)
labelPrint(row)
} }
} }
@ -607,7 +611,42 @@ const submitFormLabel = async (formType, data) => {
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL
// //
const handlePoint = async (row) => { // const handlePoint = async (row) => {
// //
// await PackageApi.getPackagePage({
// requestNumber: row.number
// }).then((res) => {
// if(res.list.length > 0) {
// isCreateLabel.value = true
// if (res.list[0].productionLineCode != null) {
// labelType.value = 'zz'
// } else {
// labelType.value = 'cg'
// }
// } else {
// isCreateLabel.value = false
// }
// }).catch(err => {
// isCreateLabel.value = false
// console.log(err)
// })
// //
// if (isCreateLabel.value) {
// if (labelType.value == 'cg') {
// const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken())
// window.open(src.value+'&asn_number='+row.number)
// } else {
// const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
// window.open(src.value+'&asn_number='+row.number)
// }
// } else {
// message.warning('')
// }
// }
const searchTableRef = ref()
const labelPrint = async (row) => {
tableObject.loading = true
// //
await PackageApi.getPackagePage({ await PackageApi.getPackagePage({
requestNumber: row.number requestNumber: row.number
@ -624,20 +663,58 @@ const handlePoint = async (row) => {
} }
}).catch(err => { }).catch(err => {
isCreateLabel.value = false isCreateLabel.value = false
tableObject.loading = false
console.log(err) console.log(err)
}) })
// //
if (isCreateLabel.value) { if (isCreateLabel.value) {
if (labelType.value == 'cg') { const defaultParams = {'moduleName':'productreceipt_predict','recordNumber':row.number}
const src = ref(BASE_URL + '/jmreport/view/922734157577715712?token=' + getAccessToken()) const {tableObject:tableObjectPrint ,tableMethods} = useTable({
window.open(src.value+'&asn_number='+row.number) defaultParams,
getListApi: PackageApi.getLabelDetailPage //
})
//
const { getList:getListPrint } = tableMethods
getListPrint()
tableObject.loading = false
const tableColumns = SupplierdeliverRequestPackage.allSchemas.tableFormColumns
tableColumns.forEach((item) => {
item.width = item.table?.width || 150
})
searchTableRef.value.openData("标签信息",tableObjectPrint,{tableColumns},true)
} else { } else {
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken()) tableObject.loading = false
window.open(src.value+'&asn_number='+row.number) message.warning('请先创建标签')
}
} }
// --退
const searchTableSuccess1 = async (formField, searchField, val, formRef, type, row) => {
console.log('批量打印',val)
// let rows:any = []
// val.forEach(item=>{
// rows = [...rows,...item.selectionRows.map(item1=>item1.number)]
// })
if(val.length == 0){
message.warning("请先选择要打印的数据!")
return
}
// window.open(src.value + '&asn_number=' + val.map(item1=>item1.number).join(','))
await PackageApi.batchPrintingLable(val.map(item1=>item1.number).join(',')).then(res => {
console.log(res)
if (labelType.value == 'cg') {
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
window.open(src.value+'&asn_number='+res)
} else { } else {
message.warning('请先创建标签') const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
window.open(src.value+'&asn_number='+res)
} }
}).catch(err => {
console.log(err)
message.error('创建标签失败')
})
} }
/** 导入 */ /** 导入 */

55
src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/productionreturnRequestMainNo.data.ts

@ -847,3 +847,58 @@ export const ProductionreturnRequestDetailNoLabelRules = reactive({
{ required: true, message: '请输入批次', trigger: 'blur' } { required: true, message: '请输入批次', trigger: 'blur' }
] ]
}) })
export const SupplierdeliverRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '包装号',
field: 'number',
sort: 'custom',
isSearch: true,
table: {
width: 180,
fixed: 'left'
},
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
table: {
width: 150,
},
},
{
label: '批次',
field: 'batch',
sort: 'custom',
isSearch: true,
table: {
width: 150,
},
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150,
},
},
{
label: '计量单位',
field: 'uom',
sort: 'custom',
dictType: DICT_TYPE.UOM,
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
form: {
component: 'SelectV2'
},
table: {
width: 150,
},
},
]))

31
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

@ -46,6 +46,7 @@
@success="getList" @success="getList"
:isOpenSearchTable="true" :isOpenSearchTable="true"
fieldTableColumn="poLine" fieldTableColumn="poLine"
:showSearchTableQueryFields = "['poLine']"
:rules="SupplierinvoiceRequestMainRules" :rules="SupplierinvoiceRequestMainRules"
:formAllSchemas="SupplierinvoiceRequestMain.allSchemas" :formAllSchemas="SupplierinvoiceRequestMain.allSchemas"
:searchTableParams="searchTableParams" :searchTableParams="searchTableParams"
@ -446,6 +447,24 @@ const handleImport = () => {
/** 添加/修改操作 */ /** 添加/修改操作 */
const formRef = ref() const formRef = ref()
const openForm = async (type : string, row ?: number) => { const openForm = async (type : string, row ?: number) => {
if(type=='update'){
SupplierinvoiceRequestMain.allSchemas.formSchema.forEach((item) => {
if(item.field == 'orderType'){
item.componentProps.disabled = true
}
})
}else{
SupplierinvoiceRequestMain.allSchemas.formSchema.forEach((item) => {
if(item.field == 'orderType'){
item.componentProps.disabled = false
}
if(item.field == 'supplierCode'){
//
item.value = defaultSupplierCode.value
}
})
}
if(row && row.status == '8'){ if(row && row.status == '8'){
SupplierinvoiceRequestMainRules.invoiceTime[0].required = true SupplierinvoiceRequestMainRules.invoiceTime[0].required = true
SupplierinvoiceRequestMainRules.goldenTaxInvoiceNumber[0].required = true SupplierinvoiceRequestMainRules.goldenTaxInvoiceNumber[0].required = true
@ -464,6 +483,17 @@ const handleImport = () => {
formRef.value.open(type, row) formRef.value.open(type, row)
}) })
} }
const defaultSupplierCode = ref('')
const getDefaultSupplier = async ()=>{
let supplier = await SupplierApi.getSupplierPageSCP({isSearch:false})
if(supplier.list&&supplier.list.length>0){
defaultSupplierCode.value = supplier.list[0]['code']
}else{
defaultSupplierCode.value = ''
}
console.log('defaultSupplierCode',defaultSupplierCode)
}
// //
const { wsCache } = useCache() const { wsCache } = useCache()
@ -899,6 +929,7 @@ const importSuccess = () => {
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()
getDefaultSupplier()
importTemplateData.templateUrl = await SupplierinvoiceRequestMainApi.importTemplate() importTemplateData.templateUrl = await SupplierinvoiceRequestMainApi.importTemplate()
}) })
</script> </script>

21
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

@ -64,6 +64,25 @@ export const PurchaseReceiptOrReturnRecordDetail = useCrudSchemas(reactive<CrudS
label: '单据类型', label: '单据类型',
field: 'billType' field: 'billType'
}, },
{
label: '收货日期',
field: 'deliveryDate',
sort: 'custom',
isDetail:false,
isTable: true,
isForm:false,
isTableForm:false,
isSearch:true,
formatter: dateFormatter,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD',
type: 'daterange',
defaultTime: [new Date('1 '), new Date('1 ')]
}
},
},
{ {
label: '待开票单据号', label: '待开票单据号',
field: 'recvBillNum', field: 'recvBillNum',
@ -1133,7 +1152,7 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
//仅是主列表页面的筛选搜索条件 //仅是主列表页面的筛选搜索条件
{ {
label: '到货时间', label: '到货时间',
field: 'planArriveTime', field: 'deliveryDate',
sort: 'custom', sort: 'custom',
isDetail:false, isDetail:false,
isTable: false, isTable: false,

Loading…
Cancel
Save