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 7 months ago
parent
commit
adf61e25b8
  1. 11
      src/components/Annex/src/Annex.vue
  2. 27
      src/components/Detail/src/Detail.vue
  3. 2
      src/utils/validator.ts
  4. 2
      src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts
  5. 66
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue
  6. 18
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/index.vue
  7. 4
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

11
src/components/Annex/src/Annex.vue

@ -16,7 +16,8 @@
<div>{{ item.size }}KB</div>
<div>来自 {{ item.nickname }}</div>
</div>
<Icon icon="ep:delete" class="cursor-pointer" size="18" @click="deleteAnnex(item.id)" />
<Icon icon="ep:download" v-if="showDownload" class="cursor-pointer mr-2" size="18" @click="downFile(item)" />
<Icon icon="ep:delete" class="cursor-pointer" v-if="!hiddenDelete" size="18" @click="deleteAnnex(item.id)" />
</div>
<div class="time mt-6px ">{{ formatDate(item.createTime) }}</div>
</div>
@ -44,6 +45,14 @@ const props = defineProps({
type: Object,
required: true
},
showDownload: {
type: Boolean,
required: false
},
hiddenDelete: {
type: Boolean,
required: false
},
})
// emit
const emit = defineEmits(['handleAnnexSuccess', 'deleteAnnexSuccess'])

27
src/components/Detail/src/Detail.vue

@ -27,7 +27,7 @@
</ContentWrap>
<div class="flex">
<!-- 详情 -->
<ContentWrap class="w-[100%]" v-show="tabsList[current].label!=annexAliasLabel&&tabsList[current].label!='备注'&&tabsList[current].label!='变更记录'&&tabsList[current].label!='主数据'&&!annexTableData.some(item=>item.label==tabsList[current].label)"> <!-- 列表头部 -->
<ContentWrap class="w-[100%]" v-show="tabsList[current].label!=annexAlias.label&&tabsList[current].label!='备注'&&tabsList[current].label!='变更记录'&&tabsList[current].label!='主数据'&&!annexTableData.some(item=>item.label==tabsList[current].label)"> <!-- 列表头部 -->
<TableHead
v-if="!isBasic"
:HeadButttondata="HeadButttondata"
@ -103,6 +103,8 @@
<ElScrollbar ref="scrollbar" :style="{height:annexItem.hasSubDetail?'100%':(remarkHeight-40)+'px'}">
<Annex v-show="tabsList[current].label==annexItem.label"
:annexData="annexItem"
:showDownload = "annexItem.showDownload"
:hiddenDelete = "annexItem.hiddenDelete"
@handleAnnexSuccess="updateAnnexTableHandle"
@deleteAnnexSuccess="updateAnnexTableHandle"
:upData="{...remarksData.data,tableName:annexItem.tableName}"
@ -125,11 +127,13 @@
</div>
<!-- 附件/备注/变更记录 -->
<ContentWrap class="w-[100%]" v-show="tabsList[current].label==annexAliasLabel||tabsList[current].label=='备注'||tabsList[current].label=='变更记录'" :style="{height:remarkHeight+'px'}">
<ContentWrap class="w-[100%]" v-show="tabsList[current].label==annexAlias.label||tabsList[current].label=='备注'||tabsList[current].label=='变更记录'" :style="{height:remarkHeight+'px'}">
<!-- 附件组件 -->
<ElScrollbar ref="scrollbar" :style="{height:(remarkHeight-40)+'px'}">
<Annex v-show="tabsList[current].label==annexAliasLabel"
<Annex v-show="tabsList[current].label==annexAlias.label"
:annexData="annexData"
:showDownload = "annexAlias.showDownload"
:hiddenDelete = "annexAlias.hiddenDelete"
@handleAnnexSuccess="handleAnnexSuccess"
@deleteAnnexSuccess="deleteAnnexSuccess"
:upData="remarksData.data"
@ -213,11 +217,16 @@ const props = defineProps({
default: ()=>[]
},
//tab
annexAliasLabel: {
type: String,
annexAlias: {
type: Object,
required: false,
default: '附件'
default: ()=>({
label: '附件',
showDownload:false,
hiddenDelete:false
})
},
//
isBasic: {
type: Boolean,
@ -383,7 +392,7 @@ if (props.isBasic == true) {
}
const otherList = [...props.annexTable,{
label:props.annexAliasLabel,
label:props.annexAlias.label,
prop:'Annex'
},{
label:'备注',
@ -463,7 +472,9 @@ const getAnnexFileList = async (row:id) => {
tableName: item?.tableName || '',
annexList,
hasSubDetail:item.hasSubDetail||false,
subDetailTableData:item.subDetailTableData
subDetailTableData:item.subDetailTableData,
showDownload:item.showDownload||false, //
hiddenDelete:item.hiddenDelete || false, //
})
if(item?.subDetailTableData){
const { tableObject:subTableObject, tableMethods:subTableMethods } = useTable({

2
src/utils/validator.ts

@ -21,7 +21,7 @@ export function validateCode(rule, value, callback) {
//校验邮箱
export function validateEmail(rule, value, callback) {
if (value) {
const mailReg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/
const mailReg = /^([a-zA-Z0-9_-]+.)+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-]+.)+/
if (mailReg.test(value)) {
callback()
} else {

2
src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts

@ -360,7 +360,7 @@ export const PurchaseMainRules = reactive({
],
contactEmail: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator:validateEmail, message: '请输入正确的手机号', trigger: 'blur'}
{ validator:validateEmail, message: '请输入正确的邮箱格式', trigger: 'blur'}
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }

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

@ -683,13 +683,13 @@ const handleTur = async (id: number) => {
/** 处理按钮操作 */
const genRecords = async (id: number) => {
try {
await SupplierdeliverRequestMainApi.selfCheckReport(id).then(res => {
await SupplierdeliverRequestMainApi.selfCheckReport(id).then(async res => {
if(!res){
message.warning("请先上传自检报告!")
return
}else{
//
message.confirm('是否处理所选中数据?')
await message.confirm('是否处理所选中数据?')
tableObject.loading = true
//
SupplierdeliverRequestMainApi.genRecordsSupplierdeliverRequestMain(id).then(res => {
@ -760,40 +760,40 @@ const src = ref(BASE_URL + '/jmreport/view/922729953438072832?token=' + getAcces
//
const searchTableRef = ref()
const labelPrint = async (row) => {
tableObject.loading = true
const subTableDFata = await PackageApi.getLabel(row.masterId)
tableObject.loading = false
const tableObject1 = {
//
currentPage: 1,
//
exportLoading: false,
//
loading: false,
//
pageSize: subTableDFata.length,
params:null,
//
sort: {
order: '', //
prop: '' //
},
//
total: subTableDFata.length,
//
tableList: subTableDFata,
currentRow:null
}
console.log("标签打印",subTableDFata,tableObject1,SupplierdeliverRequestPackage.allSchemas)
// tableObject.loading = true
// const subTableDFata = await PackageApi.getLabel(row.masterId)
// tableObject.loading = false
// const tableObject1 = {
// //
// currentPage: 1,
// //
// exportLoading: false,
// //
// loading: false,
// //
// pageSize: subTableDFata.length,
// params:null,
// //
// sort: {
// order: '', //
// prop: '' //
// },
// //
// total: subTableDFata.length,
// //
// tableList: subTableDFata,
// currentRow:null
// }
// console.log("",subTableDFata,tableObject1,SupplierdeliverRequestPackage.allSchemas)
const tableColumns = SupplierdeliverRequestPackage.allSchemas.tableFormColumns
// const tableColumns = SupplierdeliverRequestPackage.allSchemas.tableFormColumns
tableColumns.forEach((item) => {
item.width = item.table?.width || 150
})
searchTableRef.value.openData("采购收货记录单号",tableObject1,{tableColumns},true)
// tableColumns.forEach((item) => {
// item.width = item.table?.width || 150
// })
// searchTableRef.value.openData("",tableObject1,{tableColumns},true)
// window.open(src.value + '&asn_number=' + row.asnNumber)
window.open(src.value + '&asn_number=' + row.asnNumber)
}
//
const searchTableSuccess1 = async (formField, searchField, val, formRef, type, row) => {

18
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/index.vue

@ -56,17 +56,27 @@
:annexTable="[{
label: '合同附件',
prop: 'Annex',
tableName:'contract'
tableName:'contract',
showDownload:true,
hiddenDelete:true,
},{
label: '发票附件',
prop: 'Annex',
tableName:'invoice'
tableName:'invoice',
showDownload:true,
hiddenDelete:true,
},{
label: '货运单附件',
prop: 'Annex',
tableName:'waybill'
tableName:'waybill',
showDownload:true,
hiddenDelete:true,
}]"
annexAliasLabel="其他附件"
:annexAlias="{
label:'其他附件',
showDownload:true,
hiddenDelete:true
}"
:isBasic="false"
:allSchemas="SupplierinvoiceRecordMain.allSchemas"
:detailAllSchemas="SupplierinvoiceRecordDetail.allSchemas"

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

@ -88,7 +88,9 @@
prop: 'Annex',
tableName:'waybill'
}]"
annexAliasLabel="其他附件"
:annexAlias="{
label:'其他附件'
}"
:otherHeadButttonData="[{
label: '打印明细',
name: 'printing',

Loading…
Cancel
Save