From 4d354f7f02a60c7cec13e718a1f2ca0d72fc0686 Mon Sep 17 00:00:00 2001
From: qiezi <15576055375@163.com>
Date: Mon, 18 Nov 2024 10:03:41 +0800
Subject: [PATCH] 20241115
---
.../manufacturer/manufacturerInformation.vue | 142 +-
src/views/modules/part/external.vue | 1443 +++++++++--------
.../part/manufacturer/linkedManufacturer.vue | 12 +-
3 files changed, 815 insertions(+), 782 deletions(-)
diff --git a/src/views/modules/manufacturer/manufacturerInformation.vue b/src/views/modules/manufacturer/manufacturerInformation.vue
index 0765609..4939b3a 100644
--- a/src/views/modules/manufacturer/manufacturerInformation.vue
+++ b/src/views/modules/manufacturer/manufacturerInformation.vue
@@ -16,15 +16,15 @@
Query
- New
+ New
-
+ @row-dblclick="handleRowClick"
+ style="width: 100%;margin-top: 5px">
{{ scope.row[item.columnProp] }}
-
+
Edit
@@ -72,7 +74,7 @@
-
+
Active
@@ -100,12 +102,23 @@ import {
manufacturerInformationEdit, // 制造商信息编辑
manufacturerInformationDelete // 制造商信息删除
} from '@/api/manufacturer/manufacturerInformation.js'
-import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
+import {getTableDefaultListLanguage, getTableUserListLanguage} from '@/api/table.js'
import Chooselist from '@/views/modules/common/Chooselist'
+
export default {
+ name: 'Manufacturer',
components: {
Chooselist
},
+ props:{
+ componentHeight: {
+ type: Number,
+ },
+ isComponent:{
+ type: Boolean,
+ default: false
+ },
+ },
watch: {
searchData: {
deep: true,
@@ -118,7 +131,7 @@ export default {
handler: function (newV, oldV) {
this.modalData.manufacturerNo = this.modalData.manufacturerNo.toUpperCase()
}
- }
+ },
},
data () {
return {
@@ -164,11 +177,11 @@ export default {
userId: this.$store.state.user.name,
functionId: 601008,
serialNumber: '601008Table1ManufacturerId',
- tableId: "601008Table1",
- tableName: "制造商信息表",
+ tableId: '601008Table1',
+ tableName: '制造商信息表',
columnProp: 'manufacturerNo',
- headerAlign: "center",
- align: "center",
+ headerAlign: 'center',
+ align: 'center',
columnLabel: 'Manufacturer No',
columnHidden: false,
columnImage: false,
@@ -176,17 +189,17 @@ export default {
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 120
+ columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 601008,
serialNumber: '601008Table1ManufacturerName',
- tableId: "601008Table1",
- tableName: "制造商表",
+ tableId: '601008Table1',
+ tableName: '制造商表',
columnProp: 'manufacturerName',
- headerAlign: "center",
- align: "left",
+ headerAlign: 'center',
+ align: 'left',
columnLabel: 'Manufacturer Name',
columnHidden: false,
columnImage: false,
@@ -194,7 +207,7 @@ export default {
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 300
+ columnWidth: 120
},
{
functionId: 601008,
@@ -211,7 +224,7 @@ export default {
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 100
+ columnWidth: 80
},
{
userId: this.$store.state.user.name,
@@ -229,17 +242,17 @@ export default {
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 170
+ columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 601008,
serialNumber: '601008Table1CreateBy',
- tableId: "601008Table1",
- tableName: "制造商表",
+ tableId: '601008Table1',
+ tableName: '制造商表',
columnProp: 'createBy',
- headerAlign: "center",
- align: "center",
+ headerAlign: 'center',
+ align: 'center',
columnLabel: 'Created By',
columnHidden: false,
columnImage: false,
@@ -247,17 +260,17 @@ export default {
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 100
+ columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 601008,
serialNumber: '601008Table1UpdateDate',
- tableId: "601008Table1",
- tableName: "制造商表",
+ tableId: '601008Table1',
+ tableName: '制造商表',
columnProp: 'updateDate',
- headerAlign: "center",
- align: "center",
+ headerAlign: 'center',
+ align: 'center',
columnLabel: 'Updated Time',
columnHidden: false,
columnImage: false,
@@ -265,17 +278,17 @@ export default {
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 170
+ columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 601008,
serialNumber: '601008Table1UpdateBy',
- tableId: "601008Table1",
- tableName: "制造商表",
+ tableId: '601008Table1',
+ tableName: '制造商表',
columnProp: 'updateBy',
- headerAlign: "center",
- align: "center",
+ headerAlign: 'center',
+ align: 'center',
columnLabel: 'Updated By',
columnHidden: false,
columnImage: false,
@@ -283,25 +296,25 @@ export default {
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 100
+ columnWidth: 80
},
],
rules: {
- manufacturerNo:[
+ manufacturerNo: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
- manufacturerName:[
+ manufacturerName: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
- active:[
+ active: [
{
required: true,
message: ' ',
@@ -328,9 +341,11 @@ export default {
created () {
// 动态列
- this.getTableUserColumn(this.$route.meta.menuId+'table1',1)
- // 获取数据列表
- this.getDataList()
+ if (!this.isComponent){
+ this.getTableUserColumn(this.$route.meta.menuId + 'table1', 1)
+ }
+ // 获取数据列表
+ this.getDataList();
},
methods: {
@@ -349,34 +364,34 @@ export default {
},
//导出excel
- async createExportData() {
+ async createExportData () {
this.searchData.limit = -1
this.searchData.page = 1
await manufacturerInformationSearch(this.searchData).then(({data}) => {
- this.exportList= data.page.list
+ this.exportList = data.page.list
})
return this.exportList
},
- startDownload() {
+ startDownload () {
},
- finishDownload() {
+ finishDownload () {
},
fields () {
- let json = "{"
+ let json = '{'
this.columnList.forEach((item, index) => {
if (index == this.columnList.length - 1) {
- json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
+ json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
} else {
- json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
+ json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ','
}
})
- json += "}"
- let s = eval("(" + json + ")")
+ json += '}'
+ let s = eval('(' + json + ')')
return s
},
@@ -397,7 +412,7 @@ export default {
addModal () {
this.modalData = {
flag: '1',
- title: 'Manufacturer Addition',
+ title: 'Manufacturer',
site: this.$store.state.user.site,
manufacturerNo: '',
manufacturerName: '',
@@ -415,7 +430,7 @@ export default {
updateModal (row) {
this.modalData = {
flag: '2',
- title: 'Manufacturer Editor',
+ title: 'Manufacturer',
site: row.site,
id: row.id,
manufacturerNo: row.manufacturerNo,
@@ -485,7 +500,7 @@ export default {
},
// 动态列开始 获取 用户保存的 格式列
- async getTableUserColumn(tableId, columnId) {
+ async getTableUserColumn (tableId, columnId) {
let queryTableUser = {
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
@@ -498,7 +513,7 @@ export default {
switch (columnId) {
case 1:
this.columnList = data.rows
- break;
+ break
}
} else {
this.getColumnList(tableId, columnId)
@@ -508,7 +523,7 @@ export default {
// 获取 tableDefault 列
async getColumnList (tableId, columnId) {
- let queryTable= {
+ let queryTable = {
functionId: this.$route.meta.menuId,
tableId: tableId,
languageCode: this.$i18n.locale
@@ -518,7 +533,7 @@ export default {
switch (columnId) {
case 1:
this.columnList = data.rows
- break;
+ break
}
}
})
@@ -526,17 +541,21 @@ export default {
//获取按钮的权限数据
getButtonAuthData () {
- let searchFlag = this.isAuth(this.menuId+":search")
- let saveFlag = this.isAuth(this.menuId+":save")
- let updateFlag = this.isAuth(this.menuId+":update")
- let deleteFlag = this.isAuth(this.menuId+":delete")
+ let searchFlag = this.isAuth(this.menuId + ':search')
+ let saveFlag = this.isAuth(this.menuId + ':save')
+ let updateFlag = this.isAuth(this.menuId + ':update')
+ let deleteFlag = this.isAuth(this.menuId + ':delete')
//处理页面的权限数据
this.authSearch = !searchFlag
this.authSave = !saveFlag
this.authUpdate = !updateFlag
this.authDelete = !deleteFlag
},
-
+ handleRowClick(row){
+ if (this.isComponent){
+ this.$emit('rowClick', row)
+ }
+ }
}
}
@@ -544,6 +563,5 @@ export default {
diff --git a/src/views/modules/part/external.vue b/src/views/modules/part/external.vue
index 88d8c6c..da769e2 100644
--- a/src/views/modules/part/external.vue
+++ b/src/views/modules/part/external.vue
@@ -21,81 +21,79 @@ import {getSiteDetail} from '../../../api/factory/site'
import LabelTemplate from './template/labelTemplate.vue'
let part = {
- site:'',
- partNo:'',
- partDesc:'',
- umId:'',
- freeInfo:'',
- freeInfo2:'',
- rev:'',
- active:'',
- tradingMark:'N',
- packingWeight:undefined,
- weightUmId:undefined,
- moldCode:'',
- category:'',
- qtyPerCarton:0,
- qtyPerRoll:0,
- rollsPerCarton:0,
- printStr1:'',
- printStr2:'',
- printStr3:'',
+ site: '',
+ partNo: '',
+ partDesc: '',
+ umId: '',
+ freeInfo: '',
+ freeInfo2: '',
+ rev: '',
+ active: '',
+ tradingMark: 'N',
+ packingWeight: undefined,
+ weightUmId: undefined,
+ moldCode: '',
+ category: '',
+ qtyPerCarton: 0,
+ qtyPerRoll: 0,
+ rollsPerCarton: 0,
+ printStr1: '',
+ printStr2: '',
+ printStr3: '',
}
export default {
- name: "ExternalPart",
+ name: 'ExternalPart',
components: {LabelTemplate, LinkedManufacturer, LinkedCustomer, PictureModule},
- props:{
- height:{
- type:Number,
+ props: {
+ height: {
+ type: Number,
default: 310
},
ofComponents: {
- type:Boolean,
+ type: Boolean,
default: false
}
},
- data(){
- return{
- no:1,
- size:50,
- total:0,
+ data () {
+ return {
+ no: 1,
+ size: 50,
+ total: 0,
part: {
...part
},
- savePart:{
+ savePart: {
...part,
- active:'Y',
+ active: 'Y',
},
- partCategoryList:[
-
- ],
- category:{},
- partRules:{
- partNo: [{ required: true, message: 'Please input Part No', trigger: ['blur','change'] }],
- partDesc: [{ required: true, message: 'Please input Part Description', trigger: ['blur','change'] }],
- umId: [{ required: true, message: 'Please select UM', trigger: ['blur','change'] }],
- rev: [{ required: true, message: 'Please select Rev No', trigger: ['blur','change'] }],
- moldCode: [{ required: true, message: 'Please select Mold Code', trigger: ['blur','change'] }],
- qtyPerCarton: [{ required: true, message: 'Please input Qty Per Carton', trigger: ['blur','change'] }],
- qtyPerRoll: [{ required: true, message: 'Please input Qty Per Roll', trigger: ['blur','change'] }],
- rollsPerCarton: [{ required: true, message: 'Please input Rolls Per Carton', trigger: ['blur','change'] }],
- freeInfo2: [{ required: true, message: 'Please select OOC', trigger: ['blur','change'] }],
+ partCategoryList: [],
+ category: {},
+ partRules: {
+ partNo: [{required: true, message: 'Please input Part No', trigger: ['blur', 'change']}],
+ partDesc: [{required: true, message: 'Please input Part Description', trigger: ['blur', 'change']}],
+ umId: [{required: true, message: 'Please select UM', trigger: ['blur', 'change']}],
+ rev: [{required: true, message: 'Please select Rev No', trigger: ['blur', 'change']}],
+ moldCode: [{required: true, message: 'Please select Mold Code', trigger: ['blur', 'change']}],
+ qtyPerCarton: [{required: true, message: 'Please input Qty Per Carton', trigger: ['blur', 'change']}],
+ qtyPerRoll: [{required: true, message: 'Please input Qty Per Roll', trigger: ['blur', 'change']}],
+ rollsPerCarton: [{required: true, message: 'Please input Rolls Per Carton', trigger: ['blur', 'change']}],
+ freeInfo2: [{required: true, message: 'Please select OOC', trigger: ['blur', 'change']}],
},
- savePartVisible:false,
- partTableLoading:false,
- partList:[],
- unitList:[],
- columnList:[
+ savePartVisible: false,
+ partTableLoading: false,
+ partList: [],
+ unitList: [],
+ columnList: [
{
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002TablePartNo',
- tableId: "10002Table",
- tableName: "Part Table",
- columnProp: "partNo",
- headerAlign: "center",
- align: "left",
- columnLabel: "Part No",
+ tableId: '10002Table',
+ tableName: 'Part Table',
+ columnProp: 'partNo',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: 'Part No',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -103,16 +101,16 @@ export default {
status: true,
fixed: '',
columnWidth: 80
- },{
+ }, {
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002TablePartDesc',
- tableId: "10002Table",
- tableName: "Part Table",
- columnProp: "partDesc",
- headerAlign: "center",
- align: "left",
- columnLabel: "Part Description",
+ tableId: '10002Table',
+ tableName: 'Part Table',
+ columnProp: 'partDesc',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: 'Part Description',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -120,16 +118,16 @@ export default {
status: true,
fixed: '',
columnWidth: 140
- },{
+ }, {
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002TableRev',
- tableId: "10002Table",
- tableName: "Part Table",
- columnProp: "rev",
- headerAlign: "center",
- align: "left",
- columnLabel: "REV No",
+ tableId: '10002Table',
+ tableName: 'Part Table',
+ columnProp: 'rev',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: 'REV No',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -137,16 +135,16 @@ export default {
status: true,
fixed: '',
columnWidth: 80
- },{
+ }, {
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002TableCategory',
- tableId: "10002Table",
- tableName: "Part Table",
- columnProp: "category",
- headerAlign: "center",
- align: "left",
- columnLabel: "Part Category",
+ tableId: '10002Table',
+ tableName: 'Part Table',
+ columnProp: 'category',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: 'Part Category',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -159,12 +157,12 @@ export default {
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002TableUmName',
- tableId: "10002Table",
- tableName: "Part Table",
- columnProp: "moldCode",
- headerAlign: "center",
- align: "left",
- columnLabel: "Mold Code",
+ tableId: '10002Table',
+ tableName: 'Part Table',
+ columnProp: 'moldCode',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: 'Mold Code',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -172,16 +170,16 @@ export default {
status: true,
fixed: '',
columnWidth: 80
- },{
+ }, {
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002TableUmName',
- tableId: "10002Table",
- tableName: "Part Table",
- columnProp: "manufacturer",
- headerAlign: "center",
- align: "left",
- columnLabel: "Manufacturer",
+ tableId: '10002Table',
+ tableName: 'Part Table',
+ columnProp: 'manufacturer',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: 'Manufacturer',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -189,16 +187,16 @@ export default {
status: true,
fixed: '',
columnWidth: 120
- },{
+ }, {
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002TableUmName',
- tableId: "10002Table",
- tableName: "Part Table",
- columnProp: "umName",
- headerAlign: "center",
- align: "left",
- columnLabel: "UM",
+ tableId: '10002Table',
+ tableName: 'Part Table',
+ columnProp: 'umName',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: 'UM',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -211,12 +209,12 @@ export default {
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002TableQtyPerRoll',
- tableId: "10002Table",
- tableName: "Part Table",
- columnProp: "qtyPerRoll",
- headerAlign: "center",
- align: "left",
- columnLabel: "Qty Per Roll",
+ tableId: '10002Table',
+ tableName: 'Part Table',
+ columnProp: 'qtyPerRoll',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: 'Qty Per Roll',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -224,16 +222,16 @@ export default {
status: true,
fixed: '',
columnWidth: 120
- },{
+ }, {
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002TableRollsPerCarton',
- tableId: "10002Table",
- tableName: "Part Table",
- columnProp: "rollsPerCarton",
- headerAlign: "center",
- align: "left",
- columnLabel: "Rolls Per Carton",
+ tableId: '10002Table',
+ tableName: 'Part Table',
+ columnProp: 'rollsPerCarton',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: 'Rolls Per Carton',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -241,16 +239,16 @@ export default {
status: true,
fixed: '',
columnWidth: 120
- },{
+ }, {
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002TableQtyPerCarton',
- tableId: "10002Table",
- tableName: "Part Table",
- columnProp: "qtyPerCarton",
- headerAlign: "center",
- align: "left",
- columnLabel: "Qty Per Carton",
+ tableId: '10002Table',
+ tableName: 'Part Table',
+ columnProp: 'qtyPerCarton',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: 'Qty Per Carton',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -263,12 +261,12 @@ export default {
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002TableFreeInfo',
- tableId: "10002Table",
- tableName: "Part Table",
- columnProp: "freeInfo",
- headerAlign: "center",
- align: "left",
- columnLabel: "Free Info",
+ tableId: '10002Table',
+ tableName: 'Part Table',
+ columnProp: 'freeInfo',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: 'Free Info',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -276,16 +274,16 @@ export default {
status: true,
fixed: '',
columnWidth: 120
- },{
+ }, {
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002TableFreeInfo2',
- tableId: "10002Table",
- tableName: "Part Table",
- columnProp: "freeInfo2",
- headerAlign: "center",
- align: "left",
- columnLabel: "Free Info2",
+ tableId: '10002Table',
+ tableName: 'Part Table',
+ columnProp: 'freeInfo2',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: 'Free Info2',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -293,16 +291,16 @@ export default {
status: true,
fixed: '',
columnWidth: 120
- },{
+ }, {
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002TableTradingMark',
- tableId: "10002Table",
- tableName: "Part Table",
- columnProp: "tradingMark",
- headerAlign: "center",
- align: "left",
- columnLabel: "Trading Mark",
+ tableId: '10002Table',
+ tableName: 'Part Table',
+ columnProp: 'tradingMark',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: 'Trading Mark',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -310,16 +308,16 @@ export default {
status: true,
fixed: '',
columnWidth: 120
- },{
+ }, {
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002TablePackingWeight',
- tableId: "10002Table",
- tableName: "Part Table",
- columnProp: "packingWeight",
- headerAlign: "center",
- align: "left",
- columnLabel: "Packing Weight",
+ tableId: '10002Table',
+ tableName: 'Part Table',
+ columnProp: 'packingWeight',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: 'Packing Weight',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -327,16 +325,16 @@ export default {
status: true,
fixed: '',
columnWidth: 120
- },{
+ }, {
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002TableWeightUM',
- tableId: "10002Table",
- tableName: "Part Table",
- columnProp: "weightUmName",
- headerAlign: "center",
- align: "left",
- columnLabel: "Weight UM",
+ tableId: '10002Table',
+ tableName: 'Part Table',
+ columnProp: 'weightUmName',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: 'Weight UM',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -349,12 +347,12 @@ export default {
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002TableActive',
- tableId: "10002Table",
- tableName: "Part Table",
- columnProp: "active",
- headerAlign: "center",
- align: "left",
- columnLabel: "Active",
+ tableId: '10002Table',
+ tableName: 'Part Table',
+ columnProp: 'active',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: 'Active',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -362,16 +360,16 @@ export default {
status: true,
fixed: '',
columnWidth: 80
- },{
+ }, {
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002TableCreateBy',
- tableId: "10002Table",
- tableName: "Part Table",
- columnProp: "createBy",
- headerAlign: "center",
- align: "left",
- columnLabel: "Created By",
+ tableId: '10002Table',
+ tableName: 'Part Table',
+ columnProp: 'createBy',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: 'Created By',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -379,16 +377,16 @@ export default {
status: true,
fixed: '',
columnWidth: 80
- },{
+ }, {
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002TableCreateTime',
- tableId: "10002Table",
- tableName: "Part Table",
- columnProp: "createTime",
- headerAlign: "center",
- align: "left",
- columnLabel: "Created Time",
+ tableId: '10002Table',
+ tableName: 'Part Table',
+ columnProp: 'createTime',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: 'Created Time',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -396,16 +394,16 @@ export default {
status: true,
fixed: '',
columnWidth: 140
- },{
+ }, {
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002TableUpdateBy',
- tableId: "10002Table",
- tableName: "Part Table",
- columnProp: "updateBy",
- headerAlign: "center",
- align: "left",
- columnLabel: "Updated By",
+ tableId: '10002Table',
+ tableName: 'Part Table',
+ columnProp: 'updateBy',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: 'Updated By',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -413,16 +411,16 @@ export default {
status: true,
fixed: '',
columnWidth: 80
- },{
+ }, {
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002TableUpdateTime',
- tableId: "10002Table",
- tableName: "Part Table",
- columnProp: "updateTime",
- headerAlign: "center",
- align: "left",
- columnLabel: "Updated Time",
+ tableId: '10002Table',
+ tableName: 'Part Table',
+ columnProp: 'updateTime',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: 'Updated Time',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -432,17 +430,17 @@ export default {
columnWidth: 140
},
],
- pictureColumnList:[
+ pictureColumnList: [
{
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002Table22PictureNo',
- tableId: "10002Table2",
- tableName: "外部料号图片信息表",
- columnProp: "certificationNo",
- headerAlign: "center",
- align: "left",
- columnLabel: "Certification Code",
+ tableId: '10002Table2',
+ tableName: '外部料号图片信息表',
+ columnProp: 'certificationNo',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: 'Certification Code',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -450,16 +448,16 @@ export default {
status: true,
fixed: '',
columnWidth: 80
- },{
+ }, {
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002Table22PictureDesc',
- tableId: "10002Table2",
- tableName: "外部料号图片信息表",
- columnProp: "pictureDesc",
- headerAlign: "center",
- align: "left",
- columnLabel: "Certification Desc",
+ tableId: '10002Table2',
+ tableName: '外部料号图片信息表',
+ columnProp: 'pictureDesc',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: 'Certification Desc',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -467,16 +465,16 @@ export default {
status: true,
fixed: '',
columnWidth: 180
- },{
+ }, {
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002Table22CreateBy',
- tableId: "10002Table2",
- tableName: "外部料号图片信息表",
- columnProp: "createBy",
- headerAlign: "center",
- align: "left",
- columnLabel: "Created By",
+ tableId: '10002Table2',
+ tableName: '外部料号图片信息表',
+ columnProp: 'createBy',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: 'Created By',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -484,16 +482,16 @@ export default {
status: true,
fixed: '',
columnWidth: 80
- },{
+ }, {
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002Table22CreateTime',
- tableId: "10002Table2",
- tableName: "外部料号图片信息表",
- columnProp: "createTime",
- headerAlign: "center",
- align: "center",
- columnLabel: "Created Time",
+ tableId: '10002Table2',
+ tableName: '外部料号图片信息表',
+ columnProp: 'createTime',
+ headerAlign: 'center',
+ align: 'center',
+ columnLabel: 'Created Time',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -501,16 +499,16 @@ export default {
status: true,
fixed: '',
columnWidth: 180
- },{
+ }, {
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002Table22UpdateBy',
- tableId: "10002Table2",
- tableName: "外部料号图片信息表",
- columnProp: "updateBy",
- headerAlign: "center",
- align: "left",
- columnLabel: "Updated By",
+ tableId: '10002Table2',
+ tableName: '外部料号图片信息表',
+ columnProp: 'updateBy',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: 'Updated By',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -518,16 +516,16 @@ export default {
status: true,
fixed: '',
columnWidth: 80
- },{
+ }, {
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002Table22UpdateTime',
- tableId: "10002Table2",
- tableName: "外部料号图片信息表",
- columnProp: "updateTime",
- headerAlign: "center",
- align: "center",
- columnLabel: "Updated Time",
+ tableId: '10002Table2',
+ tableName: '外部料号图片信息表',
+ columnProp: 'updateTime',
+ headerAlign: 'center',
+ align: 'center',
+ columnLabel: 'Updated Time',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -537,17 +535,17 @@ export default {
columnWidth: 180
},
],
- customerColumnList:[
+ customerColumnList: [
{
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002Table3CustomerNo',
- tableId: "10002Table3",
- tableName: "外部料号客户信息表",
- columnProp: "customerNo",
- headerAlign: "center",
- align: "left",
- columnLabel: "Customer No",
+ tableId: '10002Table3',
+ tableName: '外部料号客户信息表',
+ columnProp: 'customerNo',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: 'Customer No',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -555,16 +553,16 @@ export default {
status: true,
fixed: '',
columnWidth: 80
- },{
+ }, {
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002Table3CustomerName',
- tableId: "10002Table3",
- tableName: "外部料号客户信息表",
- columnProp: "customerName",
- headerAlign: "center",
- align: "left",
- columnLabel: "Customer Name",
+ tableId: '10002Table3',
+ tableName: '外部料号客户信息表',
+ columnProp: 'customerName',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: 'Customer Name',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -572,16 +570,16 @@ export default {
status: true,
fixed: '',
columnWidth: 120
- },{
+ }, {
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002Table3CreateTime',
- tableId: "10002Table3",
- tableName: "外部料号客户信息表",
- columnProp: "createTime",
- headerAlign: "center",
- align: "center",
- columnLabel: "Created Time",
+ tableId: '10002Table3',
+ tableName: '外部料号客户信息表',
+ columnProp: 'createTime',
+ headerAlign: 'center',
+ align: 'center',
+ columnLabel: 'Created Time',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -589,16 +587,16 @@ export default {
status: true,
fixed: '',
columnWidth: 140
- },{
+ }, {
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002Table3CreateBy',
- tableId: "10002Table3",
- tableName: "外部料号客户信息表",
- columnProp: "createBy",
- headerAlign: "center",
- align: "left",
- columnLabel: "Created By",
+ tableId: '10002Table3',
+ tableName: '外部料号客户信息表',
+ columnProp: 'createBy',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: 'Created By',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -606,16 +604,16 @@ export default {
status: true,
fixed: '',
columnWidth: 80
- },{
+ }, {
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002Table3UpdateTime',
- tableId: "10002Table3",
- tableName: "外部料号客户信息表",
- columnProp: "updateTime",
- headerAlign: "center",
- align: "center",
- columnLabel: "Updated Time",
+ tableId: '10002Table3',
+ tableName: '外部料号客户信息表',
+ columnProp: 'updateTime',
+ headerAlign: 'center',
+ align: 'center',
+ columnLabel: 'Updated Time',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -623,16 +621,16 @@ export default {
status: true,
fixed: '',
columnWidth: 140
- },{
+ }, {
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002Table3UpdateBy',
- tableId: "10002Table3",
- tableName: "外部料号客户信息表",
- columnProp: "updateBy",
- headerAlign: "center",
- align: "left",
- columnLabel: "Updated By",
+ tableId: '10002Table3',
+ tableName: '外部料号客户信息表',
+ columnProp: 'updateBy',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: 'Updated By',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -642,17 +640,17 @@ export default {
columnWidth: 80
},
],
- manufacturerColumnList:[
+ manufacturerColumnList: [
{
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002Table4ManufacturerNo',
- tableId: "10002Table4",
- tableName: "外部料号供应商信息表",
- columnProp: "manufacturerNo",
- headerAlign: "center",
- align: "left",
- columnLabel: "Manufacturer No",
+ tableId: '10002Table4',
+ tableName: '外部料号供应商信息表',
+ columnProp: 'manufacturerNo',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: 'Manufacturer No',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -660,16 +658,16 @@ export default {
status: true,
fixed: '',
columnWidth: 80
- },{
+ }, {
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002Table4ManufacturerName',
- tableId: "10002Table4",
- tableName: "外部料号供应商信息表",
- columnProp: "manufacturerName",
- headerAlign: "center",
- align: "left",
- columnLabel: "Manufacturer Name",
+ tableId: '10002Table4',
+ tableName: '外部料号供应商信息表',
+ columnProp: 'manufacturerName',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: 'Manufacturer Name',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -677,16 +675,16 @@ export default {
status: true,
fixed: '',
columnWidth: 120
- },{
+ }, {
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002Table4CreateTime',
- tableId: "10002Table4",
- tableName: "外部料号供应商信息表",
- columnProp: "createTime",
- headerAlign: "center",
- align: "center",
- columnLabel: "Created Time",
+ tableId: '10002Table4',
+ tableName: '外部料号供应商信息表',
+ columnProp: 'createTime',
+ headerAlign: 'center',
+ align: 'center',
+ columnLabel: 'Created Time',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -694,16 +692,16 @@ export default {
status: true,
fixed: '',
columnWidth: 140
- },{
+ }, {
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002Table4CreateBy',
- tableId: "10002Table4",
- tableName: "外部料号供应商信息表",
- columnProp: "createBy",
- headerAlign: "center",
- align: "left",
- columnLabel: "Created By",
+ tableId: '10002Table4',
+ tableName: '外部料号供应商信息表',
+ columnProp: 'createBy',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: 'Created By',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -711,16 +709,16 @@ export default {
status: true,
fixed: '',
columnWidth: 80
- },{
+ }, {
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002Table4UpdateTime',
- tableId: "10002Table4",
- tableName: "外部料号供应商信息表",
- columnProp: "updateTime",
- headerAlign: "center",
- align: "center",
- columnLabel: "Updated Time",
+ tableId: '10002Table4',
+ tableName: '外部料号供应商信息表',
+ columnProp: 'updateTime',
+ headerAlign: 'center',
+ align: 'center',
+ columnLabel: 'Updated Time',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -728,16 +726,16 @@ export default {
status: true,
fixed: '',
columnWidth: 140
- },{
+ }, {
userId: this.$store.state.user.name,
functionId: 10002,
serialNumber: '10002Table4UpdateBy',
- tableId: "10002Table4",
- tableName: "外部料号供应商信息表",
- columnProp: "updateBy",
- headerAlign: "center",
- align: "left",
- columnLabel: "Updated By",
+ tableId: '10002Table4',
+ tableName: '外部料号供应商信息表',
+ columnProp: 'updateBy',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: 'Updated By',
columnHidden: false,
columnImage: false,
columnSortable: false,
@@ -747,30 +745,30 @@ export default {
columnWidth: 80
},
],
- activeName:'partPicture',
- currentPart:{},
- externalPartCustomerList:[],
- pictureList:[],
- externalPartManufacturerList:[],
- base64List:[],
- countryList:[],
+ activeName: 'partPicture',
+ currentPart: {},
+ externalPartCustomerList: [],
+ pictureList: [],
+ externalPartManufacturerList: [],
+ base64List: [],
+ countryList: [],
}
},
- watch:{
- currentPart(newVal,oldVal){
- if (!this.ofComponents){
+ watch: {
+ currentPart (newVal, oldVal) {
+ if (!this.ofComponents) {
// 调用 子组件信息查询
- this.getExternalPartCustomerList();
- this.getExternalPartPictureList();
- this.getExternalPartManufacturerList();
+ this.getExternalPartCustomerList()
+ this.getExternalPartPictureList()
+ this.getExternalPartManufacturerList()
}
},
- "savePart.partNo"(newVal,oldVal){
+ 'savePart.partNo' (newVal, oldVal) {
this.savePart.partNo = newVal.toUpperCase()
},
- "savePart.category"(newVal,oldVal){
- const category = this.partCategoryList.find((item)=>item.categoryValue === newVal);
- if (category){
+ 'savePart.category' (newVal, oldVal) {
+ const category = this.partCategoryList.find((item) => item.categoryValue === newVal)
+ if (category) {
// this.savePart.manufacturerRequired = category.manufacturerRequired;
// this.savePart.moldCodeRequired = category.moldCodeRequired;
// this.savePart.serialNumberRequired = category.serialNumberRequired;
@@ -790,86 +788,86 @@ export default {
this.category = JSON.parse(JSON.stringify(category))
}
},
- "part.partNo"(newVal,oldVal){
+ 'part.partNo' (newVal, oldVal) {
this.part.partNo = newVal.toUpperCase()
},
- "savePart.qtyPerRoll"(newVal,oldVal){
- this.savePart.qtyPerCarton = this.qtyPerCarton();
+ 'savePart.qtyPerRoll' (newVal, oldVal) {
+ this.savePart.qtyPerCarton = this.qtyPerCarton()
},
- "savePart.rollsPerCarton"(newVal,oldVal){
- this.savePart.qtyPerCarton = this.qtyPerCarton();
+ 'savePart.rollsPerCarton' (newVal, oldVal) {
+ this.savePart.qtyPerCarton = this.qtyPerCarton()
},
},
- methods:{
- getExternalPartPictureList(val){
+ methods: {
+ getExternalPartPictureList (val) {
let params = {
partNo: this.currentPart.partNo,
site: this.currentPart.site,
- pictureClassify:'BoxPicture',
+ pictureClassify: 'BoxPicture',
}
- getExternalPartPictureList(params).then(({data})=>{
- if (data && data.code === 0){
- this.pictureList = data.rows;
- if (val === true){
- this.$nextTick(()=>{
- this.$refs.picture.handleBasePictureList();
+ getExternalPartPictureList(params).then(({data}) => {
+ if (data && data.code === 0) {
+ this.pictureList = data.rows
+ if (val === true) {
+ this.$nextTick(() => {
+ this.$refs.picture.handleBasePictureList()
})
}
- }else {
+ } else {
this.$message.warning(data.msg)
}
- }).catch((error)=>{
+ }).catch((error) => {
this.$message.error(error)
})
},
- rowPartStyle({row}){
- if (row.partNo === this.currentPart.partNo){
+ rowPartStyle ({row}) {
+ if (row.partNo === this.currentPart.partNo) {
return {
background: 'rgb(232,246,246)',
}
}
},
- selectUnitList(){
- selectUnitList().then(({data})=>{
- if (data && data.code === 0){
- this.unitList = data.rows;
- if (this.unitList.length > 0){
- this.savePart.umId = this.unitList[0].umId;
+ selectUnitList () {
+ selectUnitList().then(({data}) => {
+ if (data && data.code === 0) {
+ this.unitList = data.rows
+ if (this.unitList.length > 0) {
+ this.savePart.umId = this.unitList[0].umId
}
- }else {
+ } else {
this.$message.warning(data.msg)
}
- }).catch((error)=>{
+ }).catch((error) => {
this.$message.error(error)
})
},
- selectExternalPartList(){
+ selectExternalPartList () {
let params = {
...this.part,
site: this.$store.state.user.site,
}
- selectExternalPartList(params).then(({data})=>{
- if (data && data.code === 0){
- this.partList = data.rows;
- if (this.partList.length > 0 && !this.ofComponents){
+ selectExternalPartList(params).then(({data}) => {
+ if (data && data.code === 0) {
+ this.partList = data.rows
+ if (this.partList.length > 0 && !this.ofComponents) {
this.currentPart = {...this.partList[0]}
}
- }else {
+ } else {
this.$message.warning(data.msg)
}
- }).catch((error)=>{
+ }).catch((error) => {
this.$message.error(error)
})
},
- handleSave(){
- if (this.savePartVisible){
- if ((this.savePart.packingWeight || this.savePart.packingWeight == 0) && !this.savePart.weightUmId){
+ handleSave () {
+ if (this.savePartVisible) {
+ if ((this.savePart.packingWeight || this.savePart.packingWeight == 0) && !this.savePart.weightUmId) {
this.$message.warning('Please select Weight UM')
return
}
- this.$refs.savePartForm.validate((valid,obj) => {
+ this.$refs.savePartForm.validate((valid, obj) => {
if (valid) {
- if (this.savePart.qtyPerCarton === 0){
+ if (this.savePart.qtyPerCarton === 0) {
this.$message.warning('Qty Per Carton can not be 0')
return
}
@@ -879,25 +877,25 @@ export default {
createBy: this.$store.state.user.name,
createTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
}
- saveExternalPart(params).then(({data})=>{
- if (data && data.code === 0){
+ saveExternalPart(params).then(({data}) => {
+ if (data && data.code === 0) {
this.handleSelectExternalPartPage()
this.savePartVisible = false
this.$message.success(data.msg)
- }else {
+ } else {
this.$message.warning(data.msg)
}
- }).catch((error)=>{
+ }).catch((error) => {
this.$message.error(error)
})
- }else {
+ } else {
for (let i = 0; i < Object.keys(obj).length; i++) {
this.$message.warning(obj[Object.keys(obj)[i]][0].message)
break
}
}
})
- }else {
+ } else {
this.savePart = {
...part,
active: 'Y',
@@ -907,61 +905,61 @@ export default {
moldCodeRequired: 'N',
serialNumberRequired: 'N',
}
- this.getCountryList();
+ this.getCountryList()
this.savePart.freeInfo2 = this.defaultCountry
this.savePart.category = this.partCategoryList.length > 0 ? this.partCategoryList[0].categoryValue : ''
- this.savePartVisible = true;
+ this.savePartVisible = true
}
},
- closeSavePart(){
+ closeSavePart () {
this.savePart = {
...part,
active: 'Y',
}
- if (this.unitList.length > 0){
- this.savePart.umId = this.unitList[0].umId;
+ if (this.unitList.length > 0) {
+ this.savePart.umId = this.unitList[0].umId
}
this.$refs.savePartForm.resetFields()
},
- removeExternalPart(row){
- removeExternalPart(row).then(({data})=>{
- if (data && data.code === 0){
+ removeExternalPart (row) {
+ removeExternalPart(row).then(({data}) => {
+ if (data && data.code === 0) {
this.selectExternalPartList()
this.$message.success(data.msg)
- }else {
+ } else {
this.$message.warning(data.msg)
}
- }).catch((error)=>{
+ }).catch((error) => {
this.$message.error(error)
})
},
- handleRowClick(row, column, event,type){
+ handleRowClick (row, column, event, type) {
this.currentPart = {...row}
- if (type === 0){
- this.getCountryList();
+ if (type === 0) {
+ this.getCountryList()
this.savePart = {...row}
- this.savePartVisible = true;
+ this.savePartVisible = true
}
},
- handleDblRowClick(row, column, event,type){
- if (this.ofComponents){
- this.$emit('rowClick',row)
- }else {
+ handleDblRowClick (row, column, event, type) {
+ if (this.ofComponents) {
+ this.$emit('rowClick', row)
+ } else {
this.currentPart = {...row}
- if (type === 0){
+ if (type === 0) {
this.savePart = {...row}
- this.savePartVisible = true;
+ this.savePartVisible = true
}
}
},
- handleUpdate(){
- if ((this.savePart.packingWeight || this.savePart.packingWeight == 0) && !this.savePart.weightUmId){
+ handleUpdate () {
+ if ((this.savePart.packingWeight || this.savePart.packingWeight == 0) && !this.savePart.weightUmId) {
this.$message.warning('Please select Weight UM')
return
}
- this.$refs.savePartForm.validate((valid,obj) => {
+ this.$refs.savePartForm.validate((valid, obj) => {
if (valid) {
- if (this.savePart.qtyPerCarton === 0){
+ if (this.savePart.qtyPerCarton === 0) {
this.$message.warning('Qty Per Carton can not be 0')
return
}
@@ -973,18 +971,18 @@ export default {
updateBy: this.$store.state.user.name,
updateTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
}
- updateExternalPart(params).then(({data})=>{
- if (data && data.code === 0){
+ updateExternalPart(params).then(({data}) => {
+ if (data && data.code === 0) {
this.handleSelectExternalPartPage()
this.savePartVisible = false
this.$message.success(data.msg)
- }else {
+ } else {
this.$message.warning(data.msg)
}
- }).catch((error)=>{
+ }).catch((error) => {
this.$message.error(error)
})
- }else {
+ } else {
for (let i = 0; i < Object.keys(obj).length; i++) {
this.$message.warning(obj[Object.keys(obj)[i]][0].message)
break
@@ -992,61 +990,61 @@ export default {
}
})
},
- getExternalPartCustomerList(){
+ getExternalPartCustomerList () {
let params = {
partNo: this.currentPart.partNo,
site: this.currentPart.site,
}
- getExternalPartCustomerList(params).then(({data})=>{
- if (data && data.code === 0){
- this.externalPartCustomerList = data.rows;
- }else {
+ getExternalPartCustomerList(params).then(({data}) => {
+ if (data && data.code === 0) {
+ this.externalPartCustomerList = data.rows
+ } else {
this.$message.warning(data.msg)
}
- }).catch((error)=>{
+ }).catch((error) => {
this.$message.error(error)
})
},
- getExternalPartManufacturerList(){
+ getExternalPartManufacturerList () {
let params = {
partNo: this.currentPart.partNo,
site: this.currentPart.site,
}
- getExternalPartManufacturerList(params).then(({data})=>{
- if (data && data.code === 0){
- this.externalPartManufacturerList = data.rows;
- }else {
+ getExternalPartManufacturerList(params).then(({data}) => {
+ if (data && data.code === 0) {
+ this.externalPartManufacturerList = data.rows
+ } else {
this.$message.warning(data.msg)
}
- }).catch((error)=>{
+ }).catch((error) => {
this.$message.error(error)
})
},
- async convertToBase64(fileUrls) {
+ async convertToBase64 (fileUrls) {
this.base64List = []
for (const fileUrl of fileUrls) {
- const base64Url = await this.getFileAsBase64(fileUrl);
- this.base64List.push(base64Url);
+ const base64Url = await this.getFileAsBase64(fileUrl)
+ this.base64List.push(base64Url)
}
},
- getFileAsBase64(fileUrl) {
+ getFileAsBase64 (fileUrl) {
return new Promise((resolve, reject) => {
- const img = new Image();
- img.crossOrigin = 'Anonymous';
- img.src = fileUrl;
+ const img = new Image()
+ img.crossOrigin = 'Anonymous'
+ img.src = fileUrl
img.onload = () => {
- const canvas = document.createElement('canvas');
- const ctx = canvas.getContext('2d');
- canvas.width = img.width;
- canvas.height = img.height;
- ctx.drawImage(img, 0, 0);
- const base64data = canvas.toDataURL('image/jpeg');
- resolve(base64data);
- };
+ const canvas = document.createElement('canvas')
+ const ctx = canvas.getContext('2d')
+ canvas.width = img.width
+ canvas.height = img.height
+ ctx.drawImage(img, 0, 0)
+ const base64data = canvas.toDataURL('image/jpeg')
+ resolve(base64data)
+ }
img.onerror = (error) => {
- reject(error);
- };
- });
+ reject(error)
+ }
+ })
},
async getTableUserColumn (tableId, columnId) {
let queryTableUser = {
@@ -1058,7 +1056,7 @@ export default {
}
await getTableUserListLanguage(queryTableUser).then(({data}) => {
if (data.rows.length > 0) {
- this.caseTable(data.rows,columnId)
+ this.caseTable(data.rows, columnId)
} else {
this.getColumnList(tableId, columnId)
}
@@ -1074,364 +1072,375 @@ export default {
}
await getTableDefaultListLanguage(queryTable).then(({data}) => {
if (!data.rows.length === 0) {
- this.caseTable(data.rows,columnId)
+ this.caseTable(data.rows, columnId)
} else {
}
})
},
- caseTable(list,columnId){
- if (list.length > 0){
+ caseTable (list, columnId) {
+ if (list.length > 0) {
switch (columnId) {
case 1:
this.columnList = list
- break;
+ break
case 2:
this.pictureColumnList = list
- break;
+ break
case 3:
this.customerColumnList = list
- break;
+ break
case 4:
this.manufacturerColumnList = list
- break;
+ break
}
}
},
- qtyPerCarton(){
- return new Decimal(this.savePart.qtyPerRoll).mul(this.savePart.rollsPerCarton).toNumber();
+ qtyPerCarton () {
+ return new Decimal(this.savePart.qtyPerRoll).mul(this.savePart.rollsPerCarton).toNumber()
},
- getCategoryList(){
- let params = {};
- getCategoryList(params).then(({data})=>{
- if (data && data.code === 0){
- this.partCategoryList = data.rows;
- }else {
+ getCategoryList () {
+ let params = {}
+ getCategoryList(params).then(({data}) => {
+ if (data && data.code === 0) {
+ this.partCategoryList = data.rows
+ } else {
this.$message.warning(data.msg)
}
- }).catch((error)=>{
+ }).catch((error) => {
this.$message.error(error)
})
},
- changeQtyRollCarton(){
- this.savePart.qtyPerRoll = this.savePart.qtyPerCarton;
+ changeQtyRollCarton () {
+ this.savePart.qtyPerRoll = this.savePart.qtyPerCarton
},
- getCountryList(){
- let params = {
-
- }
- countryList(params).then(({data})=>{
- if (data && data.code === 0){
+ getCountryList () {
+ let params = {}
+ countryList(params).then(({data}) => {
+ if (data && data.code === 0) {
this.countryList = data.rows
- }else {
+ } else {
this.$message.warning(data.msg)
}
- }).catch((error)=>{
+ }).catch((error) => {
this.$message.error(error)
})
},
- getUserSiteDefaultCountry(){
+ getUserSiteDefaultCountry () {
let params = this.$store.state.user.site
- getSiteDetail(params).then(({data})=>{
- if (data && data.code === 0){
- if (data.row && data.row.defaultCountry){
+ getSiteDetail(params).then(({data}) => {
+ if (data && data.code === 0) {
+ if (data.row && data.row.defaultCountry) {
this.defaultCountry = data.row.defaultCountry
}
- }else {
+ } else {
this.$message.warning(data.msg)
}
- }).catch((error)=>{
+ }).catch((error) => {
this.$message.error(error)
})
},
- handleSelectExternalPartPage(part1){
+ handleSelectExternalPartPage () {
let params = {
...this.part,
site: this.$store.state.user.site,
- no:this.no,
- size:this.size,
- }
- if (part1){
- params.site = part1.site;
- params.partNo = part1.partNo;
+ no: this.no,
+ size: this.size,
}
- selectExternalPartPage(params).then(({data})=>{
- if (data && data.code === 0){
- this.partList = data.rows;
- if (this.partList.length > 0 && !this.ofComponents){
+ selectExternalPartPage(params).then(({data}) => {
+ if (data && data.code === 0) {
+ this.partList = data.rows
+ if (this.partList.length > 0 && !this.ofComponents) {
this.currentPart = {...this.partList[0]}
}
- this.total = data.total;
- }else {
+ this.total = data.total
+ } else {
this.$message.warning(data.msg)
}
- }).catch((error)=>{
+ }).catch((error) => {
this.$message.error(error)
})
},
- handleSizeChange(val){
- this.size = val;
- this.handleSelectExternalPartPage();
+ handleSizeChange (val) {
+ this.size = val
+ this.handleSelectExternalPartPage()
},
- handleCurrentChange(val){
- this.no = val;
- this.handleSelectExternalPartPage();
+ handleCurrentChange (val) {
+ this.no = val
+ this.handleSelectExternalPartPage()
},
- changeCategory(val){
- const category = this.partCategoryList.find((item)=>item.categoryValue === val);
- if (category){
- this.savePart.manufacturerRequired = category.manufacturerRequired;
- this.savePart.moldCodeRequired = category.moldCodeRequired;
- this.savePart.serialNumberRequired = category.serialNumberRequired;
- this.savePart.rollLabelRequired = category.rollLabelRequired;
- if (this.savePart.serialNumberRequired === 'Y'){
- this.savePart.qtyPerRoll = 1;
- this.savePart.rollsPerCarton = 1;
+ changeCategory (val) {
+ const category = this.partCategoryList.find((item) => item.categoryValue === val)
+ if (category) {
+ this.savePart.manufacturerRequired = category.manufacturerRequired
+ this.savePart.moldCodeRequired = category.moldCodeRequired
+ this.savePart.serialNumberRequired = category.serialNumberRequired
+ this.savePart.rollLabelRequired = category.rollLabelRequired
+ if (this.savePart.serialNumberRequired === 'Y') {
+ this.savePart.qtyPerRoll = 1
+ this.savePart.rollsPerCarton = 1
}
- if (category.showCartonQtyPerRoll === 'N'){
- this.savePart.qtyPerRoll = 1;
+ if (category.showCartonQtyPerRoll === 'N') {
+ this.savePart.qtyPerRoll = 1
}
- if (category.showCartonRollsPerCarton === 'N'){
- this.savePart.rollsPerCarton = 1;
+ if (category.showCartonRollsPerCarton === 'N') {
+ this.savePart.rollsPerCarton = 1
}
this.partRules.rollsPerCarton[0].message = `Please input ${category.qtyPerRollPart}`
- this.savePart.qtyPerCarton = this.qtyPerCarton();
+ this.savePart.qtyPerCarton = this.qtyPerCarton()
this.category = JSON.parse(JSON.stringify(category))
}
}
},
- computed:{
-
- },
- activated() {
- if (this.$route.query.site && this.$route.query.partNo){
- let part1 = {
- site: this.$route.query.site,
- partNo: this.$route.query.partNo,
- }
- this.handleSelectExternalPartPage(part1);
+ computed: {},
+ activated () {
+ if (this.$route.query.site && this.$route.query.partNo) {
+ this.part.site = this.$route.query.site
+ this.part.partNo = this.$route.query.partNo
+ this.handleSelectExternalPartPage()
}
},
created () {
- this.selectUnitList();
- this.getCategoryList();
+ this.selectUnitList()
+ this.getCategoryList()
// this.getCountryList();
// this.selectExternalPartList();
- this.handleSelectExternalPartPage();
- this.getUserSiteDefaultCountry();
- this.getTableUserColumn("10002Table", 1)
- this.getTableUserColumn("10002Table2", 2)
- this.getTableUserColumn("10002Table3", 3)
- this.getTableUserColumn("10002Table4", 4)
+ this.handleSelectExternalPartPage()
+ this.getUserSiteDefaultCountry()
+ this.getTableUserColumn('10002Table', 1)
+ this.getTableUserColumn('10002Table2', 2)
+ this.getTableUserColumn('10002Table3', 3)
+ this.getTableUserColumn('10002Table4', 4)
}
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- New
-
- Query
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ New
+
+ Query
+
+
-
-
-
- Edit
- Delete
-
-
-
-
- {{ scope.row[item.columnProp] }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ Edit
+ Delete
+
+
+
+
+ {{ scope.row[item.columnProp] }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Active
-
-
-
-
- Trading Mark
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Active
+
+
+
+
+ Trading Mark
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
![]()
+
+
![]()
+
-