diff --git a/Web/.env.development b/Web/.env.development index 2fa25ba..8b26cbf 100644 --- a/Web/.env.development +++ b/Web/.env.development @@ -2,4 +2,4 @@ ENV = 'development' # base api -VITE_API_BASE_URL = 'http://192.168.1.228:7629/' +VITE_API_BASE_URL = 'http://192.168.1.228:7629' diff --git a/Web/src/api/common/index.js b/Web/src/api/common/index.js index fa085a6..010fe15 100644 --- a/Web/src/api/common/index.js +++ b/Web/src/api/common/index.js @@ -10,6 +10,24 @@ export function getCommonPaged(urlName,data) { }) } +// 通过id获取实体 +export function getCommonInfoById(urlName,id) { + return request({ + url: `/api/${urlName}/getbyid`, + method: 'get', + params:{id:id} + }) +} + +// 修改提交 +export function putCommonUpdate(urlName,data) { + return request({ + url: `/api/${urlName}/update`, + method: 'put', + data + }) +} + // 导出 export function postCommonExport(urlName,data) { return request({ diff --git a/Web/src/components/apiEditPop/index.vue b/Web/src/components/apiEditPop/index.vue new file mode 100644 index 0000000..4c6fc3b --- /dev/null +++ b/Web/src/components/apiEditPop/index.vue @@ -0,0 +1,178 @@ + + + \ No newline at end of file diff --git a/Web/src/components/elTable/index.vue b/Web/src/components/elTable/index.vue index 19505c7..fcb12fa 100644 --- a/Web/src/components/elTable/index.vue +++ b/Web/src/components/elTable/index.vue @@ -5,7 +5,34 @@ :data="props.tableData" :border="true" @sort-change="sortChange" + @selection-change="tableSelectionHandle" > + + + + + + + + + :header-align="item.headerAlign || props.columnHeaderAlign"> + + + + + @@ -43,6 +89,31 @@ const state = reactive({}) const props = defineProps({ + // 多选 + multipleTable:{ + type: Boolean, + default: false + }, + // 左侧操作列 + leftOperation:{ + type: Object, + default: null + }, + // 左侧操作列宽度 + leftOperationColumnWidth:{ + type: Number, + default: 120 + }, + // 右侧操作列 + rightOperation:{ + type: Object, + default: null + }, + // 右侧操作列宽度 + rightOperationColumnWidth:{ + type: Number, + default: 120 + }, // table数据 tableData: { type: Object, @@ -70,6 +141,18 @@ }, }) + const emits = defineEmits([ + 'sortChange', + 'leftOperationHadel', + 'rightOperationHadel', + 'tableSelectionHandle' + ]) + + // 多选 + function tableSelectionHandle (val){ + emits('tableSelectionHandle',val) + } + // 格式化时间 function formatTableDate(time) { let _time = '-' @@ -80,14 +163,36 @@ // 格式化TagFilter function formatTableTagFilter(type,row,item){ let _op = item.options.filter(op=>op.value == row[item.prop]) - if(_op && _op.length > 0){ return _op[0][type] } + if(!_op || _op.length <=0 || !_op[0][type]){ + if(type=='type'){return 'info'} + else{return '--'} + }else{ + return _op[0][type] + } } - const emits = defineEmits(['sortChange']) + //排序 function sortChange(data) { emits('sortChange',data) } + + // 左侧操作列 + function leftOperationHadel(btn,scope) { + emits('leftOperationHadel',btn,scope) + } + + // 判断是否显示右侧操作权限 + function getShowRightOpera(){ + let _arr = [] + props.rightOperation.forEach(item=>{_arr.push(item.auth)}) + return _arr + } + + // 右侧操作列 + function rightOperationHadel(btn,scope) { + emits('rightOperationHadel',btn,scope) + } onMounted(() => {}) diff --git a/Web/src/components/importPop/index.vue b/Web/src/components/importPop/index.vue index ae08abf..cb678b1 100644 --- a/Web/src/components/importPop/index.vue +++ b/Web/src/components/importPop/index.vue @@ -32,8 +32,8 @@
- 确定 取消 + 确定
@@ -69,8 +69,10 @@ const props = defineProps({ default: '.xlsx,.xls' }, }) - -const importUrl = `/api/${props.apiName}/import` +const mode = import.meta.env.MODE +let app_base_api = mode == 'prod' ? systemConfig.baseUrl : import.meta.env.VITE_API_BASE_URL +const importUrl = `${app_base_api}/api/${props.apiName}/import` +console.log('importUrl',importUrl) /** 重置表单 */ const resetForm = () => { @@ -125,38 +127,15 @@ const submitForm = async () => { // /** 文件上传成功 */ const emits = defineEmits(['success']) -// todo:成功后处理 +// 成功后处理 const submitFormSuccess = (response: any) => { - formLoading.value = true + formLoading.value = false if (response) { if(response.code == '200'){ ElMessage.success('导入成功!') }else{ ElMessage.error(response.msg) } - // if (response.code == 500) { - // uploadRef.value!.clearFiles() - // ElMessage.error('导入失败') - // formLoading.value = false - // return - // } - // // todo:错误下载 - // else if (response.code == 0) { - // if (response.data.errorCount > 0) { - // ElMessage.confirm('文件中有部分数据导入失败,是否下载失败数据?').then(async () => { - // // todo:失败下载链接 - // window.open( - // getJmreportBaseUrl() + response.data.errorFile, - // 'TITLE' - // ) - // }) - // } else { - // ElMessage.success('导入成功') - // } - // } - // else if(response.data == null){ - // ElMessage.error(response.msg) - // } } // 发送操作成功的事件 diff --git a/Web/src/components/tablePage/index.vue b/Web/src/components/tablePage/index.vue index 30011b4..45fd6a2 100644 --- a/Web/src/components/tablePage/index.vue +++ b/Web/src/components/tablePage/index.vue @@ -1,8 +1,9 @@ \ No newline at end of file diff --git a/Web/src/views/logisticsPlan/supplierConMmrp/index.vue b/Web/src/views/logisticsPlan/supplierConMmrp/index.vue new file mode 100644 index 0000000..2222b5f --- /dev/null +++ b/Web/src/views/logisticsPlan/supplierConMmrp/index.vue @@ -0,0 +1,26 @@ + + + \ No newline at end of file diff --git a/Web/src/views/logisticsPlan/supplierProPlaning/index.vue b/Web/src/views/logisticsPlan/supplierProPlaning/index.vue index 2de8b53..656d40a 100644 --- a/Web/src/views/logisticsPlan/supplierProPlaning/index.vue +++ b/Web/src/views/logisticsPlan/supplierProPlaning/index.vue @@ -15,15 +15,9 @@ const state = reactive({ apiName:'supplierproplaning', searchFilter: { materialCode: null, - // createTime:null, - // isDelete:null, - // quantity1:null }, searchOptions:[ {type:'input',prop:'materialCode',label:'物料号'}, - // {type:'datetimerange',prop:'createTime',label:'创建时间'}, - // {type:'number',prop:'quantity1',label:'数量1'}, - // {type:'select',prop:'isDelete',label:'是否删除',options:EnumList.whether,noSearch:true}, ], }) \ No newline at end of file diff --git a/Web/src/views/logisticsPlan/supplierSinvData/index.vue b/Web/src/views/logisticsPlan/supplierSinvData/index.vue new file mode 100644 index 0000000..abc9d25 --- /dev/null +++ b/Web/src/views/logisticsPlan/supplierSinvData/index.vue @@ -0,0 +1,39 @@ + + + \ No newline at end of file diff --git a/Web/src/views/productionQuality/supplierProMaterialStock/index.vue b/Web/src/views/productionQuality/supplierProMaterialStock/index.vue new file mode 100644 index 0000000..79a2213 --- /dev/null +++ b/Web/src/views/productionQuality/supplierProMaterialStock/index.vue @@ -0,0 +1,54 @@ + + + \ No newline at end of file diff --git a/Web/src/views/task/taskSub/index.vue b/Web/src/views/task/taskSub/index.vue new file mode 100644 index 0000000..5db682a --- /dev/null +++ b/Web/src/views/task/taskSub/index.vue @@ -0,0 +1,75 @@ + + + + \ No newline at end of file