| | |
| | | * @version: |
| | | * @Date: 2024-06-19 20:34:27 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-07-31 23:07:14 |
| | | * @LastEditTime: 2024-08-20 14:59:13 |
| | | */ |
| | | |
| | | import { Tag, Tooltip } from 'ant-design-vue'; |
| | |
| | | BasLabelTempInput, |
| | | } from '/@/api/tigerapi/model/mesModel'; |
| | | import { useUserStore } from '/@/store/modules/user'; |
| | | import { uploadApi } from '/@/api/sys/upload'; |
| | | import { useWebSocketStore } from '/@/store/modules/websocket'; |
| | | |
| | | const { getLocale } = useLocale(); |
| | | |
| | |
| | | }, |
| | | { BAS_LABEL_VAR_WO: useDrawer() }, |
| | | ]; |
| | | } /** |
| | | }, |
| | | /** |
| | | * @description: 获取表格use列表 |
| | | * @param {string} type |
| | | * @param {array} args |
| | | * @return {*} |
| | | */, |
| | | */ |
| | | GetUseTables: (data: Ref<{}>, ...args) => { |
| | | // _data = data; |
| | | return { |
| | |
| | | LABEL_CODE: label.LABEL_CODE, |
| | | LABEL_NAME: label.LABEL_NAME, |
| | | TEMP_TYPE: label.TEMP_TYPE, |
| | | TEMP_PATH: label.TEMP_PATH[0], |
| | | TEMP_PATH: label.TEMP_PATH, |
| | | CUST_CODE: label.CUST_CODE, |
| | | PROD_CODE: label.PROD_CODE, |
| | | REMARK: '', |
| | |
| | | labelField: unref(getLocale) == 'zh_CN' ? 'Desc' : 'Name', |
| | | valueField: 'Value', |
| | | onChange: (e, v) => { |
| | | if (e == 1) { |
| | | if (e == 1 || e == 4) { |
| | | const where = e == 1? { TABLE_NAME: 'BAS_LABEL_PV', VAR_TYPE: 0}: { TABLE_NAME: 'BAS_LABEL_PV', VAR_TYPE: 1}; |
| | | emit('opencust', { |
| | | data: column.record, |
| | | name: 'BAS_LABEL_VAR', |
| | |
| | | ], |
| | | tableName: 'BAS_LABEL_PV', |
| | | rowKey: 'VAR_CODE', |
| | | searchInfo: { TABLE_NAME: 'BAS_LABEL_PV' }, |
| | | searchInfo: where, |
| | | }, |
| | | }); |
| | | } |
| | |
| | | text = '自定义变量'; |
| | | color = '#bfbfbf'; |
| | | break; |
| | | case 4: |
| | | text = '条码生成'; |
| | | color = '#b442df'; |
| | | break; |
| | | } |
| | | return h(Tooltip, { title: text }, () => h(Tag, { color: color }, () => text)); |
| | | }, |
| | |
| | | ifShow: (column) => true, |
| | | sorter: true, |
| | | resizable: true, |
| | | }, |
| | | { |
| | | dataIndex: 'BARCODE_RULE', |
| | | title: '条码生成规则', |
| | | ifShow: true, |
| | | edit: true, |
| | | editRule: true, |
| | | sorter: true, |
| | | resizable: true, |
| | | editComponent: 'ApiSelect', |
| | | editComponentProps: (column) => { |
| | | return { |
| | | api: getEntity, |
| | | params: { entityName: 'BAS_CODE_RULE', sqlcmd: ' 1=1 ' }, |
| | | resultField: 'Data.Items', |
| | | labelField: 'RULE_NAME', |
| | | valueField: 'RULE_CODE', |
| | | }; |
| | | }, |
| | | }, |
| | | { |
| | | dataIndex: 'REMARK', |
| | |
| | | title: `(变量)${x.VAR_NAME}默认值`, |
| | | dataIndex: `DEFAULT_VALUE_${x.VAR_NAME}`, |
| | | width: 280, |
| | | edit: true, |
| | | editRule: true, |
| | | // edit: true, |
| | | // editRule: true, |
| | | resizable: true, |
| | | ifShow: true, |
| | | }, |