From 2bd9b32aa6378ff6a841780628b844a42dbd8f01 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期五, 31 十月 2025 16:39:29 +0800
Subject: [PATCH] 下载采集器功能
---
src/views/business/rawMaterialInspection/index.vue | 112 ++++++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 89 insertions(+), 23 deletions(-)
diff --git a/src/views/business/rawMaterialInspection/index.vue b/src/views/business/rawMaterialInspection/index.vue
index 1fa1140..8d25540 100644
--- a/src/views/business/rawMaterialInspection/index.vue
+++ b/src/views/business/rawMaterialInspection/index.vue
@@ -47,6 +47,12 @@
@keyup.enter.native="refreshTable">
</el-input>
</el-form-item>
+ <el-form-item label="閿�鍞鍗曞垎绫�" prop="orderType" v-if="(tabIndex === 3 || tabIndex === 4) && more">
+ <el-select v-model="componentData.orderType" clearable size="small"
+ @keyup.enter.native="refreshTable">
+ <el-option v-for="(item,index) in orderTypeList" :label="item.dictLabel" :value="item.dictValue" :key="index"></el-option>
+ </el-select>
+ </el-form-item>
</el-row>
</el-form>
</div>
@@ -65,7 +71,7 @@
@click="handleDown">瀵煎嚭</el-button>
<el-button v-if="tabIndex === 0" :loading="btnLoading" size="small" type="primary"
@click="openIFS">鑾峰彇IFS璁㈠崟</el-button>
- <el-button v-if="tabIndex === 0" size="small" type="primary" @click="declareS">鎶ユ</el-button>
+ <el-button v-if="tabIndex === 0" size="small" type="primary" @click="declareS">鎵归噺鎶ユ</el-button>
<el-button v-if="tabIndex === 0" size="small" type="primary" @click="addDeclare">鏂板鎶ユ淇℃伅</el-button>
</div>
</div>
@@ -83,17 +89,24 @@
</div>
</div>
<!-- 鎵归噺鎶ユ -->
- <el-dialog :visible.sync="declareDialogSVisible" title="纭鎶ユ" width="30%">
- <p style="font-size:16px;color:#333333">鏄惁纭鎶ユ閫夋嫨鐨勬暟鎹紵</p>
+ <el-dialog :visible.sync="declareDialogSVisible" title="鎵归噺鎶ユ" width="30%" :before-close="resetBatchFormData">
+ <el-form ref="declareBatchObj" :inline="true" :model="declareBatchObj" :rules="declareObjBatchRules" label-width="130px"
+ label-position="right">
+ <el-form-item class="declareObj-form-item" label="閿�鍞鍗曞垎绫伙細" prop="orderType">
+ <el-select v-model="declareBatchObj.orderType" prop="orderType" clearable size="small">
+ <el-option v-for="(item,index) in orderTypeList" :value="item.dictValue" :label="item.dictLabel" :key="index"></el-option>
+ </el-select>
+ </el-form-item>
+ </el-form>
<span slot="footer" class="dialog-footer">
<el-row>
- <el-button @click="declareDialogSVisible = false">鍙� 娑�</el-button>
+ <el-button @click="resetBatchFormData()">鍙� 娑�</el-button>
<el-button :loading="submitDeclareLoading" type="primary" @click="submitDeclareS">纭� 瀹�</el-button>
</el-row>
</span>
</el-dialog>
<!-- 纭鎶ユ -->
- <el-dialog :close-on-click-modal="false" :title="declareType === 'add' ? '鏂板鎶ユ淇℃伅' : '鍘熸潗鏂欐姤妫�'"
+ <el-dialog :close-on-click-modal="false" :title="declareType === 'add' ? '鏂板鎶ユ淇℃伅' : '閿�鍞鍗曟姤妫�'"
:visible.sync="declareDialogVisible" width="800px" @close="resetFormData">
<el-form ref="declareObj" :inline="true" :model="declareObj" :rules="declareObjRules" label-width="130px"
label-position="right">
@@ -139,6 +152,11 @@
<el-select v-model="declareObj.isExpire" prop="isExpire" :disabled="declareType !== 'add'" clearable
size="small">
<el-option :value="1" label="杩囨湡鐗╂枡"></el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item class="declareObj-form-item" label="閿�鍞鍗曞垎绫伙細" prop="orderType">
+ <el-select v-model="declareObj.orderType" clearable size="small">
+ <el-option v-for="(item,index) in orderTypeList" :value="item.dictValue" :label="item.dictLabel" :key="index"></el-option>
</el-select>
</el-form-item>
</el-form>
@@ -202,6 +220,9 @@
<el-row>
<el-col :span="12">
<el-checkbox v-model="pushToMes"><span style="font-weight: bold">鍚屾鍒癕ES</span></el-checkbox>
+<!-- <el-select v-model="splitOrderType" clearable size="mini" placeholder="璇烽�夋嫨閿�鍞鍗曞垎绫�">-->
+<!-- <el-option v-for="(item,index) in orderTypeList" :value="item.dictValue" :label="item.dictLabel" :key="index"></el-option>-->
+<!-- </el-select>-->
</el-col>
<el-col :span="12">
<div style="width:100%;text-align: right;margin-bottom:5px">
@@ -259,12 +280,15 @@
addIfsInventoryQuantity,
advancedGodown,
concessionRelease, delIfsInventory,
- getIfsByAll,
- getIfsByFinish,
getIfsOrder,
getWarehouseSubmit, inspectionReport, inspectionReportOne, rawAllExport,
revokeInspectionReport,downloadTemplate,confirmSplitOrder
} from '@/api/business/materialInspection'
+import {
+ getIfsByAll,
+ getIfsByFinish,
+} from '@/api/business/ifsOrderInspection'
+import { getDicts } from "@/api/system/dict/data";
import limsTable from "@/components/Table/lims-table.vue";
import {transformExcel} from '@/utils/file'
@@ -280,6 +304,15 @@
data() {
// 杩欓噷瀛樻斁鏁版嵁
return {
+ splitOrderType: null,
+ declareBatchObj:{
+ orderType:''
+ },
+ declareObjBatchRules:{
+ orderType: [
+ { required: true, message: '璇烽�夋嫨閿�鍞鍗曞垎绫�', trigger: 'change' }
+ ],
+ },
confirmSplitOrderLoading: false,
detailDataLoading: false,
pushToMes:false,//鏄惁鍚屾鍒癿es
@@ -434,6 +467,7 @@
}
},
{ label: '璁㈠崟鍙�', prop: 'orderNo' },
+ { label: '璁㈠崟鍒嗙被', prop: 'orderTypeName' },
{ label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'purQtyInStore',width:'160px' },
{ label: '鎶ユ鏃堕棿', prop: 'declareDate' },
{ label: '鎵瑰彿', prop: 'updateBatchNo' },
@@ -549,6 +583,7 @@
receiverDate: '', // 鎺ユ敹鏃堕棿
buyUnitMeas: '', // 鍗曚綅
isExpire: '', // 鍗曚綅
+ orderType: null, // 閿�鍞鍗曞垎绫�
},
componentData: { // 琛ㄦ牸鏁版嵁
updateBatchNo: null,
@@ -558,6 +593,7 @@
date: null,
entrustCode: '',
inspectStatus: '',
+ orderType: null,
},
declareDialogVisible1: false,
upLoad: false,
@@ -594,6 +630,9 @@
buyUnitMeas: [
{ required: false, message: '璇峰~鍐欏崟浣�', trigger: 'blur' }
],
+ orderType: [
+ { required: true, message: '璇烽�夋嫨閿�鍞鍗曞垎绫�', trigger: 'change' }
+ ],
},
tabList: [
{
@@ -628,13 +667,24 @@
],
outLoading: false,
upLoading: false,
+ orderTypeList: [],
}
},
mounted() {
this.refreshTable()
+ this.getOrderTypeList()
},
// 鏂规硶闆嗗悎
methods: {
+ getOrderTypeList(){
+ getDicts('inspection_type').then(res=>{
+ if(res.code === 200){
+ this.orderTypeList = res.data
+ }
+ }).catch(error=>{
+ console.error(error)
+ })
+ },
resetOrderSplitData(){
this.orderSplitBasicData = []
this.orderSplitDetailData = []
@@ -713,6 +763,9 @@
// 鍒囨崲tab琛ㄦ牸
handleTab(m) {
this.tabIndex = m;
+ if([0,1].includes(this.tabIndex)){
+ this.componentData.orderType = null
+ }
this.refreshTable()
},
// 鏌ヨ鍥炶皟
@@ -883,21 +936,28 @@
},
// 鎻愪氦鎵归噺鎶ユ
submitDeclareS() {
- let ids = []
- this.multipleSelection.forEach(item => {
- ids.push(item.id)
- })
- this.declareDialogSVisible = true
- inspectionReport({ ids: ids }).then(res => {
- if (res.code === 200) {
- this.declareDialogSVisible = false
- this.$message.success('鎶ユ鎴愬姛')
- this.refreshTable()
+ this.$refs.declareBatchObj.validate(valid=>{
+ if(valid){
+ let ids = []
+ this.multipleSelection.forEach(item => {
+ ids.push(item.id)
+ })
+ this.declareDialogSVisible = true
+ inspectionReport({
+ ids: ids,
+ orderType: this.declareBatchObj.orderType
+ }).then(res => {
+ if (res.code === 200) {
+ this.declareDialogSVisible = false
+ this.$message.success('鎶ユ鎴愬姛')
+ this.refreshTable()
+ }
+ this.submitDeclareLoading = false
+ }).catch(err => {
+ this.submitDeclareLoading = false
+ console.log(err)
+ })
}
- this.submitDeclareLoading = false
- }).catch(err => {
- this.submitDeclareLoading = false
- console.log(err)
})
},
// 鎵撳紑鎶ユ纭寮规
@@ -943,7 +1003,8 @@
if (valid) {
inspectionReportOne({
id: this.declareObj.id,
- updateBatchNo: this.declareObj.updateBatchNo
+ updateBatchNo: this.declareObj.updateBatchNo,
+ orderType: this.declareObj.orderType
}).then(res => {
if (res.code === 200) {
this.declareDialogVisible = false
@@ -961,8 +1022,12 @@
}
},
resetFormData() {
- this.$refs['declareObj'].resetFields();
+ this.$refs.declareObj.resetFields();
this.declareDialogVisible = false
+ },
+ resetBatchFormData() {
+ this.$refs.declareBatchObj.resetFields();
+ this.declareDialogSVisible = false
},
// 鎵撳紑鍒犻櫎寮规
deleteMaterial(row) {
@@ -1023,6 +1088,7 @@
receiverDate: '', // 鎺ユ敹鏃堕棿
buyUnitMeas: '', // 鍗曚綅
isExpire: '', // 鍗曚綅
+ orderType: null, // 閿�鍞鍗曞垎绫�
}
}
},
--
Gitblit v1.9.3