解决冲突
This commit is contained in:
@@ -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:
|
||||
-->
|
||||
|
||||
59
src/views/modules/supplier/components/changeStatus.vue
Normal file
59
src/views/modules/supplier/components/changeStatus.vue
Normal 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>
|
||||
@@ -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>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-04-19 15:29:42
|
||||
* @LastEditTime: 2023-07-12 16:16:30
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<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>
|
||||
@@ -118,27 +118,27 @@ export default {
|
||||
computed: {
|
||||
dataRule() {
|
||||
return {
|
||||
// dictLabel: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// dictValue: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// sort: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
evaluationTemplateId: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
evaluationType: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
title: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-04-19 14:20:14
|
||||
* @LastEditTime: 2023-07-12 15:46:50
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-form-item prop="productId" :label="$t('supplier.materialName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('supplier.materialName')" @change="getProductCode">
|
||||
<el-option v-for="item in productList" :key="item.id" :label="item.productName" :value="item.id">
|
||||
@@ -106,27 +106,55 @@ export default {
|
||||
computed: {
|
||||
dataRule() {
|
||||
return {
|
||||
// dictLabel: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// dictValue: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// sort: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
productId: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
supplierId: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
supplierBatch: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
offlineTime: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "change ",
|
||||
},
|
||||
],
|
||||
defectiveQuantity: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
undesirablePhenomena: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
productCode: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
},
|
||||
|
||||
@@ -1,20 +1,12 @@
|
||||
<!--
|
||||
* @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-12 16:19:42
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-form-item prop="code" :label="$t('basic.code')">
|
||||
<el-input v-model="dataForm.code" :placeholder="$t('basic.code')"></el-input>
|
||||
</el-form-item>
|
||||
@@ -68,37 +60,30 @@ export default {
|
||||
computed: {
|
||||
dataRule() {
|
||||
return {
|
||||
// dictLabel: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// dictValue: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// sort: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
code: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
name: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
]
|
||||
};
|
||||
},
|
||||
},
|
||||
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 {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-04-18 15:40:53
|
||||
* @LastEditTime: 2023-07-12 15:49:14
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-form-item prop="productId" :label="$t('supplier.materialName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('supplier.materialName')" @change="getProductCode">
|
||||
<el-option v-for="item in productList" :key="item.id" :label="item.productName" :value="item.id">
|
||||
@@ -124,6 +124,7 @@ export default {
|
||||
causeAnalysis:null,
|
||||
closedLoop: null,
|
||||
everlastMeasures: null,
|
||||
productCode:null,
|
||||
interimMeasures:null,
|
||||
lostHour: null,
|
||||
place: null,
|
||||
@@ -136,27 +137,41 @@ export default {
|
||||
computed: {
|
||||
dataRule() {
|
||||
return {
|
||||
// dictLabel: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// dictValue: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// sort: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
productId: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
problemBatch: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
supplierId: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
productCode: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
applicationDate: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
},
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-07-13 14:19:18
|
||||
* @LastEditTime: 2023-07-14 15:56:51
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-form-item prop="code" :label="$t('supplier.code')">
|
||||
<el-input v-model="dataForm.code" :placeholder="$t('supplier.code')" />
|
||||
</el-form-item>
|
||||
@@ -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">
|
||||
@@ -38,6 +42,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>
|
||||
@@ -95,7 +105,21 @@ export default {
|
||||
{
|
||||
value: 1,
|
||||
label: '可用'
|
||||
}],
|
||||
}
|
||||
],
|
||||
supplierStatus: [{
|
||||
value: 0,
|
||||
label: '合格'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '不合格'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '黑名单'
|
||||
}
|
||||
],
|
||||
enterpriseNatureList: [
|
||||
{
|
||||
value: 0,
|
||||
@@ -132,6 +156,7 @@ export default {
|
||||
name:null,
|
||||
address: null,
|
||||
abbreviation: null,
|
||||
supplierStatus:null,
|
||||
grade: null,
|
||||
contact:null,
|
||||
contactEmail:null,
|
||||
@@ -146,27 +171,34 @@ export default {
|
||||
computed: {
|
||||
dataRule() {
|
||||
return {
|
||||
// dictLabel: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// dictValue: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// sort: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
code: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
name: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
ment: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
supplierStatus: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
},
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-07-13 15:49:05
|
||||
* @LastEditTime: 2023-07-14 15:57:26
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-form-item prop="productId" :label="$t('supplier.productName')">
|
||||
<el-select v-model="dataForm.productId" :placeholder="$t('supplier.productName')">
|
||||
<el-option v-for="item in productList" :key="item.id" :label="item.productName" :value="item.id">
|
||||
@@ -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>
|
||||
@@ -37,7 +37,7 @@ export default {
|
||||
return {
|
||||
urlOptions: {
|
||||
submitURL: "/supplier/qmsSupplierProduct",
|
||||
infoURL: "/supplier/qmsSupplierType/{id}",
|
||||
infoURL: "/supplier/qmsSupplierProduct/{id}",
|
||||
getProductListURL: '/basic/qmsProduct/page',
|
||||
// getCodeURL: '/supplier/qmsSupplierType/getCode',
|
||||
getSupplierListURL: '/supplier/qmsSupplier/page'
|
||||
@@ -67,27 +67,20 @@ export default {
|
||||
computed: {
|
||||
dataRule() {
|
||||
return {
|
||||
// dictLabel: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// dictValue: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// sort: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
supplierId: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
productId: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "change",
|
||||
},
|
||||
]
|
||||
};
|
||||
},
|
||||
},
|
||||
@@ -130,7 +123,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);
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-07-13 10:13:27
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-form-item prop="name" :label="$t('basic.name')">
|
||||
<el-input v-model="dataForm.name" :placeholder="$t('basic.name')"></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item prop="productTypeStatus" :label="$t('basic.status')">
|
||||
<el-select v-model="dataForm.productTypeStatus" :placeholder="$t('basic.status')">
|
||||
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
submitURL: "/supplier/qmsSupplierRequirementListGroup",
|
||||
infoURL: "/supplier/qmsSupplierRequirementListGroup/{id}"
|
||||
// getTypeListURL: '/basic/qmsProductType/page'
|
||||
},
|
||||
options: [{
|
||||
value: 0,
|
||||
label: '不可用'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '可用'
|
||||
}],
|
||||
typeList:[],
|
||||
visible: false,
|
||||
listQuery: {
|
||||
limit: 999,
|
||||
page:1
|
||||
},
|
||||
dataForm: {
|
||||
id: "",
|
||||
code:null,
|
||||
name: null,
|
||||
supplierTypeStatus:null,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
dataRule() {
|
||||
return {
|
||||
code: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
name: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
]
|
||||
};
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
this.dataForm.id = id || ""
|
||||
// this.dataForm.dictTypeId = dictTypeId || "";
|
||||
this.visible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs["dataForm"].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
this.getInfo();
|
||||
} else {
|
||||
// this.getCode()
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取信息
|
||||
getInfo() {
|
||||
this.$http
|
||||
.get(`/supplier/qmsSupplierRequirementListGroup/${this.dataForm.id}`)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.dataForm = {
|
||||
...this.dataForm,
|
||||
...res.data,
|
||||
};
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmitHandle: debounce(
|
||||
function () {
|
||||
this.$refs["dataForm"].validate((valid) => {
|
||||
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: () => {
|
||||
console.log(1111);
|
||||
this.visible = false;
|
||||
this.$emit("successSubmit");
|
||||
},
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
});
|
||||
},
|
||||
1000,
|
||||
{ leading: true, trailing: false }
|
||||
),
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -1,12 +1,12 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-04-17 10:56:39
|
||||
* @LastEditTime: 2023-07-12 15:58:36
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-form :model="dataForm" ref="dataForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-form-item prop="code" :label="$t('basic.code')">
|
||||
<el-input v-model="dataForm.code" :placeholder="$t('basic.code')"></el-input>
|
||||
</el-form-item>
|
||||
@@ -66,27 +66,27 @@ export default {
|
||||
computed: {
|
||||
dataRule() {
|
||||
return {
|
||||
// dictLabel: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// dictValue: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
// sort: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: this.$t("validate.required"),
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
code: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
name: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
supplierTypeStatus: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-06-20 11:16:51
|
||||
* @LastEditTime: 2023-07-14 15:46:44
|
||||
* @LastEditTime: 2023-07-14 15:53:22
|
||||
* @LastEditors: DY
|
||||
* @Description: 评估计划
|
||||
-->
|
||||
|
||||
@@ -167,7 +167,7 @@ export default {
|
||||
type: "button",
|
||||
btnName: i18n.t('add'),
|
||||
name: "add",
|
||||
color: "primary",
|
||||
color: "success",
|
||||
// plain: true,
|
||||
},
|
||||
{
|
||||
@@ -175,7 +175,7 @@ export default {
|
||||
btnName: i18n.t('export'),
|
||||
name: "export",
|
||||
color: "primary",
|
||||
// plain: true,
|
||||
plain: true,
|
||||
}
|
||||
],
|
||||
};
|
||||
@@ -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(() => {
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-04-17 14:23:17
|
||||
* @LastEditTime: 2023-06-20 15:38:40
|
||||
* @LastEditTime: 2023-07-12 15:18:25
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@@ -173,15 +173,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,
|
||||
}
|
||||
],
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-06-08 14:29:46
|
||||
* @LastEditTime: 2023-06-20 15:38:33
|
||||
* @LastEditTime: 2023-07-12 16:03:12
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@@ -9,9 +9,9 @@
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
|
||||
<el-badge :value="2" class="item">
|
||||
<!-- <el-badge :value="2" class="item">
|
||||
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
|
||||
</el-badge>
|
||||
</el-badge> -->
|
||||
</SearchBar>
|
||||
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
|
||||
:limit="listQuery.limit" :table-data="tableData">
|
||||
@@ -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"
|
||||
@@ -100,20 +100,24 @@ export default {
|
||||
addOrUpdateVisible: false,
|
||||
productOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
// {
|
||||
// type: "",
|
||||
// label: i18n.t("params.paramCode"),
|
||||
// placeholder: i18n.t("params.paramCode"),
|
||||
// param: "paramCode",
|
||||
// },
|
||||
// {
|
||||
// type: "separate",
|
||||
// },
|
||||
{
|
||||
type: 'input',
|
||||
label: i18n.t('supplier.code'),
|
||||
placeholder: i18n.t('supplier.code'),
|
||||
param: 'code'
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: i18n.t('supplier.name'),
|
||||
placeholder: i18n.t('supplier.name'),
|
||||
param: 'name'
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
btnName: i18n.t('add'),
|
||||
name: "add",
|
||||
color: "primary",
|
||||
color: "success",
|
||||
plain:true
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
@@ -127,7 +131,7 @@ export default {
|
||||
btnName: i18n.t('export'),
|
||||
name: "export",
|
||||
color: "primary",
|
||||
// plain: true,
|
||||
plain: true
|
||||
}
|
||||
],
|
||||
};
|
||||
@@ -250,6 +254,8 @@ export default {
|
||||
case "search":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
// console.log(i18n);
|
||||
this.listQuery.name = val.name ? val.name : null
|
||||
this.listQuery.code = val.code ? val.code : null
|
||||
this.listQuery.page = 1
|
||||
this.getDataList()
|
||||
break;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-04-17 14:23:17
|
||||
* @LastEditTime: 2023-07-13 10:55:01
|
||||
* @LastEditTime: 2023-07-14 15:53:48
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
-->
|
||||
@@ -96,7 +96,7 @@ const tableProps = [
|
||||
{
|
||||
prop: "closedLoop",
|
||||
label: i18n.t('supplier.closedLoop'),
|
||||
filter: supplier('whether'),
|
||||
filter: supplier('whether')
|
||||
}
|
||||
];
|
||||
const tableBtn = [
|
||||
@@ -167,11 +167,11 @@ export default {
|
||||
name:'全部'
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
id: '0',
|
||||
name: '否'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
id: '1',
|
||||
name: '是'
|
||||
}
|
||||
],
|
||||
@@ -217,15 +217,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
|
||||
}
|
||||
],
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-04-17 14:23:17
|
||||
* @LastEditTime: 2023-07-13 15:22:37
|
||||
* @LastEditTime: 2023-07-14 15:56:32
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
-->
|
||||
@@ -16,7 +16,7 @@
|
||||
</el-radio-group>
|
||||
</SearchBar>
|
||||
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
|
||||
@emitFun="inputChange" @emitButtonClick="emitButtonClick" :limit="listQuery.limit"
|
||||
@emitFun="inputChange" :limit="listQuery.limit"
|
||||
:table-data="tableData" >
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
@@ -59,11 +59,12 @@ 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 status from './components/status.vue'
|
||||
// import i18n from "@/i18n";
|
||||
import supplier from '@/filters/supplier'
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: "detail",
|
||||
@@ -93,8 +94,15 @@ const tableProps = [
|
||||
},
|
||||
{
|
||||
prop: "supplierStatus",
|
||||
// label: i18n.t('supplier.ment'),
|
||||
// subcomponent: status,
|
||||
label: i18n.t('supplier.supplierStatus'),
|
||||
filter: supplier('supplierStatus'),
|
||||
},
|
||||
{
|
||||
prop: "ment",
|
||||
label: i18n.t('supplier.ment'),
|
||||
subcomponent: status,
|
||||
subcomponent: changeStatus
|
||||
}
|
||||
];
|
||||
const tableBtn = [
|
||||
@@ -114,6 +122,7 @@ export default {
|
||||
urlOptions: {
|
||||
getDataListURL: "/supplier/qmsSupplier/page",
|
||||
deleteURL: "/supplier/qmsSupplier",
|
||||
submitURL: "/supplier/qmsSupplier",
|
||||
exportURL: '/supplier/qmsSupplier/export',
|
||||
getSupplierTypeListURL: '/supplier/qmsSupplierType/page'
|
||||
// submitURL: '/supplier/qmsSupplierType'
|
||||
@@ -186,15 +195,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
|
||||
}
|
||||
],
|
||||
};
|
||||
@@ -213,15 +222,29 @@ export default {
|
||||
console.log(val)
|
||||
this.tableData[val._pageIndex - 1][val.prop] = val[val.prop]
|
||||
console.log(this.tableData)
|
||||
this.$http.put(this.urlOptions.submitURL, this.tableData[val._pageIndex - 1])
|
||||
.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.getDataList()
|
||||
},
|
||||
});
|
||||
})
|
||||
},
|
||||
emitButtonClick() {
|
||||
console.log('emitButtonClick')
|
||||
let obj = {}
|
||||
for (let i of this.tableData) {
|
||||
obj[i.prop] = ''
|
||||
}
|
||||
this.tableData.push(obj)
|
||||
},
|
||||
// emitButtonClick() {
|
||||
// console.log('emitButtonClick')
|
||||
// let obj = {}
|
||||
// for (let i of this.tableData) {
|
||||
// obj[i.prop] = ''
|
||||
// }
|
||||
// this.tableData.push(obj)
|
||||
// },
|
||||
getData() {
|
||||
this.$http
|
||||
.get(this.urlOptions.getSupplierTypeListURL, { params: this.listQuery })
|
||||
@@ -286,7 +309,7 @@ export default {
|
||||
type: "success",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
this.getDataList()
|
||||
},
|
||||
});
|
||||
} else {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-04-17 14:23:17
|
||||
* @LastEditTime: 2023-06-20 15:38:13
|
||||
* @LastEditTime: 2023-07-12 15:57:57
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@@ -9,9 +9,9 @@
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
|
||||
<el-badge :value="2" class="item">
|
||||
<!-- <el-badge :value="2" class="item">
|
||||
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
|
||||
</el-badge>
|
||||
</el-badge> -->
|
||||
</SearchBar>
|
||||
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
|
||||
highlight-current-row :limit="listQuery.limit" :table-data="tableData" @current-change="handleCurrentChange">
|
||||
@@ -110,20 +110,18 @@ export default {
|
||||
addOrUpdateVisible: false,
|
||||
productOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
// {
|
||||
// type: "",
|
||||
// label: i18n.t("params.paramCode"),
|
||||
// placeholder: i18n.t("params.paramCode"),
|
||||
// param: "paramCode",
|
||||
// },
|
||||
// {
|
||||
// type: "separate",
|
||||
// },
|
||||
{
|
||||
type: 'input',
|
||||
label: i18n.t('supplier.supplierName'),
|
||||
placeholder: i18n.t('supplier.supplierName'),
|
||||
param: 'supplierName'
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
btnName: i18n.t('supplier.supplierRelevance'),
|
||||
name: "supplierRelevance",
|
||||
color: "primary",
|
||||
color: "success",
|
||||
plain:true
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
@@ -220,7 +218,7 @@ export default {
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.key = null;
|
||||
this.listQuery.supplierName = val.supplierName ? val.supplierName : null
|
||||
// console.log(i18n);
|
||||
this.listQuery.page = 1;
|
||||
this.getDataList();
|
||||
|
||||
257
src/views/modules/supplier/qmsSupplierRequirementListGroup.vue
Normal file
257
src/views/modules/supplier/qmsSupplierRequirementListGroup.vue
Normal file
@@ -0,0 +1,257 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-06-08 14:29:46
|
||||
* @LastEditTime: 2023-07-12 16:24:41
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
|
||||
<!-- <el-badge :value="2" class="item">
|
||||
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
|
||||
</el-badge> -->
|
||||
</SearchBar>
|
||||
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
|
||||
:limit="listQuery.limit" :table-data="tableData">
|
||||
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
|
||||
@confirm="handleConfirm" :before-close="handleCancel">
|
||||
<supplierRequirementListGroup-add ref="addOrUpdate" @refreshDataList="successSubmit">
|
||||
</supplierRequirementListGroup-add>
|
||||
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
|
||||
</base-dialog>
|
||||
<!-- <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
|
||||
@confirm="handleSearchConfirm" :before-close="handleSearchCancel">
|
||||
<projectType-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit">
|
||||
</projectType-search>
|
||||
<el-row slot="footer" type="flex" justify="end">
|
||||
<el-col :span="12">
|
||||
<el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
|
||||
{{ $t("close") }}
|
||||
</el-button>
|
||||
<el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{
|
||||
$t("reset")
|
||||
}}</el-button>
|
||||
<el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
|
||||
{{ $t("search") }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</base-dialog> -->
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
// import basicSearch from "@/mixins/basic-search"
|
||||
// import projectTypeSearch from "./components/projectTypeSearch.vue"
|
||||
import supplierRequirementListGroupAdd from "./components/supplierRequirementListGroup-add.vue"
|
||||
import i18n from "@/i18n"
|
||||
// import i18n from "@/i18n";
|
||||
const tableProps = [
|
||||
{
|
||||
prop: "name",
|
||||
label: i18n.t('supplier.name'),
|
||||
}
|
||||
];
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: i18n.t('edit'),
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: i18n.t('delete'),
|
||||
}
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/supplier/qmsSupplierRequirementListGroup/page",
|
||||
deleteURL: "/supplier/qmsSupplierRequirementListGroup",
|
||||
exportURL: '/supplier/qmsSupplierRequirementListGroup/export',
|
||||
submitURL: '/supplier/qmsSupplierRequirementListGroup'
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
productData: {},
|
||||
dataForm:{
|
||||
limit: 999,
|
||||
page:1
|
||||
},
|
||||
searchOrEditTitle: "",
|
||||
searchOrUpdateVisible: false,
|
||||
productOrEditTitle: "",
|
||||
addOrEditTitle: '',
|
||||
addOrUpdateVisible: false,
|
||||
productOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: i18n.t('supplier.name'),
|
||||
placeholder: i18n.t('supplier.name'),
|
||||
param: 'name'
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
btnName: i18n.t('add'),
|
||||
name: "add",
|
||||
color: "success",
|
||||
plain:true
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
btnName: i18n.t('search'),
|
||||
name: "search",
|
||||
color: "primary",
|
||||
// plain: true,
|
||||
}
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
supplierRequirementListGroupAdd
|
||||
},
|
||||
methods: {
|
||||
//search-bar点击
|
||||
handleProductCancel() {
|
||||
this.productOrUpdateVisible = false;
|
||||
this.productOrEditTitle = "";
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
console.log(val);
|
||||
this.productData = val.newVal ? val.newVal : {}
|
||||
},
|
||||
setCurrent(index) {
|
||||
this.$refs.palletTable1.setCurrent("palletTable", index);
|
||||
},
|
||||
// handleSearchCancel() {
|
||||
// this.searchOrEditTitle = "";
|
||||
// this.searchOrUpdateVisible = false;
|
||||
// },
|
||||
conditionSearch() {
|
||||
this.searchOrEditTitle = "搜索";
|
||||
this.searchOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.searchOrUpdate.init();
|
||||
});
|
||||
},
|
||||
// handleConfirm() {
|
||||
// this.$refs.addOrUpdate.dataFormSubmitHandle();
|
||||
// },
|
||||
// conditionSearchSubmit() {},
|
||||
conditionSearchSubmit(dataForm) {
|
||||
// console.log(key);
|
||||
// console.log(key);
|
||||
this.listQuery.name = dataForm.name
|
||||
this.listQuery.code = dataForm.code
|
||||
this.listQuery.page = 1;
|
||||
this.getDataList();
|
||||
this.searchOrUpdateVisible = false;
|
||||
// console.log(11111);
|
||||
// this.conditionSearchSubmit();
|
||||
},
|
||||
exportHandle() {
|
||||
this.$http.get(this.urlOptions.exportURL, { responseType: 'blob' }, {
|
||||
...this.dataForm
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
// if (res !== 0) {
|
||||
// return this.$message.error(res.msg)
|
||||
// }
|
||||
let fileName = ''
|
||||
const contentDisposition = res.headers['content-disposition']
|
||||
if (contentDisposition) {
|
||||
const temp = res.headers['content-disposition']
|
||||
.split(';')[1]
|
||||
.split('=')[1]
|
||||
// 对文件名乱码转义--【Node.js】使用iconv-lite解决中文乱码
|
||||
fileName = decodeURI(temp)
|
||||
console.log(temp)
|
||||
}
|
||||
const blob = new Blob([res.data])
|
||||
const reader = new FileReader()
|
||||
reader.readAsDataURL(blob)
|
||||
reader.onload = (e) => {
|
||||
const a = document.createElement('a')
|
||||
a.download = fileName
|
||||
a.href = e.target.result
|
||||
document.body.appendChild(a)
|
||||
a.click()
|
||||
document.body.removeChild(a)
|
||||
}
|
||||
}).catch(() => { })
|
||||
},
|
||||
handleClick(val) {
|
||||
if (val.type === "delete") {
|
||||
this.$confirm(`确定对[名称=${val.data.customerTypeName}]进行删除操作?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
}
|
||||
},
|
||||
// addOrUpdateHandle(productData) {
|
||||
// this.addOrUpdateVisible = true;
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.addOrUpdate.init(productData);
|
||||
// });
|
||||
// },
|
||||
buttonClick(val) {
|
||||
console.log(val);
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
// console.log(i18n);
|
||||
this.listQuery.name = val.name ? val.name : null
|
||||
this.listQuery.code = val.code ? val.code : null
|
||||
this.listQuery.page = 1
|
||||
this.getDataList()
|
||||
break;
|
||||
case "export":
|
||||
this.exportHandle()
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = '新增'
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
default:
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -2,9 +2,9 @@
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
|
||||
<el-badge :value="2" class="item">
|
||||
<!-- <el-badge :value="2" class="item">
|
||||
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
|
||||
</el-badge>
|
||||
</el-badge> -->
|
||||
</SearchBar>
|
||||
<base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
|
||||
:limit="listQuery.limit" :table-data="tableData">
|
||||
@@ -104,20 +104,24 @@ export default {
|
||||
addOrUpdateVisible: false,
|
||||
productOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
// {
|
||||
// type: "",
|
||||
// label: i18n.t("params.paramCode"),
|
||||
// placeholder: i18n.t("params.paramCode"),
|
||||
// param: "paramCode",
|
||||
// },
|
||||
// {
|
||||
// type: "separate",
|
||||
// },
|
||||
{
|
||||
type: 'input',
|
||||
label: i18n.t('supplier.name'),
|
||||
placeholder: i18n.t('supplier.name'),
|
||||
param: 'name'
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: i18n.t('supplier.code'),
|
||||
placeholder: i18n.t('supplier.code'),
|
||||
param: 'code'
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
btnName: i18n.t('add'),
|
||||
name: "add",
|
||||
color: "primary",
|
||||
color: "success",
|
||||
plain:true
|
||||
},
|
||||
{
|
||||
type: "button",
|
||||
@@ -131,7 +135,7 @@ export default {
|
||||
btnName: i18n.t('export'),
|
||||
name: "export",
|
||||
color: "primary",
|
||||
// plain: true,
|
||||
plain: true
|
||||
}
|
||||
],
|
||||
};
|
||||
@@ -283,7 +287,8 @@ export default {
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.key = null;
|
||||
this.listQuery.name = val.name ? val.name :null
|
||||
this.listQuery.code = val.code ? val.code : null
|
||||
// console.log(i18n);
|
||||
this.listQuery.page = 1;
|
||||
this.getDataList();
|
||||
|
||||
Reference in New Issue
Block a user