diff --git a/src/api/model/asm.js b/src/api/model/asm.js index e034267d..641f2633 100644 --- a/src/api/model/asm.js +++ b/src/api/model/asm.js @@ -3,9 +3,41 @@ import http from "@/utils/request" export default { // 固定资产 + assetcate: { + list: { + req: async function(data){ + return await http.get( + `${config.API_URL}/asm/assetcate/`, + data + ); + } + }, + item: { + req: async function(id){ + return await http.get( + `${config.API_URL}/asm/assetcate/${id}/`, + ); + } + }, + create: { + name: "新增", + req: async function(data){ + return await http.post( + `${config.API_URL}/asm/assetcate/`, + data); + } + }, + delete: { + name: "删除", + req: async function(id){ + return await http.delete( + `${config.API_URL}/asm/assetcate/${id}/` + ); + } + }, + }, asset: { list: { - name: "供应商审核", req: async function(data){ return await http.get( `${config.API_URL}/asm/asset/`, @@ -16,7 +48,24 @@ export default { item: { req: async function(id){ return await http.get( - `${config.API_URL}asm/asset/${id}/`, + `${config.API_URL}/asm/asset/${id}/`, + ); + } + }, + }, + assetlog: { + list: { + req: async function(data){ + return await http.get( + `${config.API_URL}/asm/assetlog/`, + data + ); + } + }, + item: { + req: async function(id){ + return await http.get( + `${config.API_URL}/asm/assetlog/${id}/`, ); } }, @@ -24,7 +73,7 @@ export default { name: "新增", req: async function(data){ return await http.post( - `${config.API_URL}/asm/asset/`, + `${config.API_URL}/asm/assetlog/`, data); } }, @@ -32,9 +81,9 @@ export default { name: "删除", req: async function(id){ return await http.delete( - `${config.API_URL}/asm/asset/${id}/` + `${config.API_URL}/asm/assetlog/${id}/` ); } }, }, -} +}; \ No newline at end of file diff --git a/src/components/xtSelect/index.vue b/src/components/xtSelect/index.vue index a6924eb9..94c622a5 100644 --- a/src/components/xtSelect/index.vue +++ b/src/components/xtSelect/index.vue @@ -89,7 +89,7 @@ const props = defineProps({ options: { type: Array, default: null }, }); -const emit = defineEmits(["update:modelValue", "update:obj", "update:label", "change"]); +const emit = defineEmits(["update:modelValue", "update:obj", "change"]); const selectable = (row) => row.count_canhandover?row.count_canhandover>0:true; // 控制 popover 显示与隐藏的状态 const showPopover = ref(false); @@ -189,8 +189,8 @@ const rowClick = (row) => { selectLabel.value = row[props.labelField]; selectValue.value = row[props.valueField]; showPopover.value = false; + emit("change", row); } - emit("change"); }; const handleClear = () => { @@ -202,8 +202,7 @@ const handleClear = () => { selectLabel.value = ""; selectValue.value = null; } - emit("update:label", ""); - emit("change"); + emit("change", props.multiple ? [] : null); }; const tdChange = (res, tableData) => { @@ -219,8 +218,7 @@ const selectionChange = (val) => { selectLabel.value = val .map((item) => item[props.labelField]) .join(props.splitField); - } - emit("update:label", val); - emit("change"); + emit("change", val); + } }; diff --git a/src/views/asm/asset.vue b/src/views/asm/asset.vue new file mode 100644 index 00000000..27cc0dd6 --- /dev/null +++ b/src/views/asm/asset.vue @@ -0,0 +1,62 @@ + + \ No newline at end of file diff --git a/src/views/asm/assetcate.vue b/src/views/asm/assetcate.vue new file mode 100644 index 00000000..27f50bae --- /dev/null +++ b/src/views/asm/assetcate.vue @@ -0,0 +1,55 @@ + + \ No newline at end of file diff --git a/src/views/asm/assetcate_form.vue b/src/views/asm/assetcate_form.vue new file mode 100644 index 00000000..cb5f3ca7 --- /dev/null +++ b/src/views/asm/assetcate_form.vue @@ -0,0 +1,113 @@ + + + \ No newline at end of file diff --git a/src/views/asm/assetlog.vue b/src/views/asm/assetlog.vue new file mode 100644 index 00000000..ff4d9d18 --- /dev/null +++ b/src/views/asm/assetlog.vue @@ -0,0 +1,59 @@ + + \ No newline at end of file diff --git a/src/views/asm/assetlogin_form.vue b/src/views/asm/assetlogin_form.vue new file mode 100644 index 00000000..0058408a --- /dev/null +++ b/src/views/asm/assetlogin_form.vue @@ -0,0 +1,189 @@ + + + \ No newline at end of file diff --git a/src/views/hrm/resignation_form.vue b/src/views/hrm/resignation_form.vue index 2f022b1b..b305a6e1 100644 --- a/src/views/hrm/resignation_form.vue +++ b/src/views/hrm/resignation_form.vue @@ -3,7 +3,17 @@ - {{ formData.employee_name }}({{ formData.belong_dept_name }} - {{ formData.post_name }}) + + + + + @@ -64,6 +65,7 @@ export default { return { redirect: undefined, userType: "admin", + project_code:"", visitorsdialog: false, visitorform: {}, form: { @@ -105,7 +107,10 @@ export default { immediate: true, }, }, - mounted() { }, + mounted() { + this.project_code = this.$TOOL.data.get("BASE_INFO").base.base_code; + console.log('this.project_code',this.project_code); + }, methods: { async login() { let that = this; diff --git a/src/views/statistics/bxerp/mioitemw.vue b/src/views/statistics/bxerp/mioitemw.vue new file mode 100644 index 00000000..7573aded --- /dev/null +++ b/src/views/statistics/bxerp/mioitemw.vue @@ -0,0 +1,131 @@ + + + + + diff --git a/src/views/statistics/bxerp/workerTimes.vue b/src/views/statistics/bxerp/workerTimes.vue index c2eab7e7..c6282a31 100644 --- a/src/views/statistics/bxerp/workerTimes.vue +++ b/src/views/statistics/bxerp/workerTimes.vue @@ -8,6 +8,7 @@ v-model="query.user_name" :valueField="'name'" :labelField="'name'" + :params="params" v-model:label="query.user_name" style="width:150px; margin-right: 5px;" > @@ -86,6 +87,9 @@ export default { user_name:'', start_date:'', }, + params:{ + ubelong_dept__name:"冷加工", + }, lists:[], mgruops:[], tableData:[], @@ -161,7 +165,7 @@ export default { let all = 0; that.coefficient.forEach(item2 => { if(item1[item2]){ - all = all+ Number(item1[item2])*Number(that.tableData[0][item2]) + all = all+ Number(item1[item2])/Number(that.tableData[0][item2]) } }) item1.time_all = all+Number(item1.time_other); @@ -174,7 +178,7 @@ export default { console.log('index',index) that.coefficient.forEach(item2 => { if(that.tableData[index][item2]){ - all = all+ Number(that.tableData[index][item2])*Number(that.tableData[0][item2]) + all = all+ Number(that.tableData[index][item2])/Number(that.tableData[0][item2]) } that.tableData[index].time_all = all+Number(that.tableData[index].time_other); }) diff --git a/src/views/wpm_bx/handover_form.vue b/src/views/wpm_bx/handover_form.vue index 1df7de81..86181b02 100644 --- a/src/views/wpm_bx/handover_form.vue +++ b/src/views/wpm_bx/handover_form.vue @@ -160,7 +160,7 @@ - + - + { + console.log('that.type',that.type,'that.mtype',that.mtype) + if(that.type==20||that.type==50||(that.type==10&&that.mtype==30)||(that.mtype==30&&that.new_wm!=='')){ + that.form.recive_mgroup = that.mgroupId; + } + }) // type=10 正常交接 物料都可交接,接收工段有限制 // type=20 返工交接 不合格品交接,接收工段为该工艺流程中的工段 // type=30 物料检验 合格品交接,检验部接收 @@ -755,9 +759,6 @@ export default { let that = this; that.$refs.dialogForm.validate(async (valid) => { if (valid) { - if(that.mtype==30){ - that.form.recive_mgroup = that.form.send_mgroup; - } that.form.mtype=that.mtype; if(that.route_code=='shangpaipingmo'){ that.form.handoverb.forEach(item=>{ @@ -771,7 +772,7 @@ export default { }) } //合批、分批、报废,这三个交接操作直接创建并提交 - if(that.mtype==20||that.mtype==30||that.type==40){ + if(that.mtype==20||(that.mtype==30&&that.type==50&&that.new_wm!=='')||(that.mtype==30&&that.type==10)||that.type==40){ that.$API.wpm.handover.createsubmit.req(that.form).then((res) => { that.isSaveing = false; that.$emit("success"); diff --git a/src/views/wpm_bx/handover_form2.vue b/src/views/wpm_bx/handover_form2.vue index ca2cd6cf..c294bd57 100644 --- a/src/views/wpm_bx/handover_form2.vue +++ b/src/views/wpm_bx/handover_form2.vue @@ -30,14 +30,16 @@ - 选择物料: + 选择物料: 数量:{{ listItem.count }} - -
- {{ item2.number }} - + +
+
+ {{ item2.number }} + +
+
+ {{ item2.number }} +
-
+ + + + + + @@ -141,6 +153,7 @@ export default { trigger: "blur", }, }, + route_code:"", batchOrign:{}, wprOptions: [], materialOptions: [], @@ -152,6 +165,9 @@ export default { }, mounted() { let that = this; + let paths = that.$route.path; + let arr = paths.split("/"); + that.route_code = arr[2]; that.form.type = that.type; that.form.handle_date = that.form.send_date = that.$TOOL.dateFormat2(new Date()); that.form.send_mgroup = that.form.recive_mgroup = that.mgroupId; @@ -162,6 +178,9 @@ export default { getWpr(id){ let that = this; that.$API.wpm.wpr.list.req({page:0,wm:id}).then((res) => { + res.forEach(item=>{ + item.checked = false; + }) that.wprOptions = res; }); }, @@ -218,25 +237,27 @@ export default { if(arrs.length>1){ that.form.handoverb[index].wpr = ''; arrs.forEach(arr=>{ - that.wprOptions.forEach(item=>{ + let obj = {}; + obj.number = arr; + let options = that.wprOptions.filter(item=>{return item.number.indexOf(arr) > -1&&!item.disabled}); + if(options.length>0){ + obj.wpr = options[0].id; + barchArrs.push(arr); + } + that.form.handoverb[index].handoverbw.push(obj); + that.wprOptions.forEach(item=>{ if(item.number.indexOf(arr) > -1&&!item.disabled){ item.disabled = true; - let obj = {}; - obj.number = item.number; - obj.wpr = item.id; - barchArrs.push(arr); - that.form.handoverb[index].handoverbw.push(obj); - that.form.handoverb[index].count = that.form.handoverb[index].handoverbw.length; } }) + }) + that.form.handoverb[index].count = barchArrs.length; //如果arrs里有不是这个批次的wpr,提示错误 let diff = arrs.filter(item => !barchArrs.includes(item)); that.diff = diff; - console.log('diff',diff) if(diff.length>0){ that.$message.warning("物料"+diff.join(",")+"不在该批次中"); - // that.$confirm("物料"+diff.join(",")+"不在该批次中", "提示", {type: "warning",}).then(() => {}); } }else{ //放入对应的行中的handoverb中,并且在列表中disabled @@ -295,6 +316,21 @@ export default { } that.form.handoverb.splice(index,1); }, + handleChange(index){ + let that = this; + that.form.handoverb[index].handoverbw = []; + let trueCount = this.wprOptions.filter(item => item.checked === true).length; + that.form.handoverb[index].count =trueCount; + this.wprOptions.forEach(item=>{ + if(item.checked){ + let obj = {}; + obj.number = item.number; + obj.wpr = item.id; + item.disabled = true; + that.form.handoverb[index].handoverbw.push(obj); + } + }) + }, //提交 submit() { let that = this; @@ -303,6 +339,7 @@ export default { let total = 0; if(this.form.handoverb.length>0){ this.form.handoverb.forEach(item=>{ + item.handoverbw = item.handoverbw.filter(item=>{ return item.wpr&&item.wpr!==''&&item.wpr!==null&&item.wpr!==undefined}) total += item.count; }) } diff --git a/src/views/wpm_bx/inmIn.vue b/src/views/wpm_bx/inmIn.vue index b6e305be..6687a209 100644 --- a/src/views/wpm_bx/inmIn.vue +++ b/src/views/wpm_bx/inmIn.vue @@ -93,7 +93,7 @@ min-width="150" > diff --git a/src/views/wpm_bx/mlog_detail.vue b/src/views/wpm_bx/mlog_detail.vue index 201fb76f..38c75042 100644 --- a/src/views/wpm_bx/mlog_detail.vue +++ b/src/views/wpm_bx/mlog_detail.vue @@ -136,8 +136,27 @@
- - + + +