|
|
@@ -62,12 +62,19 @@
|
|
|
<footer>
|
|
|
<aside class="left">
|
|
|
<h6 style="font-size: 12px">{{ currentRow.batchNo }}</h6>
|
|
|
- <h6 style="letter-spacing: -1px">{{ currentRow.qualityTime }}</h6>
|
|
|
+ <h6 style="letter-spacing: -1px; font-size: 14px">{{
|
|
|
+ currentRow.qualityTime
|
|
|
+ }}</h6>
|
|
|
<h6
|
|
|
- style="line-height: 18px; margin-top: 10px"
|
|
|
- v-if="currentRow.designDrawingRemark"
|
|
|
+ style="
|
|
|
+ line-height: 18px;
|
|
|
+ margin-top: 10px;
|
|
|
+ font-size: 14px;
|
|
|
+ width: 140px;
|
|
|
+ "
|
|
|
+ v-if="currentRow.remark"
|
|
|
>
|
|
|
- 备注:{{ currentRow.designDrawingRemark }}
|
|
|
+ 备注:{{ currentRow.remark }}
|
|
|
</h6>
|
|
|
<h5 style="font-family: '宋体'; font-size: 16px" class="status">
|
|
|
合格
|
|
|
@@ -92,11 +99,31 @@
|
|
|
</div>
|
|
|
|
|
|
<template v-slot:footer>
|
|
|
- <!-- <el-button @click="print">设置备注</el-button> -->
|
|
|
+ <el-button @click="remarkVisible = true">设置备注</el-button>
|
|
|
<el-button type="primary" @click="imgVisibleOpen">更新设计图</el-button>
|
|
|
<el-button @click="print">打印预览</el-button>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ class="ele-dialog-form"
|
|
|
+ :visible.sync="remarkVisible"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :close-on-press-escape="false"
|
|
|
+ :before-close="close"
|
|
|
+ width="300px"
|
|
|
+ append-to-body
|
|
|
+ title="设置备注"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ clearable
|
|
|
+ v-model="currentRow.remark"
|
|
|
+ placeholder="请输入备注"
|
|
|
+ />
|
|
|
+ <template v-slot:footer>
|
|
|
+ <el-button type="primary" @click="save">确认</el-button>
|
|
|
+ <el-button @click="close">取消</el-button>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
<el-dialog
|
|
|
class="ele-dialog-form"
|
|
|
:visible.sync="imgVisible"
|
|
|
@@ -122,7 +149,7 @@ import {
|
|
|
getQualityControlWorkOrder,
|
|
|
queryListDetail,
|
|
|
exportList,
|
|
|
- savePicture
|
|
|
+ savePicture,save
|
|
|
} from '@/api/inspectionStatistics';
|
|
|
import dictMixins from '@/mixins/dictMixins';
|
|
|
import { printElement } from 'ele-admin';
|
|
|
@@ -139,13 +166,14 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
visible: false,
|
|
|
+ remarkVisible: false,
|
|
|
text: '',
|
|
|
- currentRow: {},
|
|
|
+ currentRow: {remark:""},
|
|
|
selection: [],
|
|
|
- imgs: [],
|
|
|
list: [],
|
|
|
loading: false,
|
|
|
imgVisible: false,
|
|
|
+ imgs: {},
|
|
|
columns: [
|
|
|
{
|
|
|
width: 45,
|
|
|
@@ -444,18 +472,28 @@ export default {
|
|
|
},
|
|
|
imgVisibleOpen() {
|
|
|
this.imgVisible = true;
|
|
|
- this.imgs = (this.currentRow.picture && this.currentRow.picture[0]) || {};
|
|
|
+ console.log(this.currentRow.picture, 'this.currentRow.picture');
|
|
|
+ this.imgs = JSON.parse(JSON.stringify(this.currentRow.picture));
|
|
|
},
|
|
|
savePicture() {
|
|
|
savePicture({
|
|
|
id: this.currentRow.id,
|
|
|
- picture: [this.imgs]
|
|
|
+ remark: this.currentRow.remark
|
|
|
+ });
|
|
|
+ this.currentRow.picture = this.imgs;
|
|
|
+ this.setCode();
|
|
|
+ this.handleClose();
|
|
|
+ this.$refs.search.search();
|
|
|
+ },
|
|
|
+
|
|
|
+ save() {
|
|
|
+ save({
|
|
|
+ id: this.currentRow.id,
|
|
|
+ remark: this.currentRow.remark
|
|
|
});
|
|
|
-
|
|
|
- this.currentRow.picture = [this.imgs];
|
|
|
- this.openEdit(this.currentRow);
|
|
|
- this.handleClose()
|
|
|
+ this.remarkVisible = false;
|
|
|
this.$refs.search.search();
|
|
|
+
|
|
|
},
|
|
|
datasource({ page, where, limit, parent }) {
|
|
|
this.where = where;
|
|
|
@@ -481,22 +519,37 @@ export default {
|
|
|
print() {
|
|
|
printElement(this.$refs.printRef);
|
|
|
},
|
|
|
- handleClose(){
|
|
|
-
|
|
|
- this.$refs.WithViewRef.clearImg()
|
|
|
+ handleClose() {
|
|
|
+ this.$refs.WithViewRef.clearImg();
|
|
|
this.imgVisible = false;
|
|
|
},
|
|
|
+ close() {
|
|
|
+ this.remarkVisible = false;
|
|
|
+ // this.currentRow.remark = '';
|
|
|
+ },
|
|
|
openEdit(row) {
|
|
|
this.visible = true;
|
|
|
- this.currentRow = row;
|
|
|
- this.imgs = (this.currentRow.picture && this.currentRow.picture[0]) || {};
|
|
|
+ if (row) {
|
|
|
+ this.currentRow = row;
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ Array.isArray(this.currentRow.picture) &&
|
|
|
+ this.currentRow.picture.length > 0
|
|
|
+ ) {
|
|
|
+ this.currentRow.picture = this.currentRow.picture[0];
|
|
|
+ }
|
|
|
+ this.setCode();
|
|
|
+ },
|
|
|
+ setCode() {
|
|
|
const paramsStr = this.obj_to_str({
|
|
|
- productName: encodeURIComponent(row.productName),
|
|
|
- specification: encodeURIComponent(row.specification),
|
|
|
- productCode: row.productCode,
|
|
|
- batchNo: row.batchNo,
|
|
|
- createTime: row.qualityTime.split(' ')[0],
|
|
|
- designDrawingImg: encodeURIComponent(getImageUrl(this.imgs.storePath))
|
|
|
+ productName: encodeURIComponent(this.currentRow.productName),
|
|
|
+ specification: encodeURIComponent(this.currentRow.specification),
|
|
|
+ productCode: this.currentRow.productCode,
|
|
|
+ batchNo: this.currentRow.batchNo,
|
|
|
+ createTime: this.currentRow.qualityTime.split(' ')[0],
|
|
|
+ designDrawingImg: encodeURIComponent(
|
|
|
+ getImageUrl(this.currentRow.picture.storePath)
|
|
|
+ )
|
|
|
});
|
|
|
this.text =
|
|
|
window.location.origin +
|