Browse Source

修改检验结果

wms3.0_pda
lijuncheng 1 year ago
parent
commit
b8dd9374db
  1. 3
      common/basic.js
  2. 29
      common/directory.js
  3. 2
      pages/index/index.vue
  4. 34
      pages/inspect/coms/inspectEdit.vue

3
common/basic.js

@ -1001,10 +1001,11 @@ export function deepCopyData(target) {
if (!(target !== null && (typeof target === 'object' || typeof target === 'function'))) { if (!(target !== null && (typeof target === 'object' || typeof target === 'function'))) {
return target; return target;
} }
let cloneTarget = Array.isArray(target) ? [] : {}; let cloneTarget = Array.isArray(target) ? [] : {};
// 克隆对象和数组 // 克隆对象和数组
for (const key in target) { for (const key in target) {
cloneTarget[key] = this.deepCopyData(target[key]); cloneTarget[key] = deepCopyData(target[key]);
} }
return cloneTarget; return cloneTarget;

29
common/directory.js

@ -1,5 +1,3 @@
let jobStatusList = []; let jobStatusList = [];
let itemStatusList = []; let itemStatusList = [];
let locationTypeList = []; let locationTypeList = [];
@ -13,6 +11,7 @@ let unplannedIssueReasonList = [];
let unplannedIissueReason = []; let unplannedIissueReason = [];
let scrapReasonList = []; let scrapReasonList = [];
let inspectFailedReasonList = []; let inspectFailedReasonList = [];
let inspectResultList = [];
let nextActionList = []; let nextActionList = [];
let inspectTypeList = []; let inspectTypeList = [];
let sampleMethodList = []; let sampleMethodList = [];
@ -21,6 +20,8 @@ let countStageList = [];
// 获取业务类型字典项 // 获取业务类型字典项
export function getBusinessTypeDesc(type) { export function getBusinessTypeDesc(type) {
if (type == "SupplierDeliver") { if (type == "SupplierDeliver") {
@ -49,6 +50,7 @@ export function clearCacheData() {
unplannedIissueReason = []; unplannedIissueReason = [];
scrapReasonList = []; scrapReasonList = [];
inspectFailedReasonList = []; inspectFailedReasonList = [];
inspectResultList = [];
nextActionList = []; nextActionList = [];
inspectTypeList = []; inspectTypeList = [];
sampleMethodList = []; sampleMethodList = [];
@ -375,6 +377,20 @@ export function getInspectFailedReasonList(value) {
return inspectFailedReasonList return inspectFailedReasonList
} }
//获取检验结果
export function getInspectResultList(value) {
if (inspectResultList.length == 0) {
inspectResultList = getDirectoryInfo("inspect_result")
}
inspectResultList.forEach(res => {
res.text = res.label;
res.value = res.value
})
return inspectResultList
}
//获取下一步动作 //获取下一步动作
export function getNextActionList(value) { export function getNextActionList(value) {
if (nextActionList.length == 0) { if (nextActionList.length == 0) {
@ -455,12 +471,3 @@ export function getCountStageName(value) {
} }
return resultInfo return resultInfo
} }

2
pages/index/index.vue

@ -319,7 +319,7 @@
"inventory_status", "container_type", "pack_unit", "unplanned_receipt_reason", "inventory_status", "container_type", "pack_unit", "unplanned_receipt_reason",
"unplanned_issue_reason", "scrap_reason", "inspect_failed_reason", "unplanned_issue_reason", "scrap_reason", "inspect_failed_reason",
"request_status", "inspect_type", "next_action", "sample_method", "transfer_mode", "request_status", "inspect_type", "next_action", "sample_method", "transfer_mode",
"count_stage" "count_stage","inspect_result"
] ]
} }
getDictionaryItem(params).then(res => { getDictionaryItem(params).then(res => {

34
pages/inspect/coms/inspectEdit.vue

@ -40,12 +40,12 @@
</view> </view>
</view> </view>
<view class="list_cell quality_cell"> <view class="list_cell uni-flex uni-row space-between">
<view class="title">检验结果</view> <view class="title">检验结果</view>
<view class="check_textarea"> <view class="info" style="padding: 0;">
<textarea placeholder="请输入内容" :inputBorder="true" v-model="dataContent.inspectResult" <uni-data-picker :class="disabled===true?'disabled':''" :border="false" placeholder="请选择检验结果"
:disabled="disabled" maxlength="100"> popup-title="检验结果" :localdata="inspectResultArray" v-model="dataContent.inspectResult">
</textarea> </uni-data-picker>
</view> </view>
</view> </view>
@ -64,7 +64,13 @@
<script> <script>
import { import {
getInspectFailedReasonList, getInspectFailedReasonList,
getInspectResultList
} from '@/common/directory.js'; } from '@/common/directory.js';
import {
deepCopyData
} from '@/common/basic.js';
import { import {
uploadFile, uploadFile,
getFileList, getFileList,
@ -87,7 +93,7 @@
failedReasonIndex: 0, failedReasonIndex: 0,
failedReasonArray: [], failedReasonArray: [],
dataContent: {}, dataContent: {},
failedReasonArray: [], inspectResultArray: [],
picInfoList: [] picInfoList: []
} }
}, },
@ -106,13 +112,14 @@
methods: { methods: {
openEditPopup(item) { openEditPopup(item) {
this.failedReasonArray = getInspectFailedReasonList(); this.failedReasonArray = getInspectFailedReasonList();
this.inspectResultArray =getInspectResultList()
// //
this.dataContent = Object.assign({}, item) this.dataContent = deepCopyData(item);
this.getFileList(); this.getFileList();
this.$refs['editPopup'].open("bottom"); this.$refs['editPopup'].open("bottom");
}, },
getFileList() { getFileList() {
getFileList("jobInspectDetail", this.dataContent.id).then(res => { getFileList("jobInspectDetail", this.dataContent.id).then(res => {
if(res.data){ if(res.data){
@ -191,7 +198,8 @@
}, },
back() { back() {
this.afterSave() this.$refs['editPopup'].close();
// this.afterSave()
}, },
maskClick() { maskClick() {
@ -221,11 +229,17 @@
return return
} }
if (failedQty > 0 || crackQty > 0) { if (failedQty > 0 || crackQty > 0) {
if (this.dataContent.failedReason == null) { if (this.dataContent.failedReason == null||this.dataContent.failedReason == "") {
this.showMessage("请选择不合格原因") this.showMessage("请选择不合格原因")
return return
} }
} }
if(this.dataContent.inspectResult == null||this.dataContent.inspectResult == ""){
this.showMessage("请选择检验结果")
return;
}
this.dataContent.failedQty = failedQty; this.dataContent.failedQty = failedQty;
this.dataContent.crackQty = crackQty this.dataContent.crackQty = crackQty
this.dataContent.goodQty = this.dataContent.handleQty - failedQty - crackQty this.dataContent.goodQty = this.dataContent.handleQty - failedQty - crackQty

Loading…
Cancel
Save