Merge branch 'master' of http://bore.pub:10439/r/ERP_override
| | |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import request from "@/utils/request" |
| | | import {useI18n} from "vue-i18n" |
| | | import {useRouter} from "vue-router"; |
| | | import deepClone from "@/utils/deepClone"; |
| | | import companyInfo from "@/stores/sd/companyInfo" |
| | | const { t } = useI18n() |
| | | const company = companyInfo() |
| | | let produceList = ref([]) |
| | | let labelList = ref([]) |
| | | let dataList = ref([]) |
| | | let lastList = ref([]) |
| | | let list = ref([]) |
| | | // 纸张类型 |
| | | const paperTypes = { |
| | | 'A3': { |
| | | width: 420, |
| | | height: 296.6 |
| | | '成品标签': { |
| | | width: 110, |
| | | height: 110 |
| | | }, |
| | | 'A4': { |
| | | width: 210, |
| | | height: 296.6 |
| | | '小片标签': { |
| | | width: 112, |
| | | height: 45 |
| | | }, |
| | | 'A5': { |
| | | width: 210, |
| | | height: 147.6 |
| | | }, |
| | | 'B3': { |
| | | width: 500, |
| | | height: 352.6 |
| | | }, |
| | | 'B4': { |
| | | width: 250, |
| | | height: 352.6 |
| | | }, |
| | | 'B5': { |
| | | width: 250, |
| | | height: 175.6 |
| | | } |
| | | } |
| | | const autoPaper = ref({ |
| | | width:null, |
| | |
| | | |
| | | }) |
| | | |
| | | |
| | | //标签类型 |
| | | let filteredOptions = [] |
| | | const lableType = ref('1') |
| | | const lableTypeOptions = [ |
| | | { |
| | | value: '1', |
| | | label: t('processCard.finishedProductLabel'), |
| | | }, |
| | | /* { |
| | | value: '2', |
| | | label: t('processCard.halfProductLabel'), |
| | | },*/ |
| | | { |
| | | value: `${company.printLabel.labelValue}`, |
| | | label: `${company.printLabel.labelType}`, |
| | | }, |
| | | { |
| | | value: `${company.printLabel.labelValue3}`, |
| | | label: `${company.printLabel.labelType3}`, |
| | | }, |
| | | ] |
| | | let hidePrintLabels = company.printLabel.hideButton; |
| | | |
| | | if (hidePrintLabels == 'true') { |
| | | filteredOptions = lableTypeOptions.filter((option, index) => index !== 2); |
| | | } else { |
| | | filteredOptions = lableTypeOptions; |
| | | } |
| | | |
| | | const data = ref({ |
| | | printList: [] |
| | | }) |
| | | |
| | | let props = defineProps({ |
| | | list:null,//勾选的数据 |
| | | faceOrientation:null,//内外面 |
| | | type:null,//标签模板 |
| | | lableType:null//标签类型 |
| | | }) |
| | | |
| | | |
| | | |
| | | const {currentRoute} = useRouter() |
| | | const route = currentRoute.value |
| | | let type = props.type |
| | | let lableTypes = props.lableType |
| | | data.value.printList = JSON.parse(props.list) |
| | | |
| | | |
| | | const TgaStyleSet = ref([ |
| | | { |
| | | tid: '此面为室外面', title: '此面为室外面', data: '', type: 'text', |
| | | options: { |
| | | field: '', |
| | | testData: '', |
| | | height: 16, |
| | | fontSize: 6.75, |
| | | fontWeight: "700", |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | } |
| | | }, |
| | | { |
| | | tid: '此面为室内面', title: '此面为室内面', data: '', type: 'text', |
| | | options: { |
| | | field: '', |
| | | testData: '', |
| | | height: 16, |
| | | fontSize: 6.75, |
| | | fontWeight: "700", |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | } |
| | | }, |
| | | { |
| | | tid: 'orderId', title: '订单号', data: '', type: 'text', |
| | | options: { |
| | | field: 'orderId', |
| | | testData: 'NG24070101', |
| | | testData: '', |
| | | height: 16, |
| | | fontSize: 6.75, |
| | | fontWeight: "700", |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | } |
| | |
| | | testData: '', |
| | | height: 16, |
| | | fontSize: 6.75, |
| | | fontWeight: "700", |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | } |
| | |
| | | testData: '', |
| | | height: 16, |
| | | fontSize: 6.75, |
| | | fontWeight: "700", |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | } |
| | |
| | | testData: '', |
| | | height: 16, |
| | | fontSize: 6.75, |
| | | fontWeight: "700", |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | } |
| | |
| | | testData: '', |
| | | height: 16, |
| | | fontSize: 6.75, |
| | | fontWeight: "700", |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | } |
| | |
| | | testData: '', |
| | | height: 16, |
| | | fontSize: 6.75, |
| | | fontWeight: "700", |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | } |
| | |
| | | testData: '', |
| | | height: 16, |
| | | fontSize: 6.75, |
| | | fontWeight: "700", |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | } |
| | |
| | | testData: '', |
| | | height: 16, |
| | | fontSize: 6.75, |
| | | fontWeight: "700", |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | } |
| | |
| | | testData: '', |
| | | height: 16, |
| | | fontSize: 6.75, |
| | | fontWeight: "700", |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | } |
| | |
| | | testData: '', |
| | | height: 16, |
| | | fontSize: 6.75, |
| | | fontWeight: "700", |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | } |
| | | }, |
| | | { |
| | | tid: 'createTime', title: '下单日期', data: '', type: 'text', |
| | | options: { |
| | | field: 'createTime', |
| | | testData: '', |
| | | height: 16, |
| | | fontSize: 6.75, |
| | | fontWeight: "700", |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | } |
| | |
| | | testData: '', |
| | | height: 16, |
| | | fontSize: 6.75, |
| | | fontWeight: "700", |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | } |
| | |
| | | testData: '', |
| | | height: 16, |
| | | fontSize: 6.75, |
| | | fontWeight: "700", |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | } |
| | |
| | | testData: '', |
| | | height: 16, |
| | | fontSize: 6.75, |
| | | fontWeight: "700", |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | } |
| | |
| | | testData: '', |
| | | height: 16, |
| | | fontSize: 6.75, |
| | | fontWeight: "700", |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | } |
| | |
| | | testData: '', |
| | | height: 16, |
| | | fontSize: 6.75, |
| | | fontWeight: "700", |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | } |
| | |
| | | testData: '', |
| | | height: 16, |
| | | fontSize: 6.75, |
| | | fontWeight: "700", |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | } |
| | |
| | | testData: '', |
| | | height: 16, |
| | | fontSize: 6.75, |
| | | fontWeight: "700", |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | } |
| | | }, |
| | | { |
| | | tid: 'remarks', title: '订单备注', data: '', type: 'text', |
| | | options: { |
| | | field: 'remarks', |
| | | testData: '', |
| | | height: 16, |
| | | fontSize: 6.75, |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | } |
| | |
| | | testData: '', |
| | | height: 16, |
| | | fontSize: 6.75, |
| | | fontWeight: "700", |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | } |
| | |
| | | testData: '', |
| | | height: 16, |
| | | fontSize: 6.75, |
| | | fontWeight: "700", |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | } |
| | |
| | | testData: '', |
| | | height: 16, |
| | | fontSize: 6.75, |
| | | fontWeight: "700", |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | } |
| | |
| | | testData: '', |
| | | height: 16, |
| | | fontSize: 6.75, |
| | | fontWeight: "700", |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | } |
| | | }, |
| | | { |
| | | tid: 'filmNumber', title: '膜号', data: '', type: 'text', |
| | | tid: 'filmNumber', title: '产品备注', data: '', type: 'text', |
| | | options: { |
| | | field: 'filmNumber', |
| | | testData: '', |
| | | height: 16, |
| | | fontSize: 6.75, |
| | | fontWeight: "700", |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | } |
| | |
| | | testData: '', |
| | | height: 16, |
| | | fontSize: 6.75, |
| | | fontWeight: "700", |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | } |
| | |
| | | testData: '', |
| | | height: 16, |
| | | fontSize: 6.75, |
| | | fontWeight: "700", |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | } |
| | |
| | | testData: '', |
| | | height: 16, |
| | | fontSize: 6.75, |
| | | fontWeight: "700", |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | } |
| | | }, |
| | | { |
| | | tid: 'width', title: '宽', data: '', type: 'text', |
| | | options: { |
| | | field: 'width', |
| | | testData: '', |
| | | height: 16, |
| | | fontSize: 6.75, |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | } |
| | | }, |
| | | { |
| | | tid: 'height', title: '高', data: '', type: 'text', |
| | | options: { |
| | | field: 'height', |
| | | testData: '', |
| | | height: 16, |
| | | fontSize: 6.75, |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | } |
| | |
| | | } |
| | | |
| | | const htmlPrint = () => { |
| | | hiprintTemplate.value.print( [{orderId:'名称1'},{orderId:'名称12'}]) |
| | | type=tag.value.name |
| | | if (type === null || type === '' || type === undefined) { |
| | | ElMessage.warning(t('processCard.pleaseSelectCustomPrintLabelStyle')) |
| | | return |
| | | } |
| | | request.post(`/processCard/getSelectPrintCustomLabel/${type}/${lableType.value}`, data.value).then((res) => { |
| | | if (res.code == 200) { |
| | | produceList.value = deepClone(res.data.title) |
| | | list.value = deepClone(res.data.data) |
| | | const data = produceList.value[0].value |
| | | dataList = JSON.parse(`[${data}]`); |
| | | labelList = dataList[0] |
| | | console.log(labelList.printElements) |
| | | for (let i = 0; i < list.value.length; i++) { |
| | | let count = list.value[i].data.length |
| | | for (let j = 0; j < count; j++) { |
| | | for (let k = 0; k < list.value[i].data[j].quantity; k++) { |
| | | lastList.value.push(list.value[i].data[j]) |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | hiprintTemplate.value.print(lastList.value) |
| | | }) |
| | | |
| | | |
| | | |
| | | } |
| | | </script> |
| | | |
| | |
| | | <div style="height: 100%;width: 100%"> |
| | | <div style="height: 10%;width: 100%;float: left" @change="changePaperSize"> |
| | | <el-row> |
| | | <el-col :span="8" > |
| | | <el-col :span="5" > |
| | | <el-button-group > |
| | | <el-button v-for="(item,key) in paperTypes" @click="changePaperSize(item,'list')" >{{key}}</el-button> |
| | | <el-popover placement="right" :width="250" trigger="click"> |
| | |
| | | </el-popover> |
| | | </el-button-group> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-select v-model="tag" @change="changeTag" placeholder="标签列表" > |
| | | <el-col :span="6"> |
| | | <el-select v-model="tag" @change="changeTag" placeholder="标签模板列表" > |
| | | <el-option |
| | | v-for="(tag,index) in tags" |
| | | :key="index" |
| | |
| | | :value="tag" |
| | | /> |
| | | </el-select> |
| | | <el-select v-model="lableType" :placeholder="lableTypeOptions[0].label" class="m-2" style="width: 140px"> |
| | | <el-option |
| | | v-for="item in filteredOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="1"> |
| | | <el-button type="primary" @click="save">保存</el-button> |
| | |
| | | import footSum from "@/hook/footSum" |
| | | import companyInfo from "@/stores/sd/companyInfo" |
| | | import {CircleCheck, Download, Printer} from "@element-plus/icons-vue/global"; |
| | | |
| | | import TagStyleDesigner from "@/components/pp/TagStyleDesigner.vue"; |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | const company = companyInfo() |
| | | |
| | | const userStore = useUserInfoStore() |
| | | const userId = userStore.user.userId |
| | | |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | |
| | | const dialogTableVisibleCustomLabel = ref(false) |
| | | const printVisible = ref(false) |
| | | let selectRecords = ref(null) |
| | | |
| | | let titleStyleVisible = ref(false) |
| | | const selectRecordsData = ref({ |
| | | printList: [] |
| | | }) |
| | |
| | | titleSelectJson.value.dataType = res.data.type |
| | | xGrid.value.reloadData(newDataCollection) |
| | | gridOptions.loading = false |
| | | if (userId!='admin'){ |
| | | gridOptions.toolbarConfig.buttons[5].visible=false |
| | | } |
| | | |
| | | hideButton() |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | |
| | | {code: 'printLabel', name: t('processCard.labelPrinting'), status: 'primary'}, |
| | | {code: 'printLabel2', name: t('processCard.labelPrinting2'), status: 'primary'}, |
| | | {code: 'sortTable', name: "排序汇总", status: 'primary'}, |
| | | // {code: 'printTest', name: "测试打印", status: 'primary'}, |
| | | // {code: 'printLike', name: "同配置打印", status: 'primary'}, |
| | | ], |
| | | // import: false, |
| | |
| | | dialogSortTable.value = true |
| | | break |
| | | } |
| | | case 'printTest': { |
| | | if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) { |
| | | ElMessage.warning(t('searchOrder.msgList.checkOrder')) |
| | | return |
| | | } |
| | | // if (type === null || type === '' || type === undefined) { |
| | | // ElMessage.warning(t('processCard.pleaseSelectCustomPrintLabelStyle')) |
| | | // return |
| | | // } |
| | | |
| | | let id = "" |
| | | for (let i = 0; i < selectRecords.length; i++) { |
| | | if (i + 1 === selectRecords.length) { |
| | | id += selectRecords[i].id |
| | | } else { |
| | | id += selectRecords[i].id + "|" |
| | | } |
| | | } |
| | | |
| | | labelRow.value.list = JSON.stringify(selectRecords) |
| | | labelRow.value.faceOrientation = faceOrientation |
| | | labelRow.value.type = type |
| | | labelRow.value.lableType = lableTypes |
| | | titleStyleVisible.value = true |
| | | break |
| | | } |
| | | } |
| | | } |
| | | }, |
| | |
| | | <select-sort-table id="child" :orderId="tableRow.orderId"/> |
| | | </el-dialog> |
| | | |
| | | |
| | | <el-dialog |
| | | id="titleStyle" |
| | | :title="$t('processCard.labelStyle')" |
| | | style="width: 90%;height:93%;margin-top: 3vh " |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | v-model="titleStyleVisible"> |
| | | <!-- <tag-style style="width: 100%;height: 100%"/>--> |
| | | <tag-style-designer style="width: 100%;height: 100%" |
| | | :faceOrientation="labelRow.faceOrientation" |
| | | :lableType="labelRow.lableType" |
| | | :list="labelRow.list" |
| | | :type="labelRow.type"/> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | :deep(#titleStyle .el-dialog__body){ |
| | | height: 93%; |
| | | width: 100%; |
| | | } |
| | | |
| | | </style> |
| | |
| | | public class ErpApplication { |
| | | public static void main(String[] args) { |
| | | SpringApplication.run(ErpApplication.class, args); |
| | | try { |
| | | /*try { |
| | | new NettyServer(12345).start(); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | }*/ |
| | | } |
| | | } |
| | |
| | | port: 8086 |
| | | |
| | | ip: localhost |
| | | port: 3306 |
| | | |
| | | |
| | | spring: |
| | |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | user_info: |
| | | url: jdbc:mysql://${ip}:3306/erp_user_info?serverTimezone=GMT%2b8 |
| | | url: jdbc:mysql://${ip}:${port}/erp_user_info?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | sd: |
| | | url: jdbc:mysql://${ip}:3306/sd?serverTimezone=GMT%2b8&allowMultiQueries=true |
| | | url: jdbc:mysql://${ip}:${port}/sd?serverTimezone=GMT%2b8&allowMultiQueries=true |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | mm: |
| | | url: jdbc:mysql://${ip}:3306/mm?serverTimezone=GMT%2b8 |
| | | url: jdbc:mysql://${ip}:${port}/mm?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | pp: |
| | | url: jdbc:mysql://${ip}:3306/pp?serverTimezone=GMT%2b8 |
| | | url: jdbc:mysql://${ip}:${port}/pp?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | log: |
| | | url: jdbc:mysql://${ip}:3306/erp_log?serverTimezone=GMT%2b8 |
| | | url: jdbc:mysql://${ip}:${port}/erp_log?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | |
| | | ogd.production_id, |
| | | od.product_id, |
| | | od.product_name, |
| | | SUM(od.quantity) as quantity, |
| | | ROUND(SUM(od.quantity)-IFNULL(sum(fc.quantity)/count(fc.technology_number),0)) as quantity, |
| | | SUM(od.compute_gross_area) as compute_gross_area, |
| | | round(sum(od.perimeter), 2) as perimeter |
| | | from sd.order_detail as od |
| | | left join |
| | | (select order_id, order_number, production_id, splitting_status |
| | | (select order_id, order_number,technology_number, production_id, splitting_status |
| | | from sd.order_glass_detail |
| | | GROUP BY order_id, order_number) as ogd |
| | | on od.order_id = ogd.order_id and od.order_number = ogd.order_number |
| | | left join flow_card as fc on fc.order_id = od.order_id and fc.order_number = od.order_number |
| | | and fc.technology_number=ogd.technology_number |
| | | where od.order_id = #{orderId} |
| | | and ogd.splitting_status = 0 |
| | | |
| | |
| | | od.quantity, |
| | | od.compute_gross_area, |
| | | p.total_thickness, |
| | | od.quantity as baiscQuantity, |
| | | ROUND(od.quantity-IFNULL(sum(fc.quantity)/count(fc.technology_number),0)) as baiscQuantity, |
| | | od.compute_gross_area as 'computeGrossArea', |
| | | p.total_thickness AS 'totalThickness', |
| | | p.thickness, |
| | |
| | | FROM sd.order_detail |
| | | WHERE order_id = #{orderId}) as ods |
| | | on ods.order_id = od.order_id and ods.order_number = od.order_number |
| | | left join flow_card as fc on fc.order_id = od.order_id and fc.order_number = od.order_number |
| | | and fc.technology_number=ogd.technology_number |
| | | where od.order_id = #{orderId} |
| | | and ogd.production_id = #{productionId} |
| | | and ogd.splitting_status = 0 |