src/assets/api/controller.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/components/view/Technicalindex.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/components/view/finishedProductInspectionUp.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/components/view/processInspectionUpdate.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/components/view/rawInsDetail.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/components/view/sale.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/assets/api/controller.js
@@ -186,6 +186,7 @@ selectSaleDatilById: "sale/selectSaleDatilById", //根据销售单id查看详情, addSale: "sale/addSale", //新增销售单 saleCheck: "sale/check", //审核销售单 saleDownload: "sale/download",//下载附件 synchronization: "sale/synchronization", //同步 updateSaleById: "sale/updateSaleById", //根据销售单id修改详情信息 delSale: "sale/delSale", //根据销售单id删除 src/components/view/Technicalindex.vue
@@ -324,6 +324,7 @@ }, downloadSelect() { console.log(this.downloadTypeSelect); }, handleSelectionChange() { src/components/view/finishedProductInspectionUp.vue
@@ -24,14 +24,14 @@ </el-col> <el-col :span="7"> <el-form-item label="客户名称:"> <el-input disabled style="width: 180px;" v-model="processInspectVo.prname" placeholder="请输入客户名称" autocomplete="off" /> <el-input disabled style="width: 180px;" v-model="processInspectVo.prname" placeholder="请输入客户名称" autocomplete="off" /> </el-form-item> </el-col> <el-col :span="7"> <el-form-item label="工程名称:"> <el-input disabled style="width: 180px;" v-model="processInspectVo.sname" placeholder="请输入工程名称" autocomplete="off" /> <el-input disabled style="width: 180px;" v-model="processInspectVo.sname" placeholder="请输入工程名称" autocomplete="off" /> </el-form-item> </el-col> </el-row> @@ -54,8 +54,8 @@ </el-col> <el-col :span="7"> <el-form-item label="产品编码:"> <el-input disabled style="width: 180px;" v-model="processInspectVo.mcode" placeholder="请输入产品编码" autocomplete="off" /> <el-input disabled style="width: 180px;" v-model="processInspectVo.mcode" placeholder="请输入产品编码" autocomplete="off" /> </el-form-item> </el-col> </el-row> @@ -68,14 +68,14 @@ </el-col> <el-col :span="7"> <el-form-item label="单位:"> <el-input disabled style="width: 180px;" v-model="processInspectVo.unit" placeholder="请输入产品编码" autocomplete="off" /> <el-input disabled style="width: 180px;" v-model="processInspectVo.unit" placeholder="请输入产品编码" autocomplete="off" /> </el-form-item> </el-col> <el-col :span="7"> <el-form-item label="数量:"> <el-input disabled style="width: 180px;" v-model="processInspectVo.quantity" placeholder="请输入数量" autocomplete="off" /> <el-input disabled style="width: 180px;" v-model="processInspectVo.quantity" placeholder="请输入数量" autocomplete="off" /> </el-form-item> </el-col> <el-col :span="3" style="display: flex;justify-content: end;"> @@ -88,9 +88,11 @@ <div class="inspectionProject"> <el-row> <el-col :span="12" class="inspectionProject_span">检验项目</el-col> <el-col v-if="!isUpBtn" :span="12" class="inspectionProject_span" style="display: flex;justify-content: end;"> <el-col v-if="!isUpBtn" :span="12" class="inspectionProject_span" style="display: flex;justify-content: end;"> <el-button size="mini" @click="clickDeleteInspectionColumn()">删除检验值列</el-button> <el-button style="margin-right: 30px;" size="mini" @click="clickAddInspectionColumn()">添加检验值列</el-button> <el-button style="margin-right: 30px;" size="mini" @click="clickAddInspectionColumn()">添加检验值列</el-button> <!-- <el-button size="mini" style="margin-right: 30px;" @@ -164,11 +166,11 @@ <div class="div_device_dialog"> <el-input placeholder="输入关键字进行过滤" v-model="filterText" style="margin-bottom: 6px;"> </el-input> <el-tree class="filter-tree" :data="materialOptions" :props="defaultProps" default-expand-all highlight-current @node-click="nodeClick" :filter-node-method="filterNode" ref="tree"> <el-tree class="filter-tree" :data="materialOptions" :props="defaultProps" default-expand-all highlight-current @node-click="nodeClick" :filter-node-method="filterNode" ref="tree"> <div class="custom-tree-node" slot-scope="{ data }"> <span><i :class="`node_i ${data.children ? 'el-icon-folder-opened' : 'el-icon-tickets'}`"></i>{{ data.name }}</span> <span><i :class="`node_i ${data.children ? 'el-icon-folder-opened' : 'el-icon-tickets'}`"></i>{{ data.name }}</span> </div> </el-tree> </div> @@ -321,17 +323,21 @@ }); return } let pro = this.inspectionItems.filter(item => { return item.result === 0; }) if (pro.length > 0) { this.$prompt('请输入不合格数量', '不合格数量', { confirmButtonText: '确定', cancelButtonText: '取消', inputPattern: /^\d+$/, inputErrorMessage: '请输入正确数字格式' }).then(({ value }) => { this.$axios.post(this.$api.url.finishedInspectUpdateFinishInspectsById, { id: this.detailId id: this.detailId, number: value }).then(res => { if (res.code == 200) { if (res.message === '项目未检验完!') { this.$message({ message: res.message, type: 'warning' }); return } this.$message({ message: '上报成功', type: 'success' @@ -343,8 +349,39 @@ type: 'warning' }); } }) }) }).catch(() => { this.$message({ type: 'info', message: '取消输入' }); }); } else { this.$axios.post(this.$api.url.finishedInspectUpdateFinishInspectsById, { id: this.detailId }).then(res => { if (res.code == 200) { if (res.message === '项目未检验完!') { this.$message({ message: res.message, type: 'warning' }); return } // this.$message({ // message: '上报成功', // type: 'success' // }); this.$parent.comBackMain(true) } else { this.$message({ message: res.message, type: 'warning' }); } }) } }, changeOptionsSamplename() { let id = this.processInspectVo.material.split("-")[0] src/components/view/processInspectionUpdate.vue
@@ -24,29 +24,31 @@ <el-form-item label="产品名称:"> <el-select style="width: 210px;" size="small" disabled @change="selectSample" v-model="processInspectVo.material" placeholder="请选择产品"> <el-option v-for="item in optionsSamplename" :key="item.value" :label="item.name" :value="item.name"> <el-option v-for="item in optionsSamplename" :key="item.value" :label="item.name" :value="item.name"> </el-option> </el-select> </el-form-item> </el-col> <el-col :span="7"> <el-form-item label="产品编码:"> <el-input style="width: 210px;" size="small" disabled v-model="processInspectVo.materialCode" placeholder="请输入产品编码" /> <el-input style="width: 210px;" size="small" disabled v-model="processInspectVo.materialCode" placeholder="请输入产品编码" /> </el-form-item> </el-col> </el-row> <el-row :gutter="230"> <el-col :span="7"> <el-form-item label="规格型号:"> <el-input style="width: 210px;" size="small" disabled v-model="processInspectVo.specificationsModel" placeholder="请输入规格型号" /> <el-input style="width: 210px;" size="small" disabled v-model="processInspectVo.specificationsModel" placeholder="请输入规格型号" /> </el-form-item> </el-col> <el-col :span="7"> <el-form-item label="工序名称:"> <el-select @change="changeOptionSoptionSprocesses" disabled v-model="processInspectVo.techfather" placeholder="请选择" style="width: 210px;" size="small"> <el-select @change="changeOptionSoptionSprocesses" disabled v-model="processInspectVo.techfather" placeholder="请选择" style="width: 210px;" size="small"> <el-option v-for="item in optionSoptionSprocesses" :key="item.name" :label="item.name" :value="item.name"> </el-option> @@ -55,8 +57,8 @@ </el-col> <el-col :span="7"> <el-form-item label="工艺名称:"> <el-select v-model="processInspectVo.techname" disabled placeholder="请选择" style="width: 210px;" size="small"> <el-select v-model="processInspectVo.techname" disabled placeholder="请选择" style="width: 210px;" size="small"> <el-option v-for="item in optionTechnology" :key="item.id" :label="item.name" :value="item.id + '-' + item.name"> </el-option> @@ -89,7 +91,8 @@ <el-col :span="12" class="inspectionProject_span">检验项目</el-col> <el-col v-if="!isUpBtn" :span="12" class="inspectionProject_span"> <el-button size="mini" @click="clickDeleteInspectionColumn()">删除检验值列</el-button> <el-button style="margin-right: 30px;" size="mini" @click="clickAddInspectionColumn()">添加检验值列</el-button> <el-button style="margin-right: 30px;" size="mini" @click="clickAddInspectionColumn()">添加检验值列</el-button> <!-- <el-button size="mini" style="margin-right: 30px;" @@ -165,10 +168,11 @@ <div class="div_device_dialog"> <el-input placeholder="输入关键字进行过滤" v-model="filterText" style="margin-bottom: 6px;"> </el-input> <el-tree class="filter-tree" :data="materialOptions" :props="defaultProps" default-expand-all highlight-current @node-click="nodeClick" :filter-node-method="filterNode" ref="tree"> <el-tree class="filter-tree" :data="materialOptions" :props="defaultProps" default-expand-all highlight-current @node-click="nodeClick" :filter-node-method="filterNode" ref="tree"> <div class="custom-tree-node" slot-scope="{ data }"> <span><i :class="`node_i ${data.children ? 'el-icon-folder-opened' : 'el-icon-tickets'}`"></i>{{ data.name }}</span> <span><i :class="`node_i ${data.children ? 'el-icon-folder-opened' : 'el-icon-tickets'}`"></i>{{ data.name }}</span> </div> </el-tree> </div> @@ -317,6 +321,41 @@ }); return } let pro = this.inspectionItems.filter(item => { return item.result === 0; }) if (pro.length > 0) { this.$prompt('请输入不合格数量', '不合格数量', { confirmButtonText: '确定', cancelButtonText: '取消', inputPattern: /^\d+$/, inputErrorMessage: '请输入正确数字格式' }).then(({ value }) => { this.$axios.post(this.$api.url.processInspectUpdateProcessInspectsById, { id: this.detailId, number: value }).then(res => { if (res.code == 200) { // this.$message({ // message: '上报成功', // type: 'success' // }); this.$parent.combackMain(true) } else { this.$message({ message: res.message, type: 'warning' }); } }) }).catch(() => { this.$message({ type: 'info', message: '取消输入' }); }); } else { this.$axios.post(this.$api.url.processInspectUpdateProcessInspectsById, { id: this.detailId }).then(res => { @@ -341,6 +380,7 @@ } }) } }, handleClick() {}, updateInsInfo(row) { src/components/view/rawInsDetail.vue
@@ -102,7 +102,8 @@ <template slot-scope="scope"> <!-- <el-input v-if="detailId == null" v-model="scope.row.name" placeholder="请输入项目名称"></el-input> --> <el-autocomplete v-if="detailId == null" class="inline-input" v-model="scope.row.name" :fetch-suggestions="querySearch" placeholder="请输入项目名称" @select="handleSelect(scope.row)" @blur="handleSelect(scope.row)"></el-autocomplete> :fetch-suggestions="querySearch" placeholder="请输入项目名称" @select="handleSelect(scope.row)" @blur="handleSelect(scope.row)"></el-autocomplete> <el-input v-else v-model="scope.row.rpName" disabled></el-input> </template> </el-table-column> @@ -181,7 +182,7 @@ </el-table-column> <el-table-column v-if="detailId !== null" label="操作" width="120"> <template> <el-button type="text" size="small" @click.once="submitSave">上报</el-button> <el-button type="text" size="small" @click="submitSave">上报</el-button> </template> </el-table-column> </el-table> @@ -438,14 +439,39 @@ this.getDetailInfo(); //重新刷新信息数据 } }, async submitSave() { const res = await this.$axios.post( submitSave() { let pro = this.projectTable.filter(item => { return item.testState === 0; }) if (pro.length > 0) { this.$prompt('请输入不合格数量', '不合格数量', { confirmButtonText: '确定', cancelButtonText: '取消', inputPattern: /^\d+$/, inputErrorMessage: '请输入正确数字格式' }).then(({ value }) => { this.$axios.post( this.$api.url.updateRawInspectsById+`${this.detailId}`, {"number": value } ).then(res => { this.$message.success("提交成功"); this.getDetailInfo(); this.goBack() }); }).catch(() => { this.$message({ type: 'info', message: '取消输入' }); }); }else{ this.$axios.post( this.$api.url.updateRawInspectsById + `${this.detailId}` ).then(res => { this.$message.success("提交成功"); this.getDetailInfo(); this.goBack() }); } }, // 获取设备树内容 getOptions() { src/components/view/sale.vue
@@ -180,6 +180,7 @@ <el-table-column label="操作" width="220"> <template slot-scope="scope"> <span class="table_do" @click="changeShowDetail(scope.row)"> 查看详情 </span> <span class="table_do" @click="downloadFile(scope.row)"> 下载附件 </span> <span class="table_do" v-if="scope.row.type == 2" @click="saleCheck(scope)"> 审核 </span> <span class="table_do" v-else> </span> <span class="table_do" v-if="scope.row.type == 2" @@ -450,6 +451,29 @@ this.selectRawInspectsList() }, methods: { downloadFile(row) { let baseIp = "http://192.168.18.16:9999" this.axios.post(this.$api.url.saleDownload, { id: row.id }).then(res => { // console.log(res.data); // 循环遍历每个文件并创建下载链接 for (let index = 0; index < res.data.length; index++) { const element = res.data[index]; // 创建一个链接元素 var a = document.createElement('a'); // 设置链接元素的href属性为文件的URL a.href = baseIp+element; // // 设置链接元素的download属性为文件名 // a.download = row.name+"附件"+(index+1); // 模拟点击链接以触发下载 a.click(); } }) }, closeDialog() { this.addData = { orderNumber: null,