diff --git a/src/api/part/externalLabelTemplate.js b/src/api/part/externalLabelTemplate.js new file mode 100644 index 0000000..bf52459 --- /dev/null +++ b/src/api/part/externalLabelTemplate.js @@ -0,0 +1,6 @@ +import {createAPI} from '../../utils/httpRequest' + +export const queryExternalLabelTemplate = (data) => createAPI('/part/template', 'post', data) + + +export const queryExternalLabelTemplateByPosition = (data) => createAPI('/part/template/position', 'post', data) diff --git a/src/api/part/externalPartPicture.js b/src/api/part/externalPartPicture.js index 1b0195a..bbfd3f6 100644 --- a/src/api/part/externalPartPicture.js +++ b/src/api/part/externalPartPicture.js @@ -11,3 +11,5 @@ export const updateExternalPartPicture = (data)=>createAPI(`/part/picture/update export const removeExternalPartPicture = (data)=>createAPI(`/part/picture/remove`,'post',data) export const removeBatchExternalPartPicture = (data)=>createAPI(`/part/picture/remove/batch`,'post',data) + +export const saveProductExternalPartPicturePart = (data)=>createAPI(`/part/picture/save/product`,'post',data) diff --git a/src/assets/scss/global.scss b/src/assets/scss/global.scss index 2b2b866..9f79ec4 100644 --- a/src/assets/scss/global.scss +++ b/src/assets/scss/global.scss @@ -455,3 +455,7 @@ a:hover{ height: 100% !important; } +.auto .el-form-item__content{ + height: auto; + line-height: 1.5; +} diff --git a/src/views/modules/label/printer.vue b/src/views/modules/label/printer.vue index 294f7c8..0642594 100644 --- a/src/views/modules/label/printer.vue +++ b/src/views/modules/label/printer.vue @@ -22,6 +22,7 @@ import {savePrintRollLabelRecord} from '../../../api/label/printRollLabelRecord' import {print_roll_label} from '../../../printFormat/roll_label' import {saveLogisticLabelRecord} from '../../../api/label/LogisticLabelRecord' import {printLogisticLabel} from '../../../printFormat/logisticLabel' +import {queryExternalLabelTemplate} from '../../../api/part/externalLabelTemplate' const printer = { customerNo: '', @@ -43,6 +44,8 @@ const printer = { qtyPerRoll: 0, rollsPerCarton: 0, orderNo: '', + templateNo:'', + printLabelType:'', } export default { name: 'printer', @@ -548,6 +551,7 @@ export default { customerNo:'', }, logisticVisible:false, + templateList:[], } }, watch:{ @@ -685,6 +689,31 @@ export default { if (this.currentPart.moldCodeRequired === 'Y'){ this.printCurrentPart.moldCode = this.currentPart.moldCode; } + if (this.printCurrentPart.category === 'Alpha/Hard Tag-Serials'){ + this.$set(this.printCurrentPart,'printLabelType','Carton Label') + this.handleQueryTemplate(); + } + this.handleQueryCategory(); + }, + handleQueryTemplate(){ + let params = { + + } + this.templateList = []; + queryExternalLabelTemplate(params).then(({data})=>{ + if (data && data.code === 0){ + this.templateList = data.rows; + if (this.templateList.length > 0){ + this.$set(this.printCurrentPart,'templateNo',this.templateList[0].templateNo) + } + }else { + this.$message.warning(data.msg) + } + }).catch((error)=>{ + this.$message.error(error) + }) + }, + handleQueryCategory(){ // 获取 category let params = { categoryValue: this.currentPart.category, @@ -1180,7 +1209,7 @@ export default { Print-Carton Label - Print-Roll Label + Print-Roll Label Print Logistic Label @@ -1322,6 +1351,23 @@ export default { + + + + + + + + + + + + + + + + +
Print diff --git a/src/views/modules/label/record.vue b/src/views/modules/label/record.vue index 0092aa9..74f80f3 100644 --- a/src/views/modules/label/record.vue +++ b/src/views/modules/label/record.vue @@ -369,6 +369,7 @@ export default { username:this.$store.state.user.name, boxNo:item.boxNo, category:item.category, + pictureClassIfy:'BoxPicture' } }) let {data} = await selectLabelFormatUserDefaultPrintListByUserId(params) diff --git a/src/views/modules/part/external.vue b/src/views/modules/part/external.vue index 2b25772..69c98ac 100644 --- a/src/views/modules/part/external.vue +++ b/src/views/modules/part/external.vue @@ -18,6 +18,7 @@ import {Decimal} from 'decimal.js' import {getCategoryList} from '../../../api/category/category' import {countryList} from '../../../api/dict/country' import {getSiteDetail} from '../../../api/factory/site' +import LabelTemplate from './template/labelTemplate.vue' let part = { site:'', @@ -39,7 +40,7 @@ let part = { } export default { name: "ExternalPart", - components: {LinkedManufacturer, LinkedCustomer, PictureModule}, + components: {LabelTemplate, LinkedManufacturer, LinkedCustomer, PictureModule}, props:{ height:{ type:Number, @@ -801,6 +802,7 @@ export default { let params = { partNo: this.currentPart.partNo, site: this.currentPart.site, + pictureClassify:'BoxPicture', } getExternalPartPictureList(params).then(({data})=>{ if (data && data.code === 0){ @@ -1286,6 +1288,9 @@ export default { + + + diff --git a/src/views/modules/part/picture/picture.vue b/src/views/modules/part/picture/picture.vue index 935c797..68c07f0 100644 --- a/src/views/modules/part/picture/picture.vue +++ b/src/views/modules/part/picture/picture.vue @@ -108,6 +108,7 @@ export default { item.partNo = this.part.partNo item.site = this.part.site item.createBy = this.$store.state.user.name + item.pictureClassify = 'BoxPicture' return item }) saveBatchExternalPartPicture(pictureList).then(({data})=>{ @@ -323,7 +324,7 @@ export default { - + diff --git a/src/views/modules/part/template/labelTemplate.vue b/src/views/modules/part/template/labelTemplate.vue new file mode 100644 index 0000000..e699a9a --- /dev/null +++ b/src/views/modules/part/template/labelTemplate.vue @@ -0,0 +1,254 @@ + + + + +