Browse Source

修改检验结果

wms3.0_pda
lijuncheng 1 year ago
parent
commit
b8dd9374db
  1. 3
      common/basic.js
  2. 67
      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'))) {
return target;
}
let cloneTarget = Array.isArray(target) ? [] : {};
// 克隆对象和数组
for (const key in target) {
cloneTarget[key] = this.deepCopyData(target[key]);
cloneTarget[key] = deepCopyData(target[key]);
}
return cloneTarget;

67
common/directory.js

@ -1,7 +1,5 @@
let jobStatusList = [];
let itemStatusList =[];
let itemStatusList = [];
let locationTypeList = [];
let uomList = [];
let inventoryStatusList = [];
@ -13,6 +11,7 @@ let unplannedIssueReasonList = [];
let unplannedIissueReason = [];
let scrapReasonList = [];
let inspectFailedReasonList = [];
let inspectResultList = [];
let nextActionList = [];
let inspectTypeList = [];
let sampleMethodList = [];
@ -21,6 +20,8 @@ let countStageList = [];
// 获取业务类型字典项
export function getBusinessTypeDesc(type) {
if (type == "SupplierDeliver") {
@ -36,24 +37,25 @@ export function getBusinessTypeDesc(type) {
//获取字典信息
export function clearCacheData() {
jobStatusList = [];
itemStatusList =[];
locationTypeList = [];
uomList = [];
inventoryStatusList = [];
containerTypeList = [];
packUnitList = [];
requestStatusList = [];
unplannedReceiptReasonList = [];
unplannedIssueReasonList=[];
unplannedIissueReason = [];
scrapReasonList = [];
inspectFailedReasonList = [];
nextActionList = [];
inspectTypeList = [];
sampleMethodList =[];
transferModeList = [];
countStageList =[];
jobStatusList = [];
itemStatusList = [];
locationTypeList = [];
uomList = [];
inventoryStatusList = [];
containerTypeList = [];
packUnitList = [];
requestStatusList = [];
unplannedReceiptReasonList = [];
unplannedIssueReasonList = [];
unplannedIissueReason = [];
scrapReasonList = [];
inspectFailedReasonList = [];
inspectResultList = [];
nextActionList = [];
inspectTypeList = [];
sampleMethodList = [];
transferModeList = [];
countStageList = [];
}
//获取字典信息
@ -375,6 +377,20 @@ export function getInspectFailedReasonList(value) {
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) {
if (nextActionList.length == 0) {
@ -455,12 +471,3 @@ export function getCountStageName(value) {
}
return resultInfo
}

2
pages/index/index.vue

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

34
pages/inspect/coms/inspectEdit.vue

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

Loading…
Cancel
Save