From a51e8de5037524ef5e3eed8a3a3f207cb6aadb77 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期一, 15 四月 2024 18:01:11 +0800
Subject: [PATCH] 车间管理删除之后刷新的问题修改+生丝标准设置 界面设计按钮增加点击范围+去掉编码管理模块
---
src/views/productManage/silkRegisterForm/addPage.vue | 60 ++++++++++++++++++++++++-----
src/api/productManage/silkRegisterForm.js | 8 ++++
src/common/untils/request.js | 2 +
src/views/systemSetting/silkStandardSetting/index.vue | 23 +++++++----
src/components/layout/components/appsidebar/index.vue | 2
src/views/systemSetting/silkPriceStandard/index.vue | 1
6 files changed, 75 insertions(+), 21 deletions(-)
diff --git a/src/api/productManage/silkRegisterForm.js b/src/api/productManage/silkRegisterForm.js
index 95b4d92..e687d4a 100644
--- a/src/api/productManage/silkRegisterForm.js
+++ b/src/api/productManage/silkRegisterForm.js
@@ -64,3 +64,11 @@
method: "get"
})
}
+// 绾ゅ害鐧昏琛� 鏍规嵁杞﹁締
+export function getCarNumber(data) {
+ return request({
+ url: "/api-jl/v1/system/getCarNumber",
+ method: "post",
+ data
+ })
+}
\ No newline at end of file
diff --git a/src/common/untils/request.js b/src/common/untils/request.js
index 5da21ec..3c3e22c 100644
--- a/src/common/untils/request.js
+++ b/src/common/untils/request.js
@@ -20,6 +20,8 @@
/(?:(?:^|.*;\s*)token\s*=\s*([^;]*).*$)|^.*$/,
"$1",
);
+ // 鏆傛棤鐧诲綍锛屽啓姝籺oken
+ token='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVc2VySWQiOiI3NjFlM2NmNi05ZjRmLTQyMGQtYjc0ZC01NzNlZDc2NzA5MjAiLCJVc2VybmFtZSI6ImFkbWluIiwiTmlja05hbWUiOiIiLCJQYXJlbnRJZCI6ImFkbWluIiwiVXNlclR5cGUiOjIsIlJvbGVJZHMiOlsxXSwiT3JnSUQiOjEsIk1vZGlmaWVkUHdkIjp0cnVlLCJCdWZmZXJUaW1lIjo4NjQwMCwiZXhwIjoxNzEyNzI4MzI5LCJpc3MiOiJxbVBsdXMiLCJuYmYiOjE3MTIxMjI1Mjl9.KBJRT2PkRPG4UJD2hsO-fU_bylHMJ78xrWidq8xYMnw'
if (token) {
config.headers.Authorization = "Bearer " + token;
}
diff --git a/src/components/layout/components/appsidebar/index.vue b/src/components/layout/components/appsidebar/index.vue
index 399cc40..a3e7064 100644
--- a/src/components/layout/components/appsidebar/index.vue
+++ b/src/components/layout/components/appsidebar/index.vue
@@ -25,7 +25,7 @@
<el-menu-item index="/systemSetting/silkPriceStandard">鐢熶笣瀹氫环鏍囧噯</el-menu-item>
<el-menu-item index="/systemSetting/workshopManage">杞﹂棿绠$悊</el-menu-item>
<el-menu-item index="/systemSetting/dataDictionary">鏁版嵁瀛楀吀</el-menu-item>
- <el-menu-item index="/systemSetting/encodeManage">缂栫爜绠$悊</el-menu-item>
+ <!-- <el-menu-item index="/systemSetting/encodeManage">缂栫爜绠$悊</el-menu-item> -->
</el-submenu>
<el-submenu index="2">
<template slot="title">
diff --git a/src/views/productManage/silkRegisterForm/addPage.vue b/src/views/productManage/silkRegisterForm/addPage.vue
index ed51e26..a3e1d37 100644
--- a/src/views/productManage/silkRegisterForm/addPage.vue
+++ b/src/views/productManage/silkRegisterForm/addPage.vue
@@ -66,6 +66,7 @@
v-model="form.market"
placeholder="璇烽�夋嫨"
class="select-width"
+ @change="getGroupNumber"
>
<el-option
v-for="item in marketList"
@@ -81,7 +82,7 @@
v-model="form.name"
placeholder="璇烽�夋嫨"
class="select-width"
- @change="getGroupNumber"
+ @change="getGroupNumber('name')"
>
<el-option
v-for="item in nameList"
@@ -115,7 +116,7 @@
placeholder="璇峰厛閫夋嫨杞﹂棿"
no-data-text="璇峰厛閫夋嫨杞﹂棿"
class="select-width"
- @change="getGroupNumber"
+ @change="getGroupNumber()"
>
<el-option
v-for="item in workshopGroupList"
@@ -426,11 +427,12 @@
</template>
<script>
-// getWorkshopManageList,
+// getWorkshopManageList
import {
saveRegister,
getDictList,
getRegisterDetails,
+ getCarNumber
} from "@/api/productManage/silkRegisterForm.js";
import {
getCheckDetails,
@@ -582,7 +584,7 @@
this.getDetailsData();
},
methods: {
- getDetailsData(id) {
+ async getDetailsData(id) {
if (this.activeName == "first") {
this.form = {
number: "",
@@ -597,7 +599,7 @@
position: "",
};
if (this.registerId) {
- getRegisterDetails({ id: id ? id : this.registerId }).then(
+ await getRegisterDetails({ id: id ? id : this.registerId }).then(
(response) => {
if (response.code === 200) {
let config = JSON.parse(
@@ -613,7 +615,6 @@
item.productId=index+1
})
}
- console.log(finenessList,'===finenessList')
this.tableList.tableData = finenessList
this.tableData = this.tableList.tableData;
}
@@ -761,7 +762,7 @@
}
});
},
- getGroupNumber() {
+ async getGroupNumber(val) {
if (this.form.name) {
//缁勫埆
let number = "";
@@ -771,17 +772,41 @@
break;
}
}
- getWorkshopManageGroup({ number: number }).then((res) => {
+ await getWorkshopManageGroup({ number: number }).then((res) => {
if (res.code == 200) {
this.workshopGroupList = [];
let workshopGroupList = res.data || {};
+ this.workshopGroupList=[]
+ if(val=='name'){
+ this.form.workshopGroup=''
+ }
if (Object.keys(workshopGroupList).length > 0) {
for (let i in workshopGroupList) {
this.workshopGroupList.push(workshopGroupList[i]);
}
}
}
- });
+ })
+ if(this.form.workshopGroup&&this.form.market){
+ getCarNumber({
+ workshopName:this.form.name,
+ marketName:this.form.market,
+ groupNumber:this.form.workshopGroup,
+ }).then((res) => {
+ if (res.code == 200) {
+ this.tableData=[]
+ let data = res.data?JSON.parse(JSON.stringify(res.data)) : [];
+ if(Object.keys(data).length>0){
+ for(let i in data){
+ this.tableData.push({position:data[i],productId:Number(i)+1})
+ }
+ }
+ this.tableList.tableData = this.tableData
+ }else{
+ this.tableData=[]
+ }
+ });
+ }
} else {
this.workshopGroupList = [];
}
@@ -791,7 +816,6 @@
},
// 浜у搧鏂板
addProductClick() {
- debugger
this.productId++;
this.tableData.push({
productId: this.productId,
@@ -811,6 +835,7 @@
item[prop] = val;
}
});
+ this.tableList.tableData= this.tableData
},
tabsClick() {
// if (tab.name === "first") {
@@ -878,15 +903,26 @@
if (valid) {
let form = JSON.parse(JSON.stringify(this.form));
// params.workshopGroup=Number(params.workshopGroup)
- this.isAddloading = true;
if (this.activeName == "first") {
delete form.circleTwo;
let finenessList = JSON.parse(
JSON.stringify(this.tableList.tableData)
);
+ let isContinue=false
+ for (let i in finenessList) {
+ if(!finenessList[i].position||!finenessList[i].fineness||!finenessList[i].quantity||!finenessList[i].sum){
+ isContinue=true
+ break;
+ }
+ }
+ if(isContinue){
+ this.$message.error('璇峰~鍐欏畬鏁村啀淇濆瓨锛�')
+ return true;
+ }
for (let i in finenessList) {
delete finenessList[i].productId;
}
+ this.isAddloading = true;
let params = {
finenessList: finenessList,
...form,
@@ -895,6 +931,7 @@
if (this.inspectID) {
params.ID = this.form.ID ? this.form.ID : Number(this.inspectID);
}
+
saveRegister(params)
.then((res) => {
if (res.code == 200) {
@@ -924,6 +961,7 @@
? this.form.ID
: Number(this.registerId);
}
+ this.isAddloading = true;
saveCheck(paramsTwo)
.then((res) => {
if (res.code == 200) {
diff --git a/src/views/systemSetting/silkPriceStandard/index.vue b/src/views/systemSetting/silkPriceStandard/index.vue
index 31693d2..c739e6e 100644
--- a/src/views/systemSetting/silkPriceStandard/index.vue
+++ b/src/views/systemSetting/silkPriceStandard/index.vue
@@ -175,6 +175,7 @@
}).then(() => {
deletePriceStandard({id:row.ID}).then((res)=>{
if(res&&res.code===200){
+ this.pagerOptions.currPage = 1;
this.getData()
this.$message({
type: 'success',
diff --git a/src/views/systemSetting/silkStandardSetting/index.vue b/src/views/systemSetting/silkStandardSetting/index.vue
index dd236fe..69b9182 100644
--- a/src/views/systemSetting/silkStandardSetting/index.vue
+++ b/src/views/systemSetting/silkStandardSetting/index.vue
@@ -10,8 +10,8 @@
</CommonSearch>
</div>
<div class="body-card">
- <div class="edit-save">
- <div class="edit-save-icon" @click="editSaveClick">
+ <div class="edit-save" @click="editSaveClick">
+ <div class="edit-save-icon">
<i :class="isEdit ? 'el-icon-unlock' : 'el-icon-lock'"></i>
</div>
<div class="edit-sace-label">{{ isEdit ? "閿佸畾淇濆瓨" : "鐣岄潰璁捐" }}</div>
@@ -204,12 +204,18 @@
// 淇濆瓨缂栬緫鎸夐挳鍒囨崲
editSaveClick() {
this.isEdit = !this.isEdit
+ let tableData=JSON.parse(
+ JSON.stringify(this.silkTableList.tableData)
+ );
+ if(tableData.length==0&&!this.isEdit){
+ this.$message.error('璇峰厛鏂板鍐嶄繚瀛�!')
+ return true;
+ }
if (!this.isEdit) {
- let params = this.saveParam()
+ let params = this.saveParam(tableData)
saveRankStandard({
rankStandard: params
}).then((res) => {
- console.log(res)
if (res.code == 200) {
this.$message.success("淇濆瓨鎴愬姛")
this.getData()
@@ -217,10 +223,7 @@
})
}
},
- saveParam() {
- let tableData=JSON.parse(
- JSON.stringify(this.silkTableList.tableData)
- );
+ saveParam(tableData) {
for(let i in tableData){
tableData[i].dynamicsRanks=[]
for(let j in this.columnInputList){
@@ -321,13 +324,15 @@
height: calc(100% - 180px);
border-radius: 4px;
.edit-save {
+ width:100px;
+ padding:0 10px;
display: flex;
align-items: center;
margin-bottom: 10px;
+ cursor: pointer;
.edit-save-icon {
font-size: 24px;
color: #5582f3;
- cursor: pointer;
}
.edit-sace-label {
margin-left: 10px;
--
Gitblit v1.8.0