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

Reviewed-on: #12
This commit is contained in:
张昊鹏 2023-07-06 15:21:53 +08:00
commit c000698a9e
17 changed files with 435 additions and 259 deletions

70
package-lock.json generated
View File

@ -3201,6 +3201,7 @@
"thread-loader": "^2.1.3", "thread-loader": "^2.1.3",
"url-loader": "^2.2.0", "url-loader": "^2.2.0",
"vue-loader": "^15.9.2", "vue-loader": "^15.9.2",
"vue-loader-v16": "npm:vue-loader@^16.1.0",
"vue-style-loader": "^4.1.2", "vue-style-loader": "^4.1.2",
"webpack": "^4.0.0", "webpack": "^4.0.0",
"webpack-bundle-analyzer": "^3.8.0", "webpack-bundle-analyzer": "^3.8.0",
@ -16945,6 +16946,75 @@
} }
} }
}, },
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-router": { "vue-router": {
"version": "3.0.7", "version": "3.0.7",
"resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-3.0.7.tgz", "resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-3.0.7.tgz",

View File

@ -645,57 +645,9 @@ t.code.uploaded = '已上传'
t.code.notUploaded = '未上传' t.code.notUploaded = '未上传'
t.code.Examiner = '检验人' t.code.Examiner = '检验人'
t.dictionary = {} t.dictionary = {}
t.dictionary.name = ' 名称' t.dictionary.name = ' 名称'
t.dictionary.code = ' 编码' t.dictionary.code = ' 编码'
export default t export default t

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-06-26 09:44:09 * @LastEditTime: 2023-06-30 16:58:55
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -20,7 +20,7 @@
<el-switch v-model="dataForm.incomingInspection" :active-value="1" :inactive-value="0"> <el-switch v-model="dataForm.incomingInspection" :active-value="1" :inactive-value="0">
</el-switch> </el-switch>
</el-form-item> </el-form-item>
<el-form-item prop="finishInspection" :label="$t('basic.stock')"> <el-form-item prop="finishInspection" :label="$t('basic.finishedProduct')">
<el-switch v-model="dataForm.finishInspection" :active-value="1" :inactive-value="0"> <el-switch v-model="dataForm.finishInspection" :active-value="1" :inactive-value="0">
</el-switch> </el-switch>
</el-form-item> </el-form-item>
@ -32,8 +32,8 @@
<el-switch v-model="dataForm.processInspection" :active-value="1" :inactive-value="0"> <el-switch v-model="dataForm.processInspection" :active-value="1" :inactive-value="0">
</el-switch> </el-switch>
</el-form-item> </el-form-item>
<el-form-item prop="customerTypeStatus" :label="$t('basic.status')"> <el-form-item prop="controlStatus" :label="$t('basic.status')">
<el-select v-model="dataForm.customerTypeStatus" :placeholder="$t('basic.status')"> <el-select v-model="dataForm.controlStatus" :placeholder="$t('basic.status')">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
@ -49,8 +49,8 @@ export default {
data() { data() {
return { return {
urlOptions: { urlOptions: {
submitURL: "/basic/qmsCustomerType", submitURL: "/basic/qmsControlMode",
infoURL: "/basic/qmsCustomerType/{id}", infoURL: "/basic/qmsControlMode/{id}",
getCodeURL: '/basic/qmsControlMode/getCode' getCodeURL: '/basic/qmsControlMode/getCode'
}, },
options: [{ options: [{
@ -66,7 +66,7 @@ export default {
id: "", id: "",
controlCode:null, controlCode:null,
controlName:null, controlName:null,
customerTypeStatus: null, controlStatus: null,
finishInspection: null, finishInspection: null,
incomingInspection: null, incomingInspection: null,
outInspection: null, outInspection: null,
@ -106,13 +106,14 @@ export default {
methods: { methods: {
init(id, ) { init(id, ) {
this.dataForm.id = id || "" this.dataForm.id = id || ""
this.getControlCode()
// this.dataForm.dictTypeId = dictTypeId || ""; // this.dataForm.dictTypeId = dictTypeId || "";
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs["dataForm"].resetFields(); this.$refs["dataForm"].resetFields();
if (this.dataForm.id) { if (this.dataForm.id) {
this.getInfo(); this.getInfo();
} else {
this.getControlCode()
} }
}); });
}, },

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-02-20 08:52:46 * @LastEditTime: 2023-06-29 16:59:18
* @Description: * @Description:
--> -->
<template> <template>
@ -126,7 +126,7 @@ export default {
}) })
}, },
handleConditionSearch() { handleConditionSearch() {
this.$emit("successSubmit", this.dataForm.key); this.$emit("successSubmit", this.dataForm);
}, },
// dataFormSubmitHandle: debounce( // dataFormSubmitHandle: debounce(
// function () { // function () {

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-31 09:49:36 * @Date: 2023-01-31 09:49:36
* @LastEditTime: 2023-05-17 15:00:50 * @LastEditTime: 2023-06-30 16:54:37
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -22,6 +22,7 @@ export default {
}, },
data() { data() {
return { return {
// injectData:{},
urlOptions: { urlOptions: {
syncURL: "/basic/qmsProduct/connectAllProduct" syncURL: "/basic/qmsProduct/connectAllProduct"
}, },
@ -30,21 +31,23 @@ export default {
methods: { methods: {
// //
emitClick() { emitClick() {
console.log(this.injectData)
const data = { const data = {
id: this.injectData.id, id: this.injectData.id,
finishInspection: this.injectData.finishInspection, finishInspection: this.injectData.finishInspection,
incomingInspection: this.injectData.incomingInspection, incomingInspection: this.injectData.incomingInspection,
outInspection: this.injectData.outInspection, outInspection: this.injectData.outInspection,
processInspection: this.injectData.outInspection processInspection: this.injectData.processInspection
} }
this.$http.put(this.urlOptions.syncURL, { data }).then(({ data }) => { this.$http.put(this.urlOptions.syncURL, data ).then(({ data }) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.$message({ this.$message({
message: "操作成功", message: "操作成功",
type: "success", type: "success",
duration: 1500, duration: 1500,
onClose: () => { onClose: () => {
this.$message.error(data.msg); this.$message.error(data.msg)
// this.$parent.$parent.$parent.$parent.getDataList()
}, },
}); });
} else { } else {

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-04 15:35:31 * @LastEditTime: 2023-06-30 08:57:14
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -42,8 +42,8 @@ export default {
data() { data() {
return { return {
urlOptions: { urlOptions: {
submitURL: "/basic/qmsProductType", submitURL: "/basic/qmsProduct",
infoURL: "/basic/qmsProductType/{id}", infoURL: "/basic/qmsProduct/{id}",
getCodeURL: '/basic/qmsProduct/getCode', getCodeURL: '/basic/qmsProduct/getCode',
getTypeListURL: '/basic/qmsProductType/page' getTypeListURL: '/basic/qmsProductType/page'
}, },
@ -111,7 +111,7 @@ export default {
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log(res); console.log(res);
this.dataForm.productTypeCode = res.data this.dataForm.productCode = res.data
} }
}) })
.catch(() => { .catch(() => {
@ -130,7 +130,7 @@ export default {
// //
getInfo() { getInfo() {
this.$http this.$http
.get(`/basic/qmsProductType/${this.dataForm.id}`) .get(`/basic/qmsProduct/${this.dataForm.id}`)
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);

View File

@ -1,16 +1,16 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-01-31 14:12:10 * @Date: 2023-01-31 14:12:10
* @LastEditTime: 2023-01-31 16:47:32 * @LastEditTime: 2023-06-30 17:00:43
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
<template> <template>
<span> <span>
<el-radio v-model="injectData.incomingInspection" :label="1">{{ $t('basic.stock') }}</el-radio> <el-radio v-model="injectData.incomingInspection" :label="1">{{ $t('basic.stock') }}</el-radio>
<el-radio v-model="injectData.processInspection" :label="1">{{ $t('basic.course') }}</el-radio>
<el-radio v-model="injectData.finishInspection" :label="1">{{ $t('basic.finishedProduct') }}</el-radio> <el-radio v-model="injectData.finishInspection" :label="1">{{ $t('basic.finishedProduct') }}</el-radio>
<el-radio v-model="injectData.outInspection" :label="1">{{ $t('basic.shipment') }}</el-radio> <el-radio v-model="injectData.outInspection" :label="1">{{ $t('basic.shipment') }}</el-radio>
<el-radio v-model="injectData.processInspection" :label="1">{{ $t('basic.course') }}</el-radio>
</span> </span>
</template> </template>

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-02-14 14:12:11 * @LastEditTime: 2023-06-30 16:39:46
* @Description: * @Description:
--> -->
<template> <template>
@ -122,7 +122,7 @@ export default {
}, },
methods: { methods: {
init(data) { init(data) {
console.log(); console.log(data)
// this.dataForm.id = id || ""; // this.dataForm.id = id || "";
this.productData = data? data: {} this.productData = data? data: {}
this.visible = true; this.visible = true;
@ -130,23 +130,28 @@ export default {
this.listQuery.controllerModeId = data ? data.id : null; this.listQuery.controllerModeId = data ? data.id : null;
// this.$refs["dataForm"].resetFields(); // this.$refs["dataForm"].resetFields();
// if (this.dataForm.id) { // if (this.dataForm.id) {
this.getDataList(); this.getDataList()
// } // }
}); });
}, },
handleClick() { handleClick(val) {
console.log(val)
if (val.type === "synchronous") { if (val.type === "synchronous") {
if (!this.listQuery.controllerModeId) { console.log(val)
console.log(this.listQuery.controllerModeId)
if (!this.listQuery.controllerModeId === null) {
this.$message({ this.$message({
message: '请先选择控制模式', message: '请先选择控制模式',
type: 'warning' type: 'warning'
}); });
} else { } else {
const data = { const data = {
controlCodeId: this.listQuery.controlCodeId, id:val.data.id,
controlCodeId: this.listQuery.controllerModeId,
finishInspection: this.productData.finishInspection, finishInspection: this.productData.finishInspection,
incomingInspection: this.productData.finishInspection, incomingInspection: this.productData.incomingInspection,
processInspection: this.productData.processInspection processInspection: this.productData.processInspection,
outInspection: this.productData.outInspection
} }
this.$http['put']('/basic/qmsProduct',data).then(({ data: res }) => { this.$http['put']('/basic/qmsProduct',data).then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
@ -157,8 +162,9 @@ export default {
type: 'success', type: 'success',
duration: 500, duration: 500,
onClose: () => { onClose: () => {
this.visible = false this.$nextTick(() => {
this.$emit('refreshDataList') this.getDataList()
})
} }
}) })
}).catch(() => { }) }).catch(() => { })
@ -170,10 +176,12 @@ export default {
// }); // });
} else if (val.type === 'cancel') { } else if (val.type === 'cancel') {
const data = { const data = {
controlCodeId: null, id: val.data.id,
finishInspection: null, controlCodeId: 0,
incomingInspection: null, finishInspection: 0,
processInspection: null incomingInspection: 0,
processInspection: 0,
outInspection:0
} }
this.$http['put']('/basic/qmsProduct', data).then(({ data: res }) => { this.$http['put']('/basic/qmsProduct', data).then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
@ -184,8 +192,10 @@ export default {
type: 'success', type: 'success',
duration: 500, duration: 500,
onClose: () => { onClose: () => {
this.visible = false this.$nextTick(() => {
this.$emit('refreshDataList') this.getDataList()
})
// this.$emit('refreshDataList')
} }
}) })
}).catch(() => { }) }).catch(() => { })

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-06-26 15:01:44 * @LastEditTime: 2023-06-30 09:58:35
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -33,9 +33,6 @@ export default {
chooseData: [], chooseData: [],
urlOptions: { urlOptions: {
submitURL: "/basic/qmsCustomer", submitURL: "/basic/qmsCustomer",
getCustomerPageListURL: "/basic/qmsCustomerType/page",
infoURL: "/basic/qmsCustomer/{id}",
getCodeURL: '/basic/qmsCustomer/getCode',
getTeamMemberURL: '/basic/qmsTeamMember/page', getTeamMemberURL: '/basic/qmsTeamMember/page',
getUserListURL: '/sys/user/page', getUserListURL: '/sys/user/page',
editTeamMemberListURL: '/basic/qmsTeamMember' editTeamMemberListURL: '/basic/qmsTeamMember'
@ -84,10 +81,40 @@ export default {
}; };
}, },
}, },
destroyed() {
this.notChooseData = []
this.chooseData = []
},
methods: { methods: {
init(id,) { init(id,) {
this.teamId = id || "" this.teamId = id || ""
this.notChooseData = []
this.chooseData = []
// this.dataForm.dictTypeId = dictTypeId || ""; // this.dataForm.dictTypeId = dictTypeId || "";
// this.$http
// .get(this.urlOptions.getTeamMemberURL, {
// params: {
// teamId: id
// }
// })
// .then(({ data: res }) => {
// console.log(res)
// this.dataListLoading = false;
// if (res.code === 0) {
// var data = res.data.memberDTOS
// for (let i = 0; i < data.length; i++) {
// this.chooseData.push(data[i].userId)
// }
// this.notChooseData = res.data.undefinedUserDTOS.map((item) => {
// return {
// key: item.id,
// label: item.userName
// }
// })
// console.log(this.chooseData)
// console.log(this.notChooseData)
// }
// })
this.$http this.$http
.get(this.urlOptions.getTeamMemberURL, { .get(this.urlOptions.getTeamMemberURL, {
params: { params: {
@ -179,6 +206,8 @@ export default {
duration: 500, duration: 500,
onClose: () => { onClose: () => {
this.visible = false this.visible = false
this.notChooseData = []
this.chooseData = []
this.$emit("refreshDataList") this.$emit("refreshDataList")
}, },
}); });

View File

@ -21,12 +21,12 @@
</base-dialog> </base-dialog>
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel" <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
@confirm="handleConfirm" :before-close="handleCancel"> @confirm="handleConfirm" :before-close="handleCancel">
<control-add ref="addOrUpdate" @successSubmit="successSubmit"></control-add> <control-add ref="addOrUpdate" @refreshDataList="successSubmit"></control-add>
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> --> <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
</base-dialog> </base-dialog>
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel" <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
@confirm="handleSearchConfirm" :before-close="handleSearchCancel"> @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
<control-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"></control-search> <control-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit"></control-search>
<el-row slot="footer" type="flex" justify="end"> <el-row slot="footer" type="flex" justify="end">
<el-col :span="12"> <el-col :span="12">
<el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel"> <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
@ -189,12 +189,10 @@ export default {
// }, // },
// conditionSearchSubmit() {}, // conditionSearchSubmit() {},
conditionSearchSubmit(key) { conditionSearchSubmit(key) {
// console.log(key); this.listQuery.key = key
console.log(key); this.listQuery.page = 1
this.listQuery.key = key; this.getDataList(key)
this.listQuery.page = 1; this.searchOrUpdateVisible = false
this.getDataList(key);
this.searchOrUpdateVisible = false;
// console.log(11111); // console.log(11111);
// this.conditionSearchSubmit(); // this.conditionSearchSubmit();
}, },
@ -247,14 +245,14 @@ export default {
this.getDataList(); this.getDataList();
break; break;
case "correlation": case "correlation":
this.productOrEditTitle = "产品"; this.productOrEditTitle = "产品"
this.productOrUpdateVisible = true; this.productOrUpdateVisible = true
// this.searchOrUpdateHandle(this.productData); // this.searchOrUpdateHandle(this.productData);
// this.searchOrUpdateVisible = true; // this.searchOrUpdateVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.productOrUpdate.init(this.productData); this.$refs.productOrUpdate.init(this.productData)
}); });
console.log(this.productId); // console.log(this.productId);
break; break;
case "add": case "add":
this.addOrEditTitle = '新增' this.addOrEditTitle = '新增'

View File

@ -83,7 +83,7 @@ export default {
return { return {
urlOptions: { urlOptions: {
getDataListURL: "/basic/qmsCustomer/page", getDataListURL: "/basic/qmsCustomer/page",
deleteURL: "/basic/qmsCustomerType", deleteURL: "/basic/qmsCustomer",
exportURL: '/basic/qmsCustomer/export' exportURL: '/basic/qmsCustomer/export'
}, },
tableProps, tableProps,
@ -166,7 +166,7 @@ export default {
// console.log(11111); // console.log(11111);
// this.conditionSearchSubmit(); // this.conditionSearchSubmit();
}, },
handleClick() { handleClick(val) {
console.log(val); console.log(val);
if (val.type === "delete") { if (val.type === "delete") {
this.$confirm(`确定对[名称=${val.data.customerName}]进行删除操作?`, "提示", { this.$confirm(`确定对[名称=${val.data.customerName}]进行删除操作?`, "提示", {

View File

@ -21,7 +21,7 @@
</base-dialog> </base-dialog>
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel" <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
@confirm="handleSearchConfirm" :before-close="handleSearchCancel"> @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
<customerType-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"></customerType-search> <customerType-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit"></customerType-search>
<el-row slot="footer" type="flex" justify="end"> <el-row slot="footer" type="flex" justify="end">
<el-col :span="12"> <el-col :span="12">
<el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel"> <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">

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:37:39 * @LastEditTime: 2023-06-29 17:02:33
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -27,7 +27,7 @@
</base-dialog> </base-dialog>
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel" <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
@confirm="handleSearchConfirm" :before-close="handleSearchCancel"> @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
<failureType-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"></failureType-search> <failureType-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit"></failureType-search>
<el-row slot="footer" type="flex" justify="end"> <el-row slot="footer" type="flex" justify="end">
<el-col :span="12"> <el-col :span="12">
<el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel"> <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">

View File

@ -158,7 +158,7 @@ export default {
this.searchOrEditTitle = "搜索"; this.searchOrEditTitle = "搜索";
this.searchOrUpdateVisible = true; this.searchOrUpdateVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.searchOrUpdate.init(); this.$refs.searchOrUpdate.init()
}); });
}, },
// handleConfirm() { // handleConfirm() {
@ -171,7 +171,7 @@ export default {
this.listQuery.productName = dataForm.productName this.listQuery.productName = dataForm.productName
this.listQuery.productCode = dataForm.productCode this.listQuery.productCode = dataForm.productCode
this.listQuery.page = 1; this.listQuery.page = 1;
this.getDataList(); this.getDataList()
this.searchOrUpdateVisible = false; this.searchOrUpdateVisible = false;
// console.log(11111); // console.log(11111);
// this.conditionSearchSubmit(); // this.conditionSearchSubmit();
@ -219,7 +219,8 @@ export default {
switch (val.btnName) { switch (val.btnName) {
case "search": case "search":
// this.listQuery.paramCode = val.paramCode; // this.listQuery.paramCode = val.paramCode;
this.listQuery.key = null; this.listQuery.productName = null
this.listQuery.productCode = null
// console.log(i18n); // console.log(i18n);
this.listQuery.page = 1; this.listQuery.page = 1;
this.getDataList(); this.getDataList();

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-06-28 14:15:42 * @LastEditTime: 2023-07-06 14:59:27
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -126,13 +126,99 @@
</el-col> </el-col>
</el-row> </el-row>
<el-button @click="getTableData()" type="primary">{{ $t('gage.tabularComputations') }}</el-button> <el-button @click="getTableData()" type="primary">{{ $t('gage.tabularComputations') }}</el-button>
<base-table :table-props="tableProps" :table-data="tableData" :page="1" :limit="20" /> <base-table :table-props="tableProps" :table-data="tableData" />
</el-form> </el-form>
</template> </template>
<script> <script>
import debounce from "lodash/debounce"; import debounce from "lodash/debounce";
import basicAdd from "@/mixins/basic-add"; import basicAdd from "@/mixins/basic-add";
import available from "./available";
// const tableProps = [
// {
// prop: 'equipmentName',
// label: ''
// },
// // {
// // prop: 'lineA',
// // label: '(h)',
// // children: [
// // {
// // prop: 'workTime',
// // label: ''
// // },
// // {
// // prop: 'workTimeRate',
// // label: ''
// // }
// // ]
// // },
// // {
// // prop: 'lineB',
// // label: '(h)',
// // children: [
// // {
// // prop: 'downTime',
// // label: ''
// // },
// // {
// // prop: 'downTimeRate',
// // label: ''
// // }
// // ]
// // },
// // {
// // prop: 'lineC',
// // label: '',
// // children: [
// // {
// // prop: 'faultTime',
// // label: ''
// // },
// // {
// // prop: 'faultTimeRate',
// // label: ''
// // }
// // ]
// // },
// // {
// // prop: 'lineD',
// // label: '',
// // children: [
// // {
// // prop: 'actualProcessingSpeed',
// // label: ''
// // },
// // {
// // prop: 'theoreticalProcessingSpeed',
// // label: ''
// // },
// // {
// // prop: 'speedActuationRate',
// // label: ''
// // }
// // ]
// // }
// ]
const tableProps = [
{
prop: 'testUserName',
label: '人员',
align: 'center'
},
{
prop: 'orderNumber',
label: '序号',
align:'center'
},
{
prop: 'test',
label: '零件',
align: 'center',
children: [
]
}
]
export default { export default {
mixins: [basicAdd], mixins: [basicAdd],
data() { data() {
@ -147,10 +233,11 @@ export default {
getCustomerListURL: '/basic/qmsCustomer/page', getCustomerListURL: '/basic/qmsCustomer/page',
getTabularComputationsURL: '/gage/qmsGageGrrTester/table' getTabularComputationsURL: '/gage/qmsGageGrrTester/table'
}, },
trueTableProps: [],
gageList: [], gageList: [],
userList: [], userList: [],
tableProps,
customerList: [], customerList: [],
tableProps: [],
tableData:[], tableData:[],
gageTypeList:[], gageTypeList:[],
departmentList: [], departmentList: [],
@ -217,6 +304,8 @@ export default {
} }
], ],
visible: false, visible: false,
// tableProp2,
chartDataArr: [],
dataForm: { dataForm: {
connection:null, connection:null,
corporation: null, corporation: null,
@ -271,6 +360,10 @@ export default {
mounted () { mounted () {
this.getData(); this.getData();
}, },
destroyed () {
this.tableData = []
this.tableProps = []
},
methods: { methods: {
getTableData() { getTableData() {
this.$http.get(this.urlOptions.getTabularComputationsURL, { this.$http.get(this.urlOptions.getTabularComputationsURL, {
@ -278,119 +371,136 @@ export default {
gageGrrId:this.dataForm.id gageGrrId:this.dataForm.id
}, },
}) })
.then(({ data: res }) => { .then(({ data: result }) => {
if (res.code === 0) { if (result.code === 0) {
console.log(res) console.log(result)
let arr = []
// let aa = []
// let moreData = [
// // {
// // testUserName: null,
// // data: [
// // {
// // orderNumber: result.data.qmsGageGrrTesterDTOList[i].list[j].orderNumber,
// // data: aa
// // },
// // {
// // equipmentName: '',
// // data: aa
// // },
// // {
// // equipmentName: '',
// // data: aa
// // },
// // {
// // equipmentName: '',
// // data: aa
// // }
// // ]
// // },
// ]
for (let i = 0; i < result.data.qmsGageGrrTesterDTOList.length; i++){
// console.log(result.data.qmsGageGrrTesterDTOList[i].orderMapList)
Object.keys(result.data.qmsGageGrrTesterDTOList[i].partMapList).forEach((item) => {
this.tableProps[2].children.push({
label: String(item),
prop: 'measuredData' + String(item),
align: 'center'
})
})
Object.keys(result.data.qmsGageGrrTesterDTOList[i].orderMapList).forEach((item) => {
let measuredDataProp = 'measuredData' + String(item)
this.tableData.push({
testUserName: result.data.qmsGageGrrTesterDTOList[i].testUserName,
orderNumber: item,
[measuredDataProp]: '',
})
})
Object.keys(result.data.qmsGageGrrTesterDTOList[i].orderMapList).forEach((item) => {
result.data.qmsGageGrrTesterDTOList[i].orderMapList[item].forEach((ele, index, arr) => {
let measuredData = 'measuredData' + String(index + 1)
console.log(item)
// console.log(arr)
// console.log(ele)
// console.log(this.tableProps[2].children.prop);
// console.log(this.tableProps[2].children[item - 1].prop)
console.log(index)
console.log(measuredData)
console.log(ele)
// console.log(this.tableData[index + 1])
this.tableData[item-1][measuredData] = ele
// console.log(this.tableData[item - 1])
})
})
}
console.log(this.tableProps)
console.log(this.tableData)
// console.log(this.table)
// console.log(moreData,'1111')
// for (let i = 0; i < 30; i++) {
// let a = {
// time: '2022-11-' + i,
// eqCT: 0.01,
// eqTT: 0.62,
// lineCT: 0.73,
// lineTT: 0.45
// }
// aa.push(a)
// }
// this.numArr = []
// let num = 0
// const tableConfig = []
// this.chartDataArr = []
// const dataArr = moreData.map((item, index) => {
// let dataArr = []
// if (item.data) {
// this.chartDataArr = this.chartDataArr.concat(item.data)
// num += item.data.length
// this.numArr.push(num)
// dataArr = item.data.map((z, idx) => {
// const dataArr = {}
// z.data.forEach((i) => {
// // tableConfig
// if (index === 0 && idx === 0) {
// tableConfig.push({
// label: i.time,
// prop: i.time,
// children: [
// { prop: i.time + 'eqCT', label: 'CT', subcomponent: available },
// { prop: i.time + 'eqTT', label: 'TT' },
// { prop: i.time + 'lineCT', label: '线CT' },
// {
// prop: i.time + 'lineTT',
// label: '线TT',
// // subcomponent: demo3Sub
// }
// ]
// })
// }
// //
// dataArr[i.time + 'eqCT'] = i.eqCT
// dataArr[i.time + 'eqTT'] = i.eqTT
// dataArr[i.time + 'lineCT'] = i.lineCT
// dataArr[i.time + 'lineTT'] = i.lineTT
// dataArr.testUserName = item.testUserName
// dataArr.orderNumber = z.orderNumber
// })
// console.log(dataArr)
// return dataArr
// })
// }
// return dataArr
// })
// console.log(tableConfig)
// this.trueTableProps = this.tableProp2.concat(tableConfig)
// console.log(this.trueTableProps,'22112112')
// this.tableData = this.flatten(dataArr)
// console.log(this.tableData)
} }
}) })
.catch(() => { .catch(() => {
}) })
let aa = []
let moreData = [
{
process: '综合',
data: [
{
equipmentName: '上片投入数量',
data: aa
},
{
equipmentName: '机器人投入数',
data: aa
},
{
equipmentName: '良品总投入数',
data: aa
},
{
equipmentName: '工序损耗',
data: aa
}
]
},
{
process: '上片',
data: [
{
equipmentName: '上片损失',
data: aa
}
]
},
{
process: '精切',
data: [
{
equipmentName: '精切损失',
data: aa
},
{
equipmentName: '精切抽检',
data: aa
}
]
}
]
for (let i = 0; i < 30; i++) {
let a = {
time: '2022-11-' + i,
eqCT: 0.01,
eqTT: 0.62,
lineCT: 0.73,
lineTT: 0.45
}
aa.push(a)
}
this.numArr = []
let num = 0
const tableConfig = []
this.chartDataArr = []
const dataArr = moreData.map((item, index) => {
let dataArr = []
if (item.data) {
this.chartDataArr = this.chartDataArr.concat(item.data)
num += item.data.length
this.numArr.push(num)
dataArr = item.data.map((z, idx) => {
const dataArr = {}
z.data.forEach((i) => {
// tableConfig
if (index === 0 && idx === 0) {
tableConfig.push({
label: i.time,
prop: i.time,
children: [
{ prop: i.time + 'eqCT', label: '设备CT' },
{ prop: i.time + 'eqTT', label: '设备TT' },
{ prop: i.time + 'lineCT', label: '产线CT' },
{
prop: i.time + 'lineTT',
label: '产线TT',
subcomponent: demo3Sub
}
]
})
}
//
dataArr[i.time + 'eqCT'] = i.eqCT
dataArr[i.time + 'eqTT'] = i.eqTT
dataArr[i.time + 'lineCT'] = i.lineCT
dataArr[i.time + 'lineTT'] = i.lineTT
dataArr.process = item.process
dataArr.equipmentName = z.equipmentName
})
console.log(dataArr)
return dataArr
})
}
return dataArr
})
console.log(tableConfig)
this.trueTableProps = this.tableProp2.concat(tableConfig)
console.log(this.trueTableProps)
this.tableData = this.flatten(dataArr)
console.log(this.tableData)
}, },
// tree->[] // tree->[]
flatten(arr) { flatten(arr) {

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-06-27 15:38:27 * @LastEditTime: 2023-07-06 14:15:17
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -119,10 +119,10 @@
<td colspan="3">{{ $t('gage.totalVariation') }}</td> <td colspan="3">{{ $t('gage.totalVariation') }}</td>
<td>8</td> <td>8</td>
<td>{{ this.grrReportData.k3[6] }}</td> <td>{{ this.grrReportData.k3[6] }}</td>
<td rowspan="4">{{ this.grrReportData.ndc }}</td> <td rowspan="3">{{ this.grrReportData.ndc }}</td>
</tr> </tr>
<tr> <tr>
<td rowspan="3" colspan="3">{{ this.grrReportData.tv }}</td> <td rowspan="2" colspan="3">{{ this.grrReportData.tv }}</td>
<td>9</td> <td>9</td>
<td>{{ this.grrReportData.k3[7] }}</td> <td>{{ this.grrReportData.k3[7] }}</td>
</tr> </tr>
@ -131,11 +131,13 @@
<td>{{ this.grrReportData.k3[8] }}</td> <td>{{ this.grrReportData.k3[8] }}</td>
</tr> </tr>
<tr> <tr>
<td colspan="2">{{ $t('gage.decide') }}</td> <td colspan="2" rowspan="2">{{ $t('gage.decide') }}</td>
<td>%GRR</td> <td>%GRR</td>
<td rowspan="4">{{ this.grrReportData.isAccept }}</td> <td colspan="3">{{ this.grrReportData.isAccept }}</td>
</tr>
<tr>
<td>reason</td> <td>reason</td>
<td rowspan="4">{{ this.grrReportData.reason }}</td> <td colspan="3">{{ this.grrReportData.reason }}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -216,3 +218,34 @@ export default {
}, },
}; };
</script> </script>
<style scoped>
td{
width: 400px;
}
table {
border-collapse: collapse;
margin: 0 auto;
text-align: center;
}
table td,
table th {
border: 1px solid #cad9ea;
color: #666;
height: 30px;
}
table thead th {
background-color: #CCE8EB;
width: 100px;
}
table tr:nth-child(odd) {
background: #fff;
}
table tr:nth-child(even) {
background: #F5FAFA;
}
</style>

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-27 14:51:34 * @LastEditTime: 2023-06-28 14:27:57
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -327,34 +327,3 @@ export default {
} }
}; };
</script> </script>
<style>
td{
width: 400px;
}
table {
border-collapse: collapse;
margin: 0 auto;
text-align: center;
}
table td,
table th {
border: 1px solid #cad9ea;
color: #666;
height: 30px;
}
table thead th {
background-color: #CCE8EB;
width: 100px;
}
table tr:nth-child(odd) {
background: #fff;
}
table tr:nth-child(even) {
background: #F5FAFA;
}
</style>