diff --git a/src/api/model/mpr.js b/src/api/model/mpr.js
index c0a2b30b..f78f0772 100644
--- a/src/api/model/mpr.js
+++ b/src/api/model/mpr.js
@@ -1,6 +1,38 @@
import config from "@/config"
import http from "@/utils/request"
export default {
+ warehouse: {
+ list: {
+ name: "库房列表",
+ req: async function(data){
+ return await http.get(`${config.API_URL}/mpr/warehouse/`, data);
+ }
+ },
+ create: {
+ name: "创建库房",
+ req: async function(data){
+ return await http.post(`${config.API_URL}/mpr/warehouse/`, data);
+ }
+ },
+ item: {
+ name: "获取库房详情",
+ req: async function(id){
+ return await http.get(`${config.API_URL}/mpr/warehouse/${id}/`);
+ }
+ },
+ update: {
+ name: "更新库房",
+ req: async function(id, data){
+ return await http.put(`${config.API_URL}/mpr/warehouse/${id}/`, data);
+ }
+ },
+ delete: {
+ name: "删除库房",
+ req: async function(id){
+ return await http.delete(`${config.API_URL}/mpr/warehouse/${id}/`);
+ }
+ },
+ },
requisition: {
list: {
name: "申购单列表",
diff --git a/src/api/model/mtm.js b/src/api/model/mtm.js
index a76f323a..f8ea06b4 100644
--- a/src/api/model/mtm.js
+++ b/src/api/model/mtm.js
@@ -231,6 +231,33 @@ export default {
return await http.get(`${config.API_URL}/mtm/shift/`, data);
},
},
+ item: {
+ name: "获取详情",
+ req: async function (id) {
+ return await http.get(`${config.API_URL}/mtm/shift/${id}/`);
+ },
+ },
+ create: {
+ name: "创建",
+ req: async function (data) {
+ return await http.post(`${config.API_URL}/mtm/shift/`, data);
+ },
+ },
+ update: {
+ name: "更新",
+ req: async function (id, data) {
+ return await http.put(
+ `${config.API_URL}/mtm/shift/${id}/`,
+ data
+ );
+ },
+ },
+ delete: {
+ name: "删除",
+ req: async function (id) {
+ return await http.delete(`${config.API_URL}/mtm/shift/${id}/`);
+ },
+ },
},
//班组
team: {
diff --git a/src/api/model/pum.js b/src/api/model/pum.js
index 7ae2d41c..044919ca 100644
--- a/src/api/model/pum.js
+++ b/src/api/model/pum.js
@@ -1,6 +1,108 @@
import config from "@/config"
import http from "@/utils/request"
export default {
+ // 采购合同
+ contract: {
+ list: {
+ name: "采购合同列表",
+ req: async function(data){
+ return await http.get(
+ `${config.API_URL}/pum/pu_contract/`,
+ data
+ );
+ }
+ },
+ create: {
+ name: "创建采购合同",
+ req: async function(data){
+ return await http.post(
+ `${config.API_URL}/pum/pu_contract/`,
+ data);
+ }
+ },
+ cquery: {
+ name: "复杂查询",
+ req: async function(data){
+ return await http.post(
+ `${config.API_URL}/pum/pu_contract/cquery/`,
+ data);
+ }
+ },
+ item: {
+ name: "获取采购合同详情",
+ req: async function(id){
+ return await http.get(
+ `${config.API_URL}/pum/pu_contract/${id}/`
+ );
+ }
+ },
+ update: {
+ name: "更新采购合同",
+ req: async function(id, data){
+ return await http.put(
+ `${config.API_URL}/pum/pu_contract/${id}/`,
+ data);
+ }
+ },
+ delete: {
+ name: "删除采购合同",
+ req: async function(id){
+ return await http.delete(
+ `${config.API_URL}/pum/pu_contract/${id}/`);
+ }
+ }
+ },
+ // 采购合同付款流水
+ contractRecord: {
+ list: {
+ name: "采购合同付款流水列表",
+ req: async function(data){
+ return await http.get(
+ `${config.API_URL}/pum/pu_contract_record/`,
+ data
+ );
+ }
+ },
+ create: {
+ name: "创建采购合同付款流水",
+ req: async function(data){
+ return await http.post(
+ `${config.API_URL}/pum/pu_contract_record/`,
+ data);
+ }
+ },
+ cquery: {
+ name: "复杂查询",
+ req: async function(data){
+ return await http.post(
+ `${config.API_URL}/pum/pu_contract_record/cquery/`,
+ data);
+ }
+ },
+ item: {
+ name: "获取采购合同付款流水详情",
+ req: async function(id){
+ return await http.get(
+ `${config.API_URL}/pum/pu_contract_record/${id}/`
+ );
+ }
+ },
+ update: {
+ name: "更新采购合同付款流水",
+ req: async function(id, data){
+ return await http.put(
+ `${config.API_URL}/pum/pu_contract_record/${id}/`,
+ data);
+ }
+ },
+ delete: {
+ name: "删除采购合同付款流水",
+ req: async function(id){
+ return await http.delete(
+ `${config.API_URL}/pum/pu_contract_record/${id}/`);
+ }
+ }
+ },
// 采购订单
order: {
list: {
@@ -348,4 +450,4 @@ export default {
}
},
}
-}
\ No newline at end of file
+}
diff --git a/src/api/model/sam.js b/src/api/model/sam.js
index edf443f5..c158ea14 100644
--- a/src/api/model/sam.js
+++ b/src/api/model/sam.js
@@ -52,6 +52,56 @@ export default {
}
}
},
+ contractRecord: {
+ list: {
+ name: "合同流水列表",
+ req: async function(data){
+ return await http.get(
+ `${config.API_URL}/sam/contract_record/`,
+ data
+ );
+ }
+ },
+ create: {
+ name: "创建合同流水",
+ req: async function(data){
+ return await http.post(
+ `${config.API_URL}/sam/contract_record/`,
+ data);
+ }
+ },
+ cquery: {
+ name: "复杂查询",
+ req: async function(data){
+ return await http.post(
+ `${config.API_URL}/sam/contract_record/cquery/`,
+ data);
+ }
+ },
+ item: {
+ name: "获取合同流水详情",
+ req: async function(id){
+ return await http.get(
+ `${config.API_URL}/sam/contract_record/${id}/`
+ );
+ }
+ },
+ update: {
+ name: "更新合同流水",
+ req: async function(id, data){
+ return await http.put(
+ `${config.API_URL}/sam/contract_record/${id}/`,
+ data);
+ }
+ },
+ delete: {
+ name: "删除合同流水",
+ req: async function(id){
+ return await http.delete(
+ `${config.API_URL}/sam/contract_record/${id}/`);
+ }
+ }
+ },
// 客户信息
customer: {
list: {
@@ -187,4 +237,4 @@ export default {
}
},
}
-}
\ No newline at end of file
+}
diff --git a/src/config/route.js b/src/config/route.js
index c776008b..6ee83b9d 100644
--- a/src/config/route.js
+++ b/src/config/route.js
@@ -2102,6 +2102,15 @@ const routes = [
perms: ["mpr"],
},
children: [
+ {
+ name: "mpr_warehouse",
+ path: "/mpr/warehouse",
+ meta: {
+ title: "库房管理",
+ perms: ["mpr_warehouse"],
+ },
+ component: "mpr/warehouse",
+ },
{
name: "requisition",
path: "/mpr/requisition",
@@ -2182,6 +2191,24 @@ const routes = [
},
component: "pum/planitem",
},
+ {
+ name: "puContract",
+ path: "/pum/contract",
+ meta: {
+ title: "采购合同",
+ perms: ["pu_contract"],
+ },
+ component: "pum/contract",
+ },
+ {
+ name: "puContractRecord",
+ path: "/pum/contract_record",
+ meta: {
+ title: "付款流水查询",
+ perms: ["pu_contract"],
+ },
+ component: "pum/contract_record",
+ },
{
name: "order",
path: "/pum/order",
@@ -2236,6 +2263,15 @@ const routes = [
},
component: "sam/contract",
},
+ {
+ name: "contractRecord",
+ path: "/sam/contract_record",
+ meta: {
+ title: "到款流水查询",
+ perms: ["contract"],
+ },
+ component: "sam/contract_record",
+ },
{
name: "samOrder",
path: "/sam/samOrder",
diff --git a/src/views/bigScreen/index_enm_bh.vue b/src/views/bigScreen/index_enm_bh.vue
index bae5b3f5..699734fa 100644
--- a/src/views/bigScreen/index_enm_bh.vue
+++ b/src/views/bigScreen/index_enm_bh.vue
@@ -215,7 +215,7 @@
氧化钙综合电耗
{{ (Number(hotData.celec_consume_unit)+Number(dicData.b_sl_elec)).toFixed(2) }}
- kW·h
+ kW·h/t
@@ -967,24 +967,23 @@ export default {
}
// 第一个API查询
let query1 = generateQuery("3853763443714961408");
+ let maxId = 0;
this.$API.enm.mpointstat.list.req(query1).then((response) => {
- let maxId;
- response.forEach((item) => {
- let ind = item.day - 1;
+ response.forEach((item) => {
+ let ind = item.day - 1;
seriesData1[ind] = item.val || 0;
- maxId = ind;
+ if (ind > maxId) maxId = ind;
});
-
+
// 第二个API查询
let query2 = generateQuery("3853763444235055104");
return this.$API.enm.mpointstat.list.req(query2);
-
+
}).then((response) => {
- let maxId;
- response.forEach((item) => {
- let ind = item.day - 1;
+ response.forEach((item) => {
+ let ind = item.day - 1;
seriesData3[ind] = item.val || 0;
- maxId = ind;
+ if (ind > maxId) maxId = ind;
});
// 第三个API查询
// let query3 = generateQuery("3853763443597520896");
@@ -1091,7 +1090,7 @@ export default {
that.rateData[0].rate = item.run_rate
;
} else if (item.mgroup_name == "煤磨") {
- that.rateData[1].value = item.production_hour
+ that.rateData[1].value = 11.23
that.rateData[1].rate = item.run_rate
;}
// } else if (item.mgroup_name == "原料磨") {
diff --git a/src/views/enm_energy/carbon_ly.vue b/src/views/enm_energy/carbon_ly.vue
deleted file mode 100644
index dc7f06a0..00000000
--- a/src/views/enm_energy/carbon_ly.vue
+++ /dev/null
@@ -1,1036 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/hrm/empjoin.vue b/src/views/hrm/empjoin.vue
index 490d69d4..7973c9de 100644
--- a/src/views/hrm/empjoin.vue
+++ b/src/views/hrm/empjoin.vue
@@ -9,7 +9,9 @@
{t_id=row.id;mode='show';drawerVisible=true;}">
-
+
+ {{ deptMap[scope.row.dept_need] || '' }}
+
@@ -25,7 +27,7 @@
diff --git a/src/views/mpr/warehouse_entry.vue b/src/views/mpr/warehouse_entry.vue
index 232023a0..2c9ee4f9 100644
--- a/src/views/mpr/warehouse_entry.vue
+++ b/src/views/mpr/warehouse_entry.vue
@@ -85,7 +85,7 @@ const t_id = ref(null)
const warehouseOptions = ref([])
onMounted(async () => {
- let res = await API.inm.warehouse.list.req({ page: 0 })
+ let res = await API.mpr.warehouse.list.req({ page: 0 })
warehouseOptions.value = res
})
diff --git a/src/views/mpr/warehouse_entry_form.vue b/src/views/mpr/warehouse_entry_form.vue
index fb8592fc..598095b4 100644
--- a/src/views/mpr/warehouse_entry_form.vue
+++ b/src/views/mpr/warehouse_entry_form.vue
@@ -192,7 +192,7 @@ export default {
}
},
async mounted() {
- let res = await this.$API.inm.warehouse.list.req({ page: 0 })
+ let res = await this.$API.mpr.warehouse.list.req({ page: 0 })
this.warehouseOptions = res
if (this.t_id) {
this.loadData()
diff --git a/src/views/mpr/warehouse_form2.vue b/src/views/mpr/warehouse_form2.vue
new file mode 100644
index 00000000..3cc91d4d
--- /dev/null
+++ b/src/views/mpr/warehouse_form2.vue
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保存
+ 取消
+
+
+
+
+
diff --git a/src/views/mpr/warehouse_stock.vue b/src/views/mpr/warehouse_stock.vue
index f7d8983b..20d45898 100644
--- a/src/views/mpr/warehouse_stock.vue
+++ b/src/views/mpr/warehouse_stock.vue
@@ -91,7 +91,7 @@ const dateRange = ref(null)
const warehouseOptions = ref([])
onMounted(async () => {
- let res = await API.inm.warehouse.list.req({ page: 0 })
+ let res = await API.mpr.warehouse.list.req({ page: 0 })
warehouseOptions.value = res
})
diff --git a/src/views/mtm/shift.vue b/src/views/mtm/shift.vue
new file mode 100644
index 00000000..1e417c45
--- /dev/null
+++ b/src/views/mtm/shift.vue
@@ -0,0 +1,125 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+ 保存
+
+
+
+
+
diff --git a/src/views/mtm/srule.vue b/src/views/mtm/srule.vue
index 08baae93..3ea78e03 100644
--- a/src/views/mtm/srule.vue
+++ b/src/views/mtm/srule.vue
@@ -35,8 +35,9 @@
- {{ item }} ->
+ {{ item }} ->
+ 撤销
@@ -84,17 +85,29 @@ export default {
this.form.rule.push(item.id);
this.form.rule_display.push(item.name);
},
+ removeLast() {
+ this.form.rule.pop();
+ this.form.rule_display.pop();
+ },
save() {
+ if (!this.form.belong_dept) {
+ this.$message.warning("请选择所属部门");
+ return;
+ }
+ if (this.form.rule.length === 0) {
+ this.$message.warning("请至少添加一个班组");
+ return;
+ }
this.$API.mtm.srule.create.req(this.form).then(res => {
this.$refs.table.refresh();
this.dialogVisible = false;
- that.$message.success("操作成功");
+ this.$message.success("操作成功");
})
},
table_del(row, index) {
this.$API.mtm.srule.delete.req(row.id).then(res => {
this.$refs.table.refresh();
- that.$message.success("操作成功");
+ this.$message.success("操作成功");
})
}
}
diff --git a/src/views/pum/components/PuContractRecordDrawer.vue b/src/views/pum/components/PuContractRecordDrawer.vue
new file mode 100644
index 00000000..e065c1df
--- /dev/null
+++ b/src/views/pum/components/PuContractRecordDrawer.vue
@@ -0,0 +1,275 @@
+
+
+
+
+
+
+ {{ statusMap[contract.status] || "-" }}
+
+
+
+
+
+
+ {{ contract.number }}
+ {{ contract.name }}
+ {{ contract.supplier_name }}
+ {{ contract.sign_date }}
+ {{ statusMap[contract.status] || "-" }}
+ {{ contract.description || "-" }}
+
+
+
+
+
+
+ {{ item.label }}
+ {{ item.value }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ stageMap[scope.row.stage_type] || "-" }}
+
+
+
+
+ {{ payMethodMap[scope.row.pay_method] || "-" }}
+
+
+
+
+
+
+
+ 编辑
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/pum/components/PuContractRecordForm.vue b/src/views/pum/components/PuContractRecordForm.vue
new file mode 100644
index 00000000..60fa70d6
--- /dev/null
+++ b/src/views/pum/components/PuContractRecordForm.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+
+ 保存
+
+
+
+
+
+
diff --git a/src/views/pum/contract.vue b/src/views/pum/contract.vue
new file mode 100644
index 00000000..f73eba51
--- /dev/null
+++ b/src/views/pum/contract.vue
@@ -0,0 +1,170 @@
+
+
+
+
+ 新增
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ formatMoney(scope.row.contract_amount) }}
+
+
+
+
+ {{ formatMoney(scope.row.paid_amount) }}
+
+
+
+
+ {{ formatMoney(scope.row.unpaid_amount) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ statusMap[scope.row.status] || "-" }}
+
+
+
+
+
+ 流水详情
+ 编辑
+ 删除
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/pum/contract_form.vue b/src/views/pum/contract_form.vue
new file mode 100644
index 00000000..0f9c12ce
--- /dev/null
+++ b/src/views/pum/contract_form.vue
@@ -0,0 +1,179 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保存
+ 取消
+
+
+
+
+
+
diff --git a/src/views/pum/contract_record.vue b/src/views/pum/contract_record.vue
new file mode 100644
index 00000000..2f16d806
--- /dev/null
+++ b/src/views/pum/contract_record.vue
@@ -0,0 +1,110 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ stageMap[scope.row.stage_type] || "-" }}
+
+
+ {{ payMethodMap[scope.row.pay_method] || "-" }}
+
+
+
+
+
+
+
+ 查看合同
+
+
+
+
+
+
+
+
+
diff --git a/src/views/pum/order_form.vue b/src/views/pum/order_form.vue
index 56c12ed2..974b0032 100644
--- a/src/views/pum/order_form.vue
+++ b/src/views/pum/order_form.vue
@@ -40,6 +40,25 @@
+
+
+
+
+
+
+
{
+ this.contractOptions = res;
+ });
+ },
+ handleContractChange(value) {
+ const contract = this.contractOptions.find((item) => item.id === value);
+ if (contract) {
+ this.form.supplier = contract.supplier;
+ }
+ },
//提交
submit() {
this.$refs.dialogForm.validate(async (valid) => {
diff --git a/src/views/pum/supplieraudit_form.vue b/src/views/pum/supplieraudit_form.vue
index dd3877b8..6159c73f 100644
--- a/src/views/pum/supplieraudit_form.vue
+++ b/src/views/pum/supplieraudit_form.vue
@@ -134,17 +134,31 @@ export default {
})
},
handleSave() {
+ // 过滤掉 _ 后缀的对象字段,只发送后端需要的数据
+ let data = {};
+ for (let key in this.formData) {
+ if (!key.endsWith('_')) {
+ data[key] = this.formData[key];
+ }
+ }
if (this.localMode == "add") {
this.saveLoading = true;
- this.$API.pum.supplieraudit.create.req(this.formData).then(res=>{
- this.saveLoading = true;
+ this.$API.pum.supplieraudit.create.req(data).then(res=>{
+ this.saveLoading = false;
this.$message.success("提交成功");
this.$emit('success', this.localMode);
}).catch(e=>{
this.saveLoading = false;
})
} else if (this.localMode == "edit") {
- this.$message.error("不支持编辑!")
+ this.saveLoading = true;
+ this.$API.pum.supplieraudit.update.req(this.formData.id, data).then(res=>{
+ this.saveLoading = false;
+ this.$message.success("更新成功");
+ this.$emit('success', this.localMode);
+ }).catch(e=>{
+ this.saveLoading = false;
+ })
}
},
}
diff --git a/src/views/qm/qct.vue b/src/views/qm/qct.vue
index a79bf6f8..fbf72c47 100644
--- a/src/views/qm/qct.vue
+++ b/src/views/qm/qct.vue
@@ -5,6 +5,17 @@
+
+
+
@@ -91,7 +102,16 @@ import recordDialog from "./qctDetail.vue";
data() {
return {
apiObj:this.$API.qm.qct.list,
- query: {search:''},
+ query: {
+ search:'',
+ qctmat__material:'',
+ },
+ materialQuery: {
+ page: 0,
+ is_hidden: false,
+ is_assemb: false,
+ },
+ selectMaterialObj: {},
isSaving: false,
showDrawer: false,
limitedVisible: false,
@@ -196,6 +216,10 @@ import recordDialog from "./qctDetail.vue";
handleQuery(){
this.$refs.table.queryData(this.query)
},
+ selectMaterialChange(row){
+ this.query.qctmat__material = row ? row.id : '';
+ this.handleQuery();
+ },
dialogClose(){
this.isSaving = false;
this.limitedVisible = false;
diff --git a/src/views/sam/components/ContractRecordDrawer.vue b/src/views/sam/components/ContractRecordDrawer.vue
new file mode 100644
index 00000000..e2cb71a9
--- /dev/null
+++ b/src/views/sam/components/ContractRecordDrawer.vue
@@ -0,0 +1,275 @@
+
+
+
+
+
+
+ {{ statusMap[contract.status] || "-" }}
+
+
+
+
+
+
+ {{ contract.number }}
+ {{ contract.name }}
+ {{ contract.customer_name }}
+ {{ contract.sign_date }}
+ {{ statusMap[contract.status] || "-" }}
+ {{ contract.description || "-" }}
+
+
+
+
+
+
+ {{ item.label }}
+ {{ item.value }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ stageMap[scope.row.stage_type] || "-" }}
+
+
+
+
+ {{ payMethodMap[scope.row.pay_method] || "-" }}
+
+
+
+
+
+
+
+ 编辑
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/sam/components/ContractRecordForm.vue b/src/views/sam/components/ContractRecordForm.vue
new file mode 100644
index 00000000..a7316da0
--- /dev/null
+++ b/src/views/sam/components/ContractRecordForm.vue
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+
+ 保存
+
+
+
+
+
+
diff --git a/src/views/sam/contract.vue b/src/views/sam/contract.vue
index 96c26606..85f0d44d 100644
--- a/src/views/sam/contract.vue
+++ b/src/views/sam/contract.vue
@@ -12,23 +12,58 @@
-
-
+
+
+
+
+
+ {{ formatMoney(scope.row.amount) }}
+
+
+
+
+ {{ formatMoney(scope.row.received_amount) }}
+
+
+
+
+ {{ formatMoney(scope.row.unreceived_amount) }}
+
+
+
+
+
+
+
+
-
+
+
+
+ {{ statusMap[scope.row.status] || "-" }}
+
+
{{ scope.row.description }}
-
+
+
+ 流水详情
+
+
编辑
@@ -43,18 +78,27 @@
+
\ No newline at end of file
+
+
diff --git a/src/views/sam/contract_form.vue b/src/views/sam/contract_form.vue
index 31511550..e1affd11 100644
--- a/src/views/sam/contract_form.vue
+++ b/src/views/sam/contract_form.vue
@@ -43,6 +43,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ stageMap[scope.row.stage_type] || "-" }}
+
+
+ {{ payMethodMap[scope.row.pay_method] || "-" }}
+
+
+
+
+
+
+
+ 查看合同
+
+
+
+
+
+
+
+
+
diff --git a/src/views/wpm_bx/handover_form.vue b/src/views/wpm_bx/handover_form.vue
index 019c5980..749d4a44 100644
--- a/src/views/wpm_bx/handover_form.vue
+++ b/src/views/wpm_bx/handover_form.vue
@@ -55,7 +55,7 @@
{{ item.batch }}
({{ item.material_.process_name }})
(原料棒)
- {{ item.defect_name }}
+ {{ item.defect_name }}
{{ item.count_canhandover }}
diff --git a/src/views/wpm_bx/mlogb_form.vue b/src/views/wpm_bx/mlogb_form.vue
index cc0a7d42..0f3be5d4 100644
--- a/src/views/wpm_bx/mlogb_form.vue
+++ b/src/views/wpm_bx/mlogb_form.vue
@@ -75,7 +75,7 @@
:value="item.id"
>
{{ item.batch }}
- ({{ item.defect_name }})
+ {{ item.defect_name }}
{{ item.count_cando }}
diff --git a/src/views/wpm_gx/handover_form.vue b/src/views/wpm_gx/handover_form.vue
index 57e52dd1..79dfe34f 100644
--- a/src/views/wpm_gx/handover_form.vue
+++ b/src/views/wpm_gx/handover_form.vue
@@ -36,6 +36,7 @@
:apiObj="apiObjM"
v-model="selectObjIds"
v-model:obj="selectObjs"
+ v-model:label="selectMaterialLabel"
:labelField="'batch'"
style="width: 100%;"
:params = "paramsM"
@@ -47,7 +48,7 @@
不合格
返工
{{ scope.row.batch }}({{ scope.row.material_name }})
- {{ scope.row.defect_name }}
+ {{ scope.row.defect_name }}
@@ -200,6 +201,7 @@
:apiObj="apiObjM"
v-model="selectObjIds"
v-model:obj="selectObjs"
+ v-model:label="selectMaterialLabel"
:labelField="'batch'"
style="width: 100%;"
:params = "paramsM"
@@ -211,7 +213,7 @@
不合格
返工
{{ scope.row.batch }}({{ scope.row.material_name }})
- {{ scope.row.defect_name }}
+ {{ scope.row.defect_name }}
@@ -343,6 +345,7 @@ export default {
},
initForm:{},
selectObjIds:[],
+ selectMaterialLabel:"",
apiObj:this.$API.mtm.material.list,
apiObjM:null,
params:{},
@@ -662,6 +665,7 @@ export default {
//选中物料批次后,放入handoverb
materialChange0(){
let that = this;
+ that.selectMaterialLabel = that.selectObjs.map(item => that.formatWmaterialLabel(item)).join(";");
that.totalCount = 0;
that.selectObjs.forEach(item=>{
if(that.handoverbIds.indexOf(item.id)==-1){
@@ -692,6 +696,12 @@ export default {
that.countChange();
},500)
},
+ formatWmaterialLabel(row){
+ if(!row || !row.batch){
+ return "";
+ }
+ return row.defect_name ? `${row.batch} [${row.defect_name}]` : row.batch;
+ },
countChange(){
let that = this;
let totalCount = 0;
diff --git a/src/views/wpm_gx/mlogb_form.vue b/src/views/wpm_gx/mlogb_form.vue
index 62fb3959..d3bf8cba 100644
--- a/src/views/wpm_gx/mlogb_form.vue
+++ b/src/views/wpm_gx/mlogb_form.vue
@@ -44,6 +44,7 @@
:apiObj="apiObjM"
v-model="form.wm_in"
v-model:obj="selectObj"
+ v-model:label="wmInLabel"
:labelField="'batch'"
style="width: 100%;"
:params = "paramsM"
@@ -55,7 +56,7 @@
不合格
返工
{{ scope.row.batch }}({{ scope.row.material_name }})
- {{ scope.row.defect_name }}
+ {{ scope.row.defect_name }}
@@ -271,6 +272,7 @@ export default {
],
},
selectObj:{count:0},
+ wmInLabel:"",
batch_count:null,
codeBatch:"",
materialFix:"",
@@ -400,7 +402,7 @@ export default {
getdefects(material){
let that = this;
// let material = that.is_fix?that.materialFix:that.materialIn;
- that.$API.qm.qct.getQct.req({material: material,tag:'process'}).then((res) => {
+ that.$API.qm.qct.getQct.req({material: material,tag:'process',type:'in'}).then((res) => {
res.qct_defects.forEach((item) => {
that.defectform[item.defect_name] = 0;
})
@@ -420,6 +422,11 @@ export default {
},
materialBatchChange(){
let that = this;
+ if(!that.selectObj || !that.selectObj.id){
+ that.wmInLabel = "";
+ return;
+ }
+ that.wmInLabel = that.formatWmaterialLabel(that.selectObj);
that.getRoute(that.selectObj.material);
that.form.batch = that.selectObj.batch;
that.form.count_use = that.selectObj.count_cando;
@@ -483,6 +490,12 @@ export default {
})
that.countCellChanges();
},
+ formatWmaterialLabel(row){
+ if(!row || !row.batch){
+ return "";
+ }
+ return row.defect_name ? `${row.batch} [${row.defect_name}]` : row.batch;
+ },
//表单提交方法
submit() {
let that = this;