Merge pull request 'zhp' (#14) from zhp into master

Reviewed-on: #14
This commit is contained in:
张昊鹏 2023-07-07 16:36:05 +08:00
commit 7b2a23dfed
9 changed files with 95 additions and 35 deletions

View File

@ -31,7 +31,7 @@ export default {
created() { created() {
}, },
activated() { activated() {
this.getDataList(); this.getDataList()
}, },
methods: { methods: {
// 获取数据列表 // 获取数据列表

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-01-04 10:29:40 * @Date: 2023-01-04 10:29:40
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2023-06-30 16:39:46 * @LastEditTime: 2023-07-07 13:51:05
* @Description: * @Description:
--> -->
<template> <template>
@ -50,13 +50,18 @@ const tableBtn = [
type: "synchronous", type: "synchronous",
btnName: "同步", btnName: "同步",
showParam: { showParam: {
type: "&", type: "|",
data: [ data: [
{ {
type: "equal", type: "equal",
name: "controlCodeId", name: "controlCodeId",
value:null, value:null,
}, },
{
type: "equal",
name: "controlCodeId",
value: '0',
},
], ],
}, },
}, },
@ -71,6 +76,11 @@ const tableBtn = [
name: "controlCodeId", name: "controlCodeId",
value: null, value: null,
}, },
{
type: "unequal",
name: "controlCodeId",
value: '0',
},
], ],
}, },
}, },

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-04-12 15:54:19 * @LastEditTime: 2023-07-07 15:48:03
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -23,8 +23,11 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<base-table border :table-props="tableProps" :table-data="tableData" <base-table v-if="editShow" border :table-props="tableProps" :table-data="tableData"
:add-button-show="addButtonShow" @emitFun="inputChange" @emitButtonClick="emitButtonClick" /> :add-button-show="addButtonShow" @emitFun="inputChange" @emitButtonClick="emitButtonClick" >
<method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" />
</base-table>
</div> </div>
</template> </template>
@ -34,12 +37,10 @@ import debounce from "lodash/debounce"
import inputArea from './inputArea' import inputArea from './inputArea'
import selectArea from './selectArea' import selectArea from './selectArea'
import i18n from "@/i18n" import i18n from "@/i18n"
import { kStringMaxLength } from "buffer"
const tableProps = [ const tableProps = [
{ {
prop: 'step', prop: 'step',
label: i18n.t("disqualification.step"), label: i18n.t("disqualification.step"),
subcomponent: inputArea
}, },
{ {
prop: 'teamId', prop: 'teamId',
@ -47,6 +48,12 @@ const tableProps = [
subcomponent: selectArea subcomponent: selectArea
} }
] ]
const tableBtn = [
{
type: "delete",
btnName: "删除",
},
];
export default { export default {
// mixins: [basicAdd], // mixins: [basicAdd],
data() { data() {
@ -59,9 +66,11 @@ export default {
}, },
supplierList:[], supplierList:[],
productList: [], productList: [],
tableBtn,
typeList: [], typeList: [],
teamList: [], teamList: [],
tableData: [], tableData: [],
editShow:false,
listQuery: { listQuery: {
limit: 999, limit: 999,
page: 1, page: 1,
@ -117,6 +126,30 @@ export default {
}, },
}, },
methods: { methods: {
handleClick(val) {
console.log(val);
if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.step}]进行删除操作?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$nextTick(() => {
for (let i = 0; i < this.tableData.length; i++) {
console.log();
if (this.tableData[i].step === val.data.step) {
this.tableData.splice(i, 1)
}
}
for (let i = val.data.step - 1; i < this.tableData.length; i++) {
this.tableData[i].step = i + 1
}
})
})
.catch(() => { })
}
},
inputChange(val) { inputChange(val) {
console.log('=======') console.log('=======')
console.log(val) console.log(val)
@ -126,14 +159,25 @@ export default {
emitButtonClick() { emitButtonClick() {
console.log('emitButtonClick') console.log('emitButtonClick')
let obj = {} let obj = {}
for (let i of this.tableProps) { // for (let i of this.tableProps) {
obj[i.prop] = '' // console.log(i.prop)
// obj[i.prop] = ''
// }
if (this.tableData.length !== 0) {
obj['step'] = this.tableData[this.tableData.length - 1].step + 1
obj['teamId'] = ''
} else {
for (let i = 0; i <= this.tableData.length; i++) {
obj['step'] = i + 1
obj['teamId'] = ''
}
} }
this.tableData.push(obj) this.tableData.push(obj)
// this.dataForm.qmsApprovalProcessStepDetailDTOList.push(obj) // this.dataForm.qmsApprovalProcessStepDetailDTOList.push(obj)
// console.log(this.dataForm) // console.log(this.dataForm)
}, },
init(id, ) { init(id, flag) {
this.editShow = flag || false
this.dataForm.id = id || "" this.dataForm.id = id || ""
this.listQuery.approvalProcessId = id || "" this.listQuery.approvalProcessId = id || ""
this.editData.id = id || "" this.editData.id = id || ""

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-02-14 15:02:26 * @Date: 2023-02-14 15:02:26
* @LastEditTime: 2023-04-07 10:20:53 * @LastEditTime: 2023-07-07 14:06:27
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -27,8 +27,8 @@
</el-form-item> </el-form-item>
<el-form-item prop="approvalProcessId" :label="$t('disqualification.approvalProcessName')"> <el-form-item prop="approvalProcessId" :label="$t('disqualification.approvalProcessName')">
<el-select v-model="dataForm.approvalProcessId" :placeholder="$t('disqualification.approvalProcessName')"> <el-select v-model="dataForm.approvalProcessId" :placeholder="$t('disqualification.approvalProcessName')">
<el-option v-for="item in approvalProcessList" :key="item.approvalProcessId" :label="item.approvalProcessName" <el-option v-for="item in approvalProcessList" :key="item.id" :label="item.approvalProcessName"
:value="item.approvalProcessId"> :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -198,7 +198,7 @@ export default {
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res.data); console.log(res.data,'11111111111');
this.approvalProcessList= res.data.list this.approvalProcessList= res.data.list
} }
}) })

View File

@ -2,17 +2,17 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-01-04 10:29:40 * @Date: 2023-01-04 10:29:40
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2023-04-13 15:03:39 * @LastEditTime: 2023-07-07 09:16:23
* @Description: * @Description:
--> -->
<template> <template>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px"> <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
<el-form-item prop="approvalProcessCode" :label="$t('disqualification.approvalProcessCode')"> <el-form-item prop="code" :label="$t('disqualification.approvalProcessCode')">
<el-input v-model="dataForm.approvalProcessCode" :placeholder="$t('disqualification.approvalProcessCode')"> <el-input v-model="dataForm.code" :placeholder="$t('disqualification.approvalProcessCode')">
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item prop="approvalProcessName" :label="$t('disqualification.approvalProcessName')"> <el-form-item prop="name" :label="$t('disqualification.approvalProcessName')">
<el-input v-model="dataForm.approvalProcessName" :placeholder="$t('disqualification.approvalProcessName')"> <el-input v-model="dataForm.name" :placeholder="$t('disqualification.approvalProcessName')">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -36,8 +36,8 @@ export default {
visible: false, visible: false,
customerTypeList:{}, customerTypeList:{},
dataForm: { dataForm: {
approvalProcessName: null, name: null,
approvalProcessCode:null code:null
}, },
productList:[] productList:[]
}; };

View File

@ -1,14 +1,14 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-31 09:49:36 * @Date: 2023-01-31 09:49:36
* @LastEditTime: 2023-04-13 14:52:42 * @LastEditTime: 2023-07-07 09:55:32
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
<template> <template>
<div id="detailList"> <div id="detailList">
<span v-for="(item,index) in injectData.qmsApprovalProcessStepDetailDTOList" :key="item.teamName"> <span v-for="(item,index) in injectData.qmsApprovalProcessStepDetailDTOList" :key="index">
<el-button type="text">{{item.teamName}}} </el-button> {{item.teamName}}
<i v-if="index <+ injectData.qmsApprovalProcessStepDetailDTOList.length-1" class="el-icon-right"></i> <i v-if="index <+ injectData.qmsApprovalProcessStepDetailDTOList.length-1" class="el-icon-right"></i>
</span> </span>
</div> </div>

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-20 15:35:20 * @LastEditTime: 2023-07-07 09:20:18
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -159,8 +159,8 @@ export default {
}); });
}, },
conditionSearchSubmit(dataForm) { conditionSearchSubmit(dataForm) {
this.listQuery.approvalProcessCode = dataForm.approvalProcessCode this.listQuery.code = dataForm.code
this.listQuery.approvalProcessName = dataForm.approvalProcessName this.listQuery.name = dataForm.name
this.listQuery.page = 1 this.listQuery.page = 1
this.getDataList() this.getDataList()
this.searchOrUpdateVisible = false this.searchOrUpdateVisible = false
@ -196,7 +196,7 @@ export default {
this.addOrEditTitle = this.$t('edit') this.addOrEditTitle = this.$t('edit')
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id); this.$refs.addOrUpdate.init(val.data.id,true)
}); });
} }
}, },

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-20 15:34:19 * @LastEditTime: 2023-07-07 14:23:29
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -9,7 +9,7 @@
<el-card shadow="never" class="aui-card--fill"> <el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__user"> <div class="mod-sys__user">
<SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick"> <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
<el-badge :value="1" class="item"> <el-badge :value="2" class="item">
<el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button> <el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
</el-badge> </el-badge>
</SearchBar> </SearchBar>
@ -135,6 +135,10 @@ export default {
// components: { // components: {
// AddOrUpdate, // AddOrUpdate,
// }, // },
deactivated () {
this.listQuery.inspectionTypeId = null
this.listQuery.productId = null
},
methods: { methods: {
//search-bar //search-bar
handleProductCancel() { handleProductCancel() {
@ -199,6 +203,8 @@ export default {
case "search": case "search":
// this.listQuery.paramCode = val.paramCode; // this.listQuery.paramCode = val.paramCode;
this.listQuery.page = 1; this.listQuery.page = 1;
this.listQuery.inspectionTypeId = null
this.listQuery.productId = null
this.getDataList(); this.getDataList();
break; break;
case "add": case "add":

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-11 09:24:58 * @Date: 2023-01-11 09:24:58
* @LastEditTime: 2023-06-20 15:34:38 * @LastEditTime: 2023-07-07 14:11:27
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -156,7 +156,7 @@ export default {
handleClick(val) { handleClick(val) {
console.log(val); console.log(val);
if (val.type === "delete") { if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", { this.$confirm(`确定对[处理团队=${val.data.teamName}]进行删除操作?`, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",