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

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

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

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

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

2
src/components/rowDrop/index.vue

@ -170,7 +170,7 @@ const initSelectSta = () => {
checkedDataList.value = []
allData.value = []
//
const _showTableColumns = [...leftArr]
let _showTableColumns = [...leftArr]
//
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 [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['2','3','4']),hasPermi:'wms:relegate-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:relegate-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:relegate-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:relegate-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:relegate-request-main:agree'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:relegate-request-main:handle'}), //
defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:relegate-request-main:update' }), //
// defaultButtons.mainListDeleteBtn({ hasPermi: 'wms:relegate-request-main:delete' }), //
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:deliver-request-main:reAdd'}), //
defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:deliver-request-main:submit'}), //
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:deliver-request-main:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:deliver-request-main:agree'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:deliver-request-main:handle'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:deliver-request-main:update'}), //
// 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],
concurrencyStamp: [required],
packUnit: [required],
toLocationCode: [required]
})
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
},
form: {
labelMessage: '指包装个数',
component: 'InputNumber',
componentProps: {
style: {width:'100%'},

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

@ -431,6 +431,9 @@ export const DeliverPlanMainRules = reactive({
customerCode: [
{ required: true, message: '请选择客户代码', trigger: 'change' }
],
customerDockCode: [
{ required: true, message: '请选择客户月台', trigger: 'change' }
],
deliverType: [
{ 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',
sort: 'custom',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
search: {
component: 'DatePicker',
componentProps: {
@ -104,6 +107,9 @@ export const SaleShipmentMainRecord = useCrudSchemas(reactive<CrudSchema[]>([
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
search: {
component: 'DatePicker',
componentProps: {
@ -264,6 +270,9 @@ export const SaleShipmentDetailRecord = useCrudSchemas(reactive<CrudSchema[]>([
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
search: {
component: 'DatePicker',
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"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
<!-- 标签打印 -->
<SearchTable style="width:905px" ref="searchTableRef" @searchTableSuccess="searchTableSuccess1" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
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 ProductionreturnRequestDetailNoApi from '@/api/wms/productionreturnRequestDetailNo'
@ -473,7 +476,8 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'delete') { //
handleDelete(row.masterId)
} 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 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({
requestNumber: row.number
@ -624,20 +663,58 @@ const handlePoint = async (row) => {
}
}).catch(err => {
isCreateLabel.value = false
tableObject.loading = 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)
const defaultParams = {'moduleName':'productreceipt_predict','recordNumber':row.number}
const {tableObject:tableObjectPrint ,tableMethods} = useTable({
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 {
const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAccessToken())
window.open(src.value+'&asn_number='+row.number)
tableObject.loading = false
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 {
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' }
]
})
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"
:isOpenSearchTable="true"
fieldTableColumn="poLine"
:showSearchTableQueryFields = "['poLine']"
:rules="SupplierinvoiceRequestMainRules"
:formAllSchemas="SupplierinvoiceRequestMain.allSchemas"
:searchTableParams="searchTableParams"
@ -446,6 +447,24 @@ const handleImport = () => {
/** 添加/修改操作 */
const formRef = ref()
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'){
SupplierinvoiceRequestMainRules.invoiceTime[0].required = true
SupplierinvoiceRequestMainRules.goldenTaxInvoiceNumber[0].required = true
@ -464,6 +483,17 @@ const handleImport = () => {
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()
@ -899,6 +929,7 @@ const importSuccess = () => {
/** 初始化 **/
onMounted(async () => {
getList()
getDefaultSupplier()
importTemplateData.templateUrl = await SupplierinvoiceRequestMainApi.importTemplate()
})
</script>

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

@ -64,6 +64,25 @@ export const PurchaseReceiptOrReturnRecordDetail = useCrudSchemas(reactive<CrudS
label: '单据类型',
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: '待开票单据号',
field: 'recvBillNum',
@ -1133,7 +1152,7 @@ export const SupplierinvoiceRequestDetail = useCrudSchemas(reactive<CrudSchema[]
//仅是主列表页面的筛选搜索条件
{
label: '到货时间',
field: 'planArriveTime',
field: 'deliveryDate',
sort: 'custom',
isDetail:false,
isTable: false,

Loading…
Cancel
Save