diff --git a/ant-design-vue-jeecg/src/components/jeecg/JVxeTable/index.js b/ant-design-vue-jeecg/src/components/jeecg/JVxeTable/index.js index e325327d..b6c9b6ca 100644 --- a/ant-design-vue-jeecg/src/components/jeecg/JVxeTable/index.js +++ b/ant-design-vue-jeecg/src/components/jeecg/JVxeTable/index.js @@ -30,8 +30,8 @@ export const AllCells = { ...mapCell(JVXETypes.select, JVxeSelectCell), ...mapCell(JVXETypes.selectSearch, JVxeSelectCell), // 下拉搜索 ...mapCell(JVXETypes.selectMultiple, JVxeSelectCell), // 下拉多选 - ...mapCell(JVXETypes.date, JVxeDateCell), - ...mapCell(JVXETypes.datetime, JVxeDateCell), + ...mapCell(JVXETypes.date, JVxeDateCell),//yyyy-MM-dd 弹出日历提供选择 有日期没有时间 + ...mapCell(JVXETypes.datetime, JVxeDateCell),//yyyy-MM-dd HH:mm:ss 弹出日历提供选择 有日期有时间 ...mapCell(JVXETypes.upload, JVxeUploadCell), ...mapCell(JVXETypes.textarea, JVxeTextareaCell), diff --git a/ant-design-vue-jeecg/src/views/device/ZyDeviceListRef.vue b/ant-design-vue-jeecg/src/views/device/ZyDeviceListRef.vue new file mode 100644 index 00000000..0299a93c --- /dev/null +++ b/ant-design-vue-jeecg/src/views/device/ZyDeviceListRef.vue @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + + + + 查询 + 重置 + + + + + + + + + + + + 已选择 {{ selectedRowKeys.length }}项 + 清空 + + + + + + + + + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/devicetype/ZyDevicetypeListRef.vue b/ant-design-vue-jeecg/src/views/devicetype/ZyDevicetypeListRef.vue index 8c94a44b..ecfcb124 100644 --- a/ant-design-vue-jeecg/src/views/devicetype/ZyDevicetypeListRef.vue +++ b/ant-design-vue-jeecg/src/views/devicetype/ZyDevicetypeListRef.vue @@ -1,279 +1,301 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + - - - - 已选择 {{ selectedRowKeys.length }}项 - 清空 - + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + - - + + + + + + + + + + + + - - - - - - - - - - - - + - - \ No newline at end of file + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/erp/tool/ZyToolListRef.vue b/ant-design-vue-jeecg/src/views/erp/tool/ZyToolListRef.vue index c660ea12..e1fdaddf 100644 --- a/ant-design-vue-jeecg/src/views/erp/tool/ZyToolListRef.vue +++ b/ant-design-vue-jeecg/src/views/erp/tool/ZyToolListRef.vue @@ -1,13 +1,28 @@ - - - - - - - + + + + + + + + + + + + + + + + 查询 + 重置 + + + + + @@ -116,7 +131,7 @@ export default { { title: '工具编号', align: "center", - dataIndex: 'nums' + dataIndex: 'id' }, { title: '工具名称', diff --git a/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList.vue b/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList.vue index bef4569a..2a210fd6 100644 --- a/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList.vue +++ b/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList.vue @@ -1,111 +1,30 @@ - - - 导出 + 返回 - - - - - {{ item.stationName }} - - - - - - - - {{ item.name }} - - - - - - - - {{ item.name }} - - - - - - - - - - - - - - - - - - - - - - - - 提交 + @valueChange="handleValueChange" + @save="handleTableSave" + /> - - @@ -114,189 +33,135 @@ import '@/assets/less/TableExpand.less' import {mixinDevice} from '@/utils/mixin' import {JeecgListMixin} from '@/mixins/JeecgListMixin' -import ZyPlanProcessModal from './modules/ZyPlanProcessModal2' -import {getAction} from "@api/manage"; -import {filterObj} from "@/utils/util"; +import {getAction, postAction} from "@api/manage"; +import {filterObj, pushIfNotExist, randomNumber, randomUUID} from "@/utils/util"; +import {JVXETypes} from '@/components/jeecg/JVxeTable' export default { - name: 'ZyPlanProcessList', + name: 'ZyPlanProcessDataList', mixins: [JeecgListMixin, mixinDevice], - components: { - ZyPlanProcessModal - }, data() { - // this.cacheData = this.dataSource.map(item => ({ ...item })); - this.cacheData = []; return { + toolbarConfig: { + // add 新增按钮;remove 删除按钮;clearSelection 清空选择按钮 + btn: ['save'] + }, description: '生产计划工序管理页面', + loading: false, + // 分页器参数 + // pagination: { + // // 当前页码 + // current: 1, + // // 每页的条数 + // pageSize: 10, + // // 可切换的条数 + // pageSizeOptions: ['10', '20', '30', '50'], + // // 数据总数(目前并不知道真实的总数,所以先填写0,在后台查出来后再赋值) + // total: 0, + // }, + // 选择的行 + // selectedRows: [], + // 数据源,控制表格的数据 + dataSource: [], // columns, - // 表头 columns: [ - { - title: '#', - dataIndex: 'productProcessId', - key: 'rowIndex', - width: 60, - align: "center", - customRender: function (t, r, index) { - return parseInt(index) + 1; - } - }, - /* { - title: '计划id', - align: "center", - dataIndex: 'planId' - },*/ - { - title: '工单编号', - align: "center", - dataIndex: 'workOrderId', - scopedSlots: {customRender: 'workOrderId'} - }, - /*{ - title: '产品id', - align: "center", - dataIndex: 'productId' - }, - { - title: '工序id', - align: "center", - dataIndex: 'productProcessId' - },*/ - { - title: '产品', - align: "center", - dataIndex: 'productName' - }, - { - title: '车间', - align: "center", - dataIndex: 'departName' - }, - { - title: '工序', - align: "center", - dataIndex: 'processName' - }, + {key: 'workOrderId', title: '工单编号', width: '180px'}, + {key: 'productName', title: '产品名称', width: '180px'}, + {key: 'departName', title: '车间名称', width: '180px'}, + {key: 'processName', title: '工序名称', width: '180px'}, { title: '工位列表', - align: "center", - dataIndex: 'stationList', - width: 150, - scopedSlots: {customRender: 'stationList'} - }, - { - title: '工位工具列表', - align: "center", - dataIndex: 'toolsList', - width: 150, - // scopedSlots: {customRender: this.toolsList} - scopedSlots: {customRender: 'toolsList'} - }, - { - title: '工具设备列表', - align: "center", - dataIndex: 'machineList', - width: 150, - scopedSlots: {customRender: 'machineList'} + key: 'stationId', + type: JVXETypes.select, + width: '200px', + options: [], + placeholder: '请选择${title}', + }, { + title: '设备列表', + key: 'machineIds', + type: JVXETypes.selectMultiple, + width: '200px', + options: [], + placeholder: '请选择${title}', + }, { + title: '工具列表', + key: 'toolsIds', + type: JVXETypes.selectMultiple, + width: '200px', + options: [], + placeholder: '请选择${title}', }, { + key: 'proProcess', title: '前导工序', - align: "center", - dataIndex: 'proProcess', - width: 150, - scopedSlots: {customRender: 'proProcess'} + dictCode: 'zy_process,process_name,id,id in(select process_id from zy_product_process where product_id="1")', + width: '150', + type: JVXETypes.select }, - { - title: '后导工序', - align: "center", - dataIndex: 'proProcess', - width: 150, - scopedSlots: {customRender: 'postProcess'} - }, - { - title: '输入产品', - align: "center", - dataIndex: 'inputProduct', - width: 150, - scopedSlots: {customRender: 'inputProduct'} - }, - { - title: '成品/半成品', - align: "center", - dataIndex: 'semiProduct', - width: 150, - scopedSlots: {customRender: 'semiProduct'} - }, - - // { - // title: 'operation', - // dataIndex: 'operation', - // scopedSlots: {customRender: 'operation'}, - // }, - - // { - // title: '操作', - // dataIndex: 'action', - // align: "center", - // fixed: "right", - // width: 147, - // scopedSlots: {customRender: 'action'} - // } + {key: 'postProcess', title: '后导工序', width: '150', type: JVXETypes.select}, + {key: 'inputProduct', title: '输入产品', width: '150', type: JVXETypes.input}, + {key: 'semiProduct', title: '成品/半成品', width: '150', type: JVXETypes.input}, ], - editingKey: '', url: { list: "/org.jeecg.modules.productplan/zyPlanProcess/getProcessDatalist", - stationToolslist: "/stationTool/list", - stationMachinelist: "/stationMachine/list", - // productPlanlist: "/org.jeecg.modules.productplan/zyProductPlan/list", - delete: "/org.jeecg.modules.productplan/zyPlanProcess/delete", - // deleteBatch: "/org.jeecg.modules.productplan/zyPlanProcess/deleteBatch", - // exportXlsUrl: "/org.jeecg.modules.productplan/zyPlanProcess/exportXls", - // importExcelUrl: "org.jeecg.modules.productplan/zyPlanProcess/importExcel", + stationToolslist: "/stationTool/list2", + stationMachinelist: "/stationMachine/list2", + addProcessBatch: "/org.jeecg.modules.productplan/zyPlanProcess/addProcessBatch", }, loadRouteType: false, planId: "", dictOptions: {}, - // superFieldList: [], + superFieldList: [], + stationList: [], toolsList: [], machineList: [], + clickTrue: true, } }, created() { - this.getSuperFieldList(); - }, - computed: { - importExcelUrl: function () { - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; - }, }, methods: { + + // 【整体保存】点击保存按钮时触发的事件 + handleTableSave({$table, target}) { + console.log("保存开始-----") + // 校验整个表格 + $table.validate().then((errMap) => { + // 校验通过 + if (!errMap) { + // 获取所有数据 + let tableData = target.getTableData() + tableData.forEach(item => { + item.id = ''; + }) + console.log('当前保存的数据是:', tableData) + // // 获取新增的数据 + // let newData = target.getNewData() + // console.log('-- 新增的数据:', newData) + // // 获取删除的数据 + // let deleteData = target.getDeleteData() + // console.log('-- 删除的数据:', deleteData) + + // 【模拟保存】 + this.loading = true + postAction(this.url.addProcessBatch, tableData).then(res => { + if (res.success) { + this.$message.success(`保存成功!`) + } else { + this.$message.warn(`保存失败:` + res.message) + } + }).finally(() => { + this.loading = false + }) + } + }) + }, fanHui() { this.$router.push({ path: '/productplan/ZyPlanProcessList', }); }, - getToolAndMachine(stationId) { - // alert("stationId=" + stationId); - getAction(this.url.stationToolslist, {"stationId": stationId}).then((res) => { - if (res.success) { - this.toolsList = res.result.records || res.result; - console.log("toolsList", JSON.stringify(this.toolsList)) - } else { - this.$message.warning(res.message) - } - }); - getAction(this.url.stationMachinelist, {"stationId": stationId}).then((res) => { - if (res.success) { - this.machineList = res.result.records || res.result; - console.log("machineList", JSON.stringify(this.toolsList)) - } else { - this.$message.warning(res.message) - } - }); - }, //加载传递参数 loadParameter() { if (this.loadRouteType === false) { @@ -307,14 +172,16 @@ export default { } }, loadData(arg) { + console.log("the loadData---------开始"); + // var that = this; if (!this.url.list) { this.$message.error("请设置url.list属性!") return } //加载数据 若传入参数1则加载第一页的内容 - if (arg === 1) { - this.ipagination.current = 1; - } + // if (arg === 1) { + // this.ipagination.current = 1; + // } this.loadParameter(); var params = this.getQueryParams();//查询条件 this.loading = true; @@ -322,19 +189,12 @@ export default { getAction(this.url.list, params).then((res) => { if (res.success) { this.dataSource = res.result.records || res.result; - if (res.result.total) { - this.ipagination.total = res.result.total; - } else { - this.ipagination.total = 0; - } + this.stationList = this.dataSource[0].stationList; } else { + // this.stationIdCode = "station,station_name,id,depart_id in (select workshop_id from zy_product_plan where id='" + this.planId + "')"; this.$message.warning(res.message) } }).finally(() => { - // this.dataSource.forEach(item => { - // item['stationName'] = this.stationName; - // item['stationNum'] = this.stationNum; - // }) this.loading = false }) }, @@ -352,78 +212,61 @@ export default { param.planId = this.planId; return filterObj(param); }, - // initDictConfig() { - // }, - getSuperFieldList() { - // let fieldList = []; - // fieldList.push({type: 'string', value: 'id', text: 'id', dictCode: ''}) - // fieldList.push({type: 'string', value: 'planId', text: '生产计划id', dictCode: ''}) - // fieldList.push({type: 'string', value: 'productName', text: '生产计划id', dictCode: ''}) - // fieldList.push({type: 'string', value: 'stationId', text: '工位id', dictCode: ''}) - // fieldList.push({type: 'string', value: 'machineIds', text: '设备id列表', dictCode: ''}) - // fieldList.push({type: 'string', value: 'toolsIds', text: '工具id列表', dictCode: ''}) - // fieldList.push({type: 'string', value: 'productProcessId', text: '工序id列表', dictCode: ''}) - // fieldList.push({type: 'string', value: 'productProcessId', text: '工序id列表', dictCode: ''}) - // fieldList.push({type: 'string', value: 'userIds', text: '成员id列表', dictCode: ''}) - // this.superFieldList = fieldList - }, - // handleChange(value, key, column) { - // const newData = [...this.data]; - // const target = newData.find(item => key === item.key); - // if (target) { - // target[column] = value; - // this.data = newData; - // } - // }, - edit(key) { - alert("the edit() record =" + JSON.stringify(key)) - // const newData = [...this.data]; - const newData = [...this.dataSource]; - // const newData = record; - console.log("the edit() newData =", JSON.stringify(newData)); - // this.editingKey = '0'; - // record.editable = true; - // const target = newData.find(item => key === item.key); - const target = newData[0]; - console.log("the edit() target =", JSON.stringify(target)); - this.editingKey = key; - console.log("the edit() editingKey =", this.editingKey); - if (target) { - // debugger; - target.editable = true; - this.dataSource = newData; - } - }, - save(key) { - // const newData = [...this.data]; - const newData = this.dataSource; - console.log("save() newData=", JSON.stringify(newData)) - const newCacheData = [...this.cacheData]; - const target = newData.find(item => key === item.key); - const targetCache = newCacheData.find(item => key === item.key); - if (target && targetCache) { - delete target.editable; - this.dataSource = newData; - Object.assign(targetCache, target); - this.cacheData = newCacheData; - } - this.editingKey = ''; + + // 当选择的行变化时触发的事件 + handleSelectRowChange(event) { + console.log("handleSelectRowChange") + console.log("handleSelectRowChange-event:", event) + const {type, row, column, value, target, $table} = event + console.log(JSON.stringify(this.stationList)); + // target.$refs.vxe.columns[6].dictCode = this.stationIdCode; + target.$refs.vxe.columns[6].options = this.stationList; + // 清空后两列的数据 + // target.setValues([{ + // rowKey: row.id, + // values: {machineIds: '', toolsIds: ''} + // }]) + // target.$refs.vxe.columns[4].options = [] }, - cancel(key) { - const newData = this.dataSource; - const target = newData.find(item => key === item.key); - this.editingKey = ''; - if (target) { - Object.assign(target, this.cacheData.find(item => key === item.key)); - delete target.editable; - this.dataSource = newData; + /** 当选项被改变时,联动其他组件 */ + handleValueChange(event) { + const {type, row, column, value, target} = event + console.log("event", event) + console.log("row", row) + // if (type === JVXETypes.select) { + // 第一列 + if (column.key === 'stationId') { + // 设置第二列的 options + console.log('this stationid(row.id):', row.stationId) + // 清空后两列的数据 + target.setValues([{ + rowKey: row.id, + values: {machineIds: '', toolsIds: ''} + }]) + target.$refs.vxe.columns[7].options = [] + target.$refs.vxe.columns[8].options = [] + + getAction(this.url.stationMachinelist, {"stationId": row.stationId}).then((res) => { + if (res.success) { + this.machineList = res.result.records || res.result; + console.log("machineList", JSON.stringify(this.machineList)) + target.$refs.vxe.columns[7].options = this.machineList; + } else { + this.$message.warning(res.message) + } + }); + + getAction(this.url.stationToolslist, {"stationId": row.stationId}).then((res) => { + if (res.success) { + this.toolsList = res.result.records || res.result; + console.log("toolsList", JSON.stringify(this.toolsList)) + target.$refs.vxe.columns[8].options = this.toolsList; + } else { + this.$message.warning(res.message) + } + }); } - }, + } }, }; - \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList_back1223.vue b/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList_back1223.vue index f17cd089..6f91939d 100644 --- a/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList_back1223.vue +++ b/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList_back1223.vue @@ -1,52 +1,13 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 导出 + 导出 + 保存 返回 - - - - - - - - - {{ item.name }} - - + + + {{ item.name }} + + + + + + + + + + + + + + + + + + @@ -110,13 +118,16 @@ export default { ZyPlanProcessModal }, data() { + // this.cacheData = this.dataSource.map(item => ({ ...item })); + this.cacheData = []; return { description: '生产计划工序管理页面', + // columns, // 表头 columns: [ { title: '#', - dataIndex: '', + dataIndex: 'productProcessId', key: 'rowIndex', width: 60, align: "center", @@ -124,21 +135,27 @@ export default { return parseInt(index) + 1; } }, - // { - // title: '计划id', - // align: "center", - // dataIndex: 'planId' - // }, + /* { + title: '计划id', + align: "center", + dataIndex: 'planId' + },*/ { title: '工单编号', align: "center", - dataIndex: 'workOrderId' + dataIndex: 'workOrderId', + scopedSlots: {customRender: 'workOrderId'} }, - { + /*{ title: '产品id', align: "center", dataIndex: 'productId' }, + { + title: '工序id', + align: "center", + dataIndex: 'productProcessId' + },*/ { title: '产品', align: "center", @@ -166,8 +183,8 @@ export default { align: "center", dataIndex: 'toolsList', width: 150, - scopedSlots: {customRender: 'toolsList'} // scopedSlots: {customRender: this.toolsList} + scopedSlots: {customRender: 'toolsList'} }, { title: '工具设备列表', @@ -177,14 +194,50 @@ export default { scopedSlots: {customRender: 'machineList'} }, { - title: '操作', - dataIndex: 'action', + title: '前导工序', align: "center", - fixed: "right", - width: 147, - scopedSlots: {customRender: 'action'} - } + dataIndex: 'proProcess', + width: 150, + scopedSlots: {customRender: 'proProcess'} + }, + { + title: '后导工序', + align: "center", + dataIndex: 'proProcess', + width: 150, + scopedSlots: {customRender: 'postProcess'} + }, + { + title: '输入产品', + align: "center", + dataIndex: 'inputProduct', + width: 150, + scopedSlots: {customRender: 'inputProduct'} + }, + { + title: '成品/半成品', + align: "center", + dataIndex: 'semiProduct', + width: 150, + scopedSlots: {customRender: 'semiProduct'} + }, + + // { + // title: 'operation', + // dataIndex: 'operation', + // scopedSlots: {customRender: 'operation'}, + // }, + + // { + // title: '操作', + // dataIndex: 'action', + // align: "center", + // fixed: "right", + // width: 147, + // scopedSlots: {customRender: 'action'} + // } ], + editingKey: '', url: { list: "/org.jeecg.modules.productplan/zyPlanProcess/getProcessDatalist", stationToolslist: "/stationTool/list", @@ -198,7 +251,7 @@ export default { loadRouteType: false, planId: "", dictOptions: {}, - superFieldList: [], + // superFieldList: [], toolsList: [], machineList: [], } @@ -295,48 +348,75 @@ export default { // initDictConfig() { // }, getSuperFieldList() { - let fieldList = []; - fieldList.push({type: 'string', value: 'planId', text: '生产计划id', dictCode: ''}) - fieldList.push({type: 'string', value: 'stationId', text: '工位id', dictCode: ''}) - fieldList.push({type: 'string', value: 'machineIds', text: '设备id列表', dictCode: ''}) - fieldList.push({type: 'string', value: 'toolsIds', text: '工具id列表', dictCode: ''}) - fieldList.push({type: 'string', value: 'processIds', text: '工序id列表', dictCode: ''}) - fieldList.push({type: 'string', value: 'userIds', text: '成员id列表', dictCode: ''}) - this.superFieldList = fieldList + // let fieldList = []; + // fieldList.push({type: 'string', value: 'id', text: 'id', dictCode: ''}) + // fieldList.push({type: 'string', value: 'planId', text: '生产计划id', dictCode: ''}) + // fieldList.push({type: 'string', value: 'productName', text: '生产计划id', dictCode: ''}) + // fieldList.push({type: 'string', value: 'stationId', text: '工位id', dictCode: ''}) + // fieldList.push({type: 'string', value: 'machineIds', text: '设备id列表', dictCode: ''}) + // fieldList.push({type: 'string', value: 'toolsIds', text: '工具id列表', dictCode: ''}) + // fieldList.push({type: 'string', value: 'productProcessId', text: '工序id列表', dictCode: ''}) + // fieldList.push({type: 'string', value: 'productProcessId', text: '工序id列表', dictCode: ''}) + // fieldList.push({type: 'string', value: 'userIds', text: '成员id列表', dictCode: ''}) + // this.superFieldList = fieldList }, - // jumpPage1(record) { - // this.$router.push({ - // // path: '/productplan/ZyProductPlanList', - // path: '/productplan/ZyPlanProcessDataList', - // - // // query: { // 路由携带参数 - // // 'stationId': record.id, - // // 'stationName': record.stationName, - // // }, - // }); - // }, - // pf(record) { - // this.$router.push({ - // path: '/productplan/ZyPlanProcessAddList', - // query: { // 路由携带参数 - // } - // }); - - // getAction("productPlanlist", {id: record.id}).then((res) => { - // if (res.success) { - // this.$router.push({ - // path: '/src/views/processassessment/assessmentCourse/ClassOpeningTaskList', - // query: { // 路由携带参数 - // } - // }); - // } else { - // this.$message.error(res.message) + // handleChange(value, key, column) { + // const newData = [...this.data]; + // const target = newData.find(item => key === item.key); + // if (target) { + // target[column] = value; + // this.data = newData; // } - // }); // }, - } -} + edit(key) { + alert("the edit() record =" + JSON.stringify(key)) + // const newData = [...this.data]; + const newData = [...this.dataSource]; + // const newData = record; + console.log("the edit() newData =", JSON.stringify(newData)); + // this.editingKey = '0'; + // record.editable = true; + // const target = newData.find(item => key === item.key); + const target = newData[0]; + console.log("the edit() target =", JSON.stringify(target)); + this.editingKey = key; + console.log("the edit() editingKey =", this.editingKey); + if (target) { + // debugger; + target.editable = true; + this.dataSource = newData; + } + }, + save(key) { + // const newData = [...this.data]; + const newData = this.dataSource; + console.log("save() newData=", JSON.stringify(newData)) + const newCacheData = [...this.cacheData]; + const target = newData.find(item => key === item.key); + const targetCache = newCacheData.find(item => key === item.key); + if (target && targetCache) { + delete target.editable; + this.dataSource = newData; + Object.assign(targetCache, target); + this.cacheData = newCacheData; + } + this.editingKey = ''; + }, + cancel(key) { + const newData = this.dataSource; + const target = newData.find(item => key === item.key); + this.editingKey = ''; + if (target) { + Object.assign(target, this.cacheData.find(item => key === item.key)); + delete target.editable; + this.dataSource = newData; + } + }, + }, +}; \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessList.vue b/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessList.vue index 0177564e..fd3b237b 100644 --- a/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessList.vue +++ b/ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessList.vue @@ -20,17 +20,17 @@ - - - - - 删除 - - - 批量操作 - - - + + + + + + + + + + + @@ -171,12 +171,12 @@ export default { dataIndex: 'toolsIds_dictText', scopedSlots: {customRender: 'toolsIds_dictText'} }, - { - title: '成员', - align: "center", - dataIndex: 'userIds_dictText', - scopedSlots: {customRender: 'userIds_dictText'} - }, + // { + // title: '成员', + // align: "center", + // dataIndex: 'userIds_dictText', + // scopedSlots: {customRender: 'userIds_dictText'} + // }, { title:'前导工序', align:"center", diff --git a/ant-design-vue-jeecg/src/views/starehouse/admin/StarehouseList.vue b/ant-design-vue-jeecg/src/views/starehouse/admin/StarehouseList.vue new file mode 100644 index 00000000..d44ef7ec --- /dev/null +++ b/ant-design-vue-jeecg/src/views/starehouse/admin/StarehouseList.vue @@ -0,0 +1,257 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 查询 + 重置 + + {{ toggleSearchStatus ? '收起' : '展开' }} + + + + + + + + + + + + 新增 + 导出 + + 导入 + + + + + + 删除 + + 批量操作 + + + + + + + 已选择 {{ selectedRowKeys.length }}项 + 清空 + + + + + + + + + 无图片 + + + + 无文件 + + 下载 + + + + + 编辑 + + + + 更多 + + + 详情 + + + handleDelete(record.id)"> + 删除 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/starehouse/admin/modules/StarehouseForm.vue b/ant-design-vue-jeecg/src/views/starehouse/admin/modules/StarehouseForm.vue new file mode 100644 index 00000000..b7698e44 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/starehouse/admin/modules/StarehouseForm.vue @@ -0,0 +1,160 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/starehouse/admin/modules/StarehouseModal.vue b/ant-design-vue-jeecg/src/views/starehouse/admin/modules/StarehouseModal.vue new file mode 100644 index 00000000..a0d225f9 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/starehouse/admin/modules/StarehouseModal.vue @@ -0,0 +1,60 @@ + + + + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/starehouse/admin/modules/StarehouseModal__Style#Drawer.vue b/ant-design-vue-jeecg/src/views/starehouse/admin/modules/StarehouseModal__Style#Drawer.vue new file mode 100644 index 00000000..bf8593e7 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/starehouse/admin/modules/StarehouseModal__Style#Drawer.vue @@ -0,0 +1,84 @@ + + + + + + + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/system/User2ListRef.vue b/ant-design-vue-jeecg/src/views/system/User2ListRef.vue index 2462d157..3258a38d 100644 --- a/ant-design-vue-jeecg/src/views/system/User2ListRef.vue +++ b/ant-design-vue-jeecg/src/views/system/User2ListRef.vue @@ -11,14 +11,17 @@ @@ -40,10 +43,12 @@ import JSuperQuery from '@/components/jeecg/JSuperQuery' import JThirdAppButton from '@/components/jeecgbiz/thirdApp/JThirdAppButton' import UserModalDetail from './modules/UserModalDetail' import {filterObj} from "@/utils/util"; +import {mixinDevice} from '@/utils/mixin' + export default { name: "User2ListRef", - mixins: [JeecgListMixin], + mixins: [JeecgListMixin, mixinDevice], components: { JThirdAppButton, SysUserAgentModal, @@ -58,7 +63,7 @@ export default { return { description: '这是用户管理页面', queryParam: {}, - groupxId:'', + groupId:'', recycleBinVisible: false, columns: [ /*{ @@ -138,19 +143,27 @@ export default { // } ], - // superQueryFieldList: [ - // {type: 'input', value: 'username', text: '用户账号',}, - // {type: 'input', value: 'realname', text: '用户姓名',}, - // {type: 'select', value: 'sex', text: '性别', dictCode: 'sex'}, - // ], url: { - syncUser: "/act/process/extActProcess/doSyncUser", - listByDepartId: "/sys/user/listByDepartId", - delete: "/sys/user/delete", - deleteBatch: "/sys/user/deleteBatch", - exportXlsUrl: "/sys/user/exportXls", - importExcelUrl: "sys/user/importExcel", + list: "/sys/user/listByDepartId", + }, + loadRouteType: false, + dictOptions:{ + }, + /* 分页参数 */ + ipagination:{ + current: 1, + pageSize: 5, + pageSizeOptions: ['5', '10', '50'], + showTotal: (total, range) => { + return range[0] + "-" + range[1] + " 共" + total + "条" + }, + showQuickJumper: true, + showSizeChanger: true, + total: 0 }, + selectedMainId:'', + superFieldList:[], + selectedRowKeys: [], } }, computed: { @@ -158,23 +171,24 @@ export default { return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; } }, - created() { - this.loadData(); - }, + // created() { + // this.loadData(); + // }, methods: { // valueChange(value) { // if (value) this.loadData() // }, + //加载传递参数 loadParameter() { if (this.loadRouteType === false) { - this.groupxId = this.$router. + this.groupId = this.$route.query.groupxId; this.loadRouteType = true; } }, - loadData2(groupxId) { - alert("loadData groupxId:"+groupxId) - if (!this.url.listByDepartId) { + loadData(arq) { + // alert("loadData groupId:"+arq) + if (!this.url.list) { this.$message.error("请设置url.list属性!") return } @@ -182,11 +196,12 @@ export default { // if (arg === 1) { // this.ipagination.current = 1; // } + this.onClearSelected(); this.loadParameter(); var params = this.getQueryParams();//查询条件 this.loading = true; - console.log("----------------the params:", params); - getAction(this.url.listByDepartId, params).then((res) => { + console.log("----------------loadData()-the params:", params); + getAction(this.url.list, params).then((res) => { if (res.success) { this.dataSource = res.result.records || res.result; if (res.result.total) { @@ -198,10 +213,10 @@ export default { this.$message.warning(res.message) } }).finally(() => { - this.dataSource.forEach(item => { - item['stationName'] = this.stationName; - item['stationNum'] = this.stationNum; - }) + // this.dataSource.forEach(item => { + // item['stationName'] = this.stationName; + // item['stationNum'] = this.stationNum; + // }) this.loading = false }) }, @@ -216,7 +231,7 @@ export default { param.field = this.getQueryField(); param.pageNo = this.ipagination.current; param.pageSize = this.ipagination.pageSize; - param.groupxId = this.groupxId; + param.groupId = this.groupId; return filterObj(param); }, onClearSelected() { @@ -228,6 +243,15 @@ export default { console.log('selectedRowKeys changed: ', selectedRowKeys); this.selectedRowKeys = selectedRowKeys; }, + clickThenSelect(record) { + return { + on: { + click: () => { + this.onSelectChange(record.id.split(","), [record]); + } + } + } + }, } } diff --git a/ant-design-vue-jeecg/src/views/team/GroupxList.vue b/ant-design-vue-jeecg/src/views/team/GroupxList.vue index 3f2afa55..4256b0c9 100644 --- a/ant-design-vue-jeecg/src/views/team/GroupxList.vue +++ b/ant-design-vue-jeecg/src/views/team/GroupxList.vue @@ -16,26 +16,31 @@ - - - - - - - - - - - - + + + + + + + + + + + + + + + + + 查询 重置 - - {{ toggleSearchStatus ? '收起' : '展开' }} - - + + + + diff --git a/ant-design-vue-jeecg/src/views/team/GroupxMemberList.vue b/ant-design-vue-jeecg/src/views/team/GroupxMemberList.vue index 6a04cc9f..2ce52a4b 100644 --- a/ant-design-vue-jeecg/src/views/team/GroupxMemberList.vue +++ b/ant-design-vue-jeecg/src/views/team/GroupxMemberList.vue @@ -1,65 +1,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 新增 导出 - - - - - - - - - - - - - - - 返回 @@ -141,12 +86,12 @@ export default { { title: '工号', align: "center", - dataIndex: 'workNo_dictText' + dataIndex: 'workNo' }, { title: '成员名称', align: "center", - dataIndex: 'userId_dictText' + dataIndex: 'userId' }, { title: '加入时间', @@ -253,6 +198,6 @@ export default { } } - \ No newline at end of file + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/team/StationList.vue b/ant-design-vue-jeecg/src/views/team/StationList.vue index 5d09a1e9..e2b50faa 100644 --- a/ant-design-vue-jeecg/src/views/team/StationList.vue +++ b/ant-design-vue-jeecg/src/views/team/StationList.vue @@ -84,7 +84,9 @@ {{ text }} - {{ text }} + {{ + text + }} @@ -92,12 +94,13 @@ {{ text }} - {{ text }} + {{ + text + }} - 管理 @@ -112,6 +115,10 @@ handleDelete2(record.id)"> 删除 + + 升序 + + 降序 @@ -214,6 +221,8 @@ export default { url: { list: "/team/station/list", queryIsCanDelete: "/team/station/queryIsCanDelete", + up: "/team/station/up", + down: "/team/station/down", delete: "/team/station/delete", deleteBatch: "/team/station/deleteBatch", exportXlsUrl: "/team/station/exportXls", @@ -279,9 +288,30 @@ export default { } }) }, + + up(id) { + getAction(this.url.up, {id: id}).then((res) => { + if (res.success) { + this.loadData(); + this.$message.success(res.message); + } else { + this.$message.warning(res.message); + } + }) + }, + down(id) { + getAction(this.url.down, {id: id}).then((res) => { + if (res.success) { + this.loadData(); + this.$message.success(res.message); + } else { + this.$message.warning(res.message); + } + }) + }, } } - \ No newline at end of file + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/team/StationMachineList.vue b/ant-design-vue-jeecg/src/views/team/StationMachineList.vue index 70a4aeee..8bff2842 100644 --- a/ant-design-vue-jeecg/src/views/team/StationMachineList.vue +++ b/ant-design-vue-jeecg/src/views/team/StationMachineList.vue @@ -146,11 +146,11 @@ export default { align: "center", dataIndex: 'stationName', }, - // { - // title: '设备ID', - // align: "center", - // dataIndex: 'machineId' - // }, + { + title: '设备编号', + align: "center", + dataIndex: 'machineId' + }, { title: '设备名称', align: "center", diff --git a/ant-design-vue-jeecg/src/views/team/StationToolList.vue b/ant-design-vue-jeecg/src/views/team/StationToolList.vue index bb576a5a..7aa6b5fb 100644 --- a/ant-design-vue-jeecg/src/views/team/StationToolList.vue +++ b/ant-design-vue-jeecg/src/views/team/StationToolList.vue @@ -144,11 +144,11 @@ export default { align: "center", dataIndex: 'stationName', }, - // { - // title: '工具ID', - // align: "center", - // dataIndex: 'toolsId' - // }, + { + title: '工具编号', + align: "center", + dataIndex: 'toolsId' + }, { title: '工具名称', align: "center", diff --git a/ant-design-vue-jeecg/src/views/team/modules/GroupxMemberModal.vue b/ant-design-vue-jeecg/src/views/team/modules/GroupxMemberModal.vue index 5eadd80c..9c8d1857 100644 --- a/ant-design-vue-jeecg/src/views/team/modules/GroupxMemberModal.vue +++ b/ant-design-vue-jeecg/src/views/team/modules/GroupxMemberModal.vue @@ -39,15 +39,16 @@ export default { confirmLoading: false, validatorRules: { - userId: [ - {required: true, message: "成员不能为空"}, - ], + // userId: [ + // {required: true, message: "成员不能为空"}, + // ], // joinTime: [ // {required: true}, // ] }, url: { add: "/groupxMember/add", + list: "/sys/user/listByDepartId", addBatch: "/groupxMember/addBatch", edit: "/groupxMember/edit", } @@ -58,10 +59,9 @@ export default { add(groupxId) { this.model.groupxId = groupxId; console.log("Modal层接收到上级参数-groupxId:" + this.model.groupxId); - this.$refs["modalForm"].loadData2(this.model.groupxId); this.edit(this.model); }, - // add () { + // add() { // //初始化默认值 // this.edit({}); // }, @@ -76,13 +76,8 @@ export default { this.$refs.form.clearValidate(); }, handleOk2() { - // this.$refs["modalForm2"].loadData(this.model.groupxId); this.model.userId = this.$refs["modalForm"].selectedRowKeys.toString(); - // console.log("model.toolids:"+this.model.toolsId); const that = this; - // 触发表单验证 - // this.$refs.form.validate(valid => { - // if (valid) { that.confirmLoading = true; let httpurl = ''; let method = ''; @@ -104,53 +99,12 @@ export default { }).finally(() => { that.confirmLoading = false; that.close(); - }) - // } else { - // return false; - // } - // }) - }, - handleOk() { - const that = this; - // 触发表单验证 - this.$refs.form.validate(valid => { - if (valid) { - that.confirmLoading = true; - let httpurl = ''; - let method = ''; - if (!this.model.id) { - httpurl += this.url.addBatch; - method = 'post'; - } else { - httpurl += this.url.edit; - method = 'put'; - } - console.log("----------the add() model:", this.model); - httpAction(httpurl, this.model, method).then((res) => { - if (res.success) { - that.$message.success(res.message); - that.$emit('ok'); - } else { - that.$message.warning(res.message); - } - }).finally(() => { - that.confirmLoading = false; - that.close(); - }) - } else { - return false; - } + that.loadData(); }) }, handleCancel() { this.close() }, - - - } + }, } - - - \ No newline at end of file + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/team/modules/GroupxModal.vue b/ant-design-vue-jeecg/src/views/team/modules/GroupxModal.vue index e1e47dc5..e0a7a31a 100644 --- a/ant-design-vue-jeecg/src/views/team/modules/GroupxModal.vue +++ b/ant-design-vue-jeecg/src/views/team/modules/GroupxModal.vue @@ -67,7 +67,7 @@ export default { }, data() { return { - enterprisesManager: "sys_user,username,id", + enterprisesManager: "sys_user,realname,id", title: "操作", visible: false, // mobileVal: "", diff --git a/ant-design-vue-jeecg/src/views/team/modules/StationMachineModal.vue b/ant-design-vue-jeecg/src/views/team/modules/StationMachineModal.vue index e2dad99c..9136ab59 100644 --- a/ant-design-vue-jeecg/src/views/team/modules/StationMachineModal.vue +++ b/ant-design-vue-jeecg/src/views/team/modules/StationMachineModal.vue @@ -27,19 +27,18 @@ - +
{{ text }}