修改bug

This commit is contained in:
‘937886381’
2023-07-11 17:01:39 +08:00
parent cb49f5e6b8
commit 7728882b29
30 changed files with 606 additions and 281 deletions

View File

@@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-01-31 09:49:36
* @LastEditTime: 2023-04-17 10:59:15
* @LastEditTime: 2023-07-11 14:31:18
* @LastEditors: zhp
* @Description:
-->

View File

@@ -0,0 +1,59 @@
<!--
* @Author: zhp
* @Date: 2023-01-31 14:12:10
* @LastEditTime: 2023-07-11 14:40:39
* @LastEditors: zhp
* @Description:
-->
<template>
<span>
<el-switch @change="changeStatus" v-model="injectData.ment" :active-value="1"
:inactive-value="0">
</el-switch>
</span>
</template>
<script>
// import { addDynamicRoute } from '@/router'
export default {
props: {
injectData: {
type: Object,
default: () => ({}),
},
},
data() {
return {
urlOptions: {
submitURL: "/supplier/qmsSupplier"
}
}
},
methods: {
// 子级
changeStatus () {
// 路由参数
let obj= {
ment: this.injectData.ment,
id:this.injectData.id
}
this.$http.put(this.urlOptions.submitURL, obj)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
console.log(1111)
console.log(this.$parent.$parent.$parent.$parent.$parent)
this.$parent.$parent.$parent.$parent.$parent.$parent.getDataList()
},
});
})
}
},
};
</script>

View File

@@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-06-05 16:38:54
* @LastEditTime: 2023-07-11 14:59:11
* @LastEditors: zhp
* @Description:
-->
@@ -26,8 +26,8 @@
</el-input>
</el-form-item>
<el-form-item prop="statisticalValue" :label="$t('supplier.statisticalValue')">
<K v-model="dataForm.closedLoop" :active-value="1" :inactive-value="0">
</K>
<el-switch v-model="dataForm.closedLoop" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
</el-form>
</template>

View File

@@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-04-19 15:29:42
* @LastEditTime: 2023-07-11 16:42:26
* @LastEditors: zhp
* @Description:
-->
@@ -10,7 +10,7 @@
<el-form-item prop="evaluationTemplateId" :label="$t('supplier.evaluationTemplateName')">
<el-select v-model="dataForm.evaluationTemplateId" :placeholder="$t('supplier.evaluationTemplateName')"
@change="getProductCode">
<el-option v-for="item in templateList" :key="item.id" :label="item.name" :value="item.id">
<el-option v-for="item in templateList" :key="item.id" :label="item.title" :value="item.id">
</el-option>
</el-select>
</el-form-item>

View File

@@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-06-16 14:22:14
* @LastEditTime: 2023-07-11 16:57:00
* @LastEditors: zhp
* @Description:
-->
@@ -138,6 +138,38 @@ export default {
.catch(() => {});
},
// 表单提交
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (Number(this.dataForm.online) <= Number(this.dataForm.offline)) {
this.$message({
message: "上限要大于下限",
type: "warning",
duration: 500,
onClose: () => {
},
});
}
if (!valid) {
return false;
}
this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$message({
message: this.$t("prompt.success"),
type: "success",
duration: 500,
onClose: () => {
this.visible = false;
this.$emit("refreshDataList");
},
});
})
.catch(() => { });
});
},
dataFormSubmitHandle: debounce(
function () {
this.$refs["dataForm"].validate((valid) => {

View File

@@ -1,15 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-06-09 15:05:26
* @LastEditTime: 2023-06-09 15:05:26
* @LastEditors: zhp
* @Description:
-->
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-06-08 15:13:41
* @LastEditTime: 2023-07-11 14:51:09
* @LastEditors: zhp
* @Description:
-->
@@ -93,12 +85,12 @@ export default {
},
},
methods: {
init(id, ) {
init(id) {
this.dataForm.id = id || ""
// this.dataForm.dictTypeId = dictTypeId || "";
this.visible = true;
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
this.$refs["dataForm"].resetFields()
if (this.dataForm.id) {
this.getInfo();
} else {

View File

@@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-04-18 14:21:19
* @LastEditTime: 2023-07-11 14:20:48
* @LastEditors: zhp
* @Description:
-->
@@ -18,6 +18,10 @@
<el-input v-model="dataForm.abbreviation" :placeholder="$t('supplier.abbreviation')">
</el-input>
</el-form-item>
<el-form-item prop="grade" :label="$t('supplier.grade')">
<el-input v-model="dataForm.grade" :placeholder="$t('supplier.grade')">
</el-input>
</el-form-item>
<el-form-item prop="supplierTypeId" :label="$t('supplier.supplierType')">
<el-select v-model="dataForm.supplierTypeId" :placeholder="$t('supplier.supplierType')">
<el-option v-for="item in supplierTypeList" :key="item.id" :label="item.name" :value="item.id">
@@ -34,6 +38,12 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="supplierStatus" :label="$t('supplier.supplierStatus')">
<el-select v-model="dataForm.supplierStatus" :placeholder="$t('supplier.supplierStatus')">
<el-option v-for="item in supplierStatus" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="contact" :label="$t('supplier.contact')">
<el-input v-model="dataForm.contact" :placeholder="$t('supplier.contact')">
</el-input>
@@ -91,7 +101,21 @@ export default {
{
value: 1,
label: '可用'
}],
}
],
supplierStatus: [{
value: 0,
label: '合格'
},
{
value: 1,
label: '不合格'
},
{
value: 2,
label: '黑名单'
}
],
enterpriseNatureList: [
{
value: 0,

View File

@@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-04-18 09:36:39
* @LastEditTime: 2023-07-11 14:47:45
* @LastEditors: zhp
* @Description:
-->
@@ -14,7 +14,7 @@
</el-select>
</el-form-item>
<el-form-item prop="supplierId" :label="$t('supplier.supplierName')">
<el-select v-model="dataForm.supplierList" :placeholder="$t('supplier.supplierName')">
<el-select v-model="dataForm.supplierId" :placeholder="$t('supplier.supplierName')">
<el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
@@ -36,8 +36,8 @@ export default {
data() {
return {
urlOptions: {
submitURL: "/supplier/qmsSupplierType",
infoURL: "/supplier/qmsSupplierType/{id}",
submitURL: "/supplier/qmsSupplierProduct",
infoURL: "/supplier/qmsSupplierProduct/{id}",
getProductListURL: '/basic/qmsProduct/page',
// getCodeURL: '/supplier/qmsSupplierType/getCode',
getSupplierListURL: '/supplier/qmsSupplier/page'
@@ -130,7 +130,7 @@ export default {
// 获取信息
getInfo() {
this.$http
.get(`/supplier/qmsSupplierType/${this.dataForm.id}`)
.get(`/supplier/qmsSupplierProduct/${this.dataForm.id}`)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);

View File

@@ -1,14 +1,14 @@
<!--
* @Author: zhp
* @Date: 2023-04-17 14:23:17
* @LastEditTime: 2023-06-20 15:39:07
* @LastEditTime: 2023-07-11 15:20:16
* @LastEditors: zhp
* @Description:
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user">
<el-tabs @tab-click="clickTabs" tab-position="left" style="height: 200px;">
<el-tabs @tab-click="clickTabs" tab-position="left">
<el-tab-pane v-for="(item,index) in projectTypeList" :name="item.id" :key="index" :label="item.name">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
</SearchBar>
@@ -112,7 +112,7 @@ export default {
type: 'input',
label: i18n.t('supplier.name'),
placeholder: i18n.t('supplier.name'),
param: 'name'
param: 'title'
},
{
type: 'input',
@@ -275,7 +275,7 @@ export default {
switch (val.btnName) {
case "search":
// this.listQuery.paramCode = val.paramCode;
this.listQuery.name = val.name ? val.name : undefined
this.listQuery.title = val.title ? val.title : undefined
this.listQuery.code = val.code ? val.code : undefined
// console.log(i18n);
this.listQuery.page = 1;

View File

@@ -224,7 +224,12 @@ export default {
.then(({ data: res }) => {
if (res.code === 0) {
console.log(res.data);
this.formConfig[1].selectOptions = res.data.list
this.formConfig[1].selectOptions = res.data.list.map((item) => {
return {
id: item.id,
name: item.title,
}
})
}
})
.catch(() => {

View File

@@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-06-08 14:29:46
* @LastEditTime: 2023-06-16 14:20:12
* @LastEditTime: 2023-07-11 16:38:02
* @LastEditors: zhp
* @Description:
-->
@@ -20,7 +20,7 @@
{{item.name}}
</span>
<el-button style="margin-left:5px" type="text" icon="el-icon-edit" @click="handleEdit(item.id)"></el-button>
<el-progress :stroke-width="26" :percentage="item.online ? item.online : ''">
<el-progress :stroke-width="26" :percentage="item.online ? item.online : 0 ">
</el-progress>
</div>
</el-tooltip>

View File

@@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-06-08 14:29:46
* @LastEditTime: 2023-06-20 15:38:33
* @LastEditTime: 2023-07-11 14:54:04
* @LastEditors: zhp
* @Description:
-->
@@ -23,8 +23,8 @@
<!-- 弹窗, 新增 / 修改 -->
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
@confirm="handleConfirm" :before-close="handleCancel">
<projectsType-add ref="addOrUpdate" @refreshDataList="successSubmit">
</projectsType-add>
<projectType-add ref="addOrUpdate" @refreshDataList="successSubmit">
</projectType-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
</base-dialog>
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"

View File

@@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-04-17 14:23:17
* @LastEditTime: 2023-06-20 15:38:27
* @LastEditTime: 2023-07-11 14:44:36
* @LastEditors: zhp
* @Description:
-->
@@ -96,7 +96,7 @@ const tableProps = [
{
prop: "closedLoop",
label: i18n.t('supplier.closedLoop'),
filter: supplier('whether'),
filter: supplier('whether')
}
];
const tableBtn = [
@@ -159,11 +159,11 @@ export default {
name:'全部'
},
{
id: 0,
id: '0',
name: '否'
},
{
id: 1,
id: '1',
name: '是'
}
],
@@ -209,15 +209,15 @@ export default {
type: "button",
btnName: i18n.t('add'),
name: "add",
color: "primary",
// plain: true,
color: "success",
plain: true
},
{
type: "button",
btnName: i18n.t('export'),
name: "export",
color: "primary",
// plain: true,
plain: true
}
],
};
@@ -370,7 +370,7 @@ export default {
// this.listQuery.paramCode = val.paramCode;
this.listQuery.productName = val.productName ? val.productName : undefined
this.listQuery.problemDescription = val.problemDescription ? val.problemDescription : undefined
this.listQuery.closedLoop = closedLoop ? closedLoop : undefined
this.listQuery.closedLoop = val.closedLoop ? val.closedLoop : undefined
this.listQuery.supplierName = val.supplierName ? val.supplierName : undefined
this.listQuery.startTime = val.timeSlot ? val.timeSlot[0] : undefined
this.listQuery.endTime = val.timeSlot ? val.timeSlot[1] : undefined

View File

@@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-04-17 14:23:17
* @LastEditTime: 2023-06-20 15:38:21
* @LastEditTime: 2023-07-11 14:35:52
* @LastEditors: zhp
* @Description:
-->
@@ -59,10 +59,9 @@ import supplierProductSearch from "./components/supplierProductSearch.vue"
import supplierAdd from "./components/supplier-add.vue"
import inputArea from "./components/inputArea"
import innerTable from "./components/innerTable"
// import available from "./components/available.vue"
// import radio from "./components/radio.vue"
import changeStatus from "./components/changeStatus.vue"
import i18n from "@/i18n"
// import i18n from "@/i18n";
import supplier from '@/filters/supplier'
const tableProps = [
{
prop: "detail",
@@ -90,9 +89,15 @@ const tableProps = [
prop: "address",
label: i18n.t('supplier.address'),
},
{
prop: "supplierStatus",
label: i18n.t('supplier.supplierStatus'),
filter: supplier('supplierStatus'),
},
{
prop: "ment",
label: i18n.t('supplier.ment'),
subcomponent: changeStatus
}
];
const tableBtn = [
@@ -184,15 +189,15 @@ export default {
type: "button",
btnName: i18n.t('add'),
name: "add",
color: "primary",
// plain: true,
color: "success",
plain: true
},
{
type: "button",
btnName: i18n.t('export'),
name: "export",
color: "primary",
// plain: true,
plain: true
}
],
};
@@ -284,7 +289,7 @@ export default {
type: "success",
duration: 1500,
onClose: () => {
this.getDataList();
this.getDataList()
},
});
} else {