| | |
| | | <view class="bill-main-area"> |
| | | <!-- 主表页签 --> |
| | | <view class="bill-main-tabs"> |
| | | <view :class="mainTabSelected == 1 ? 'selected':''" @tap="mainTabSelected = 1">基本信息</view> |
| | | <view :class="mainTabSelected == 2 ? 'selected':''" @tap="mainTabSelected = 2">制单信息</view> |
| | | <view :class="mainTabSelected == 1 ? 'selected' : ''" @tap="mainTabSelected = 1">基本信息</view> |
| | | <view :class="mainTabSelected == 2 ? 'selected' : ''" @tap="mainTabSelected = 2">制单信息</view> |
| | | </view> |
| | | <!-- 主表内容 --> |
| | | <view class="bill-main-contents"> |
| | |
| | | <view class="left">日期</view> |
| | | <view class="right"> |
| | | <uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HDate"> |
| | | <view>{{hform.HDate}}</view> |
| | | <view>{{ hform.HDate }}</view> |
| | | </uni-datetime-picker> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="left">源单类型</view> |
| | | <view class="right" style="position: relative"> |
| | | <picker mode="selector" :range="HSourceBillTypeNameList" |
| | | @change="HSourceBillTypeNameChange"> |
| | | <input type="text" placeholder="请输入或扫描源单号" v-model="HSourceBillType" /> |
| | | <view class="picker-overlay"></view> |
| | | </picker> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="left">源单单号</view> |
| | | <view class="right"> |
| | | <input type="text" placeholder="请输入或扫描源单号" v-model="hform.HSourceBillNo" |
| | | @confirm="getSourceBillInfo(hform.HSourceBillNo)" /> |
| | | </view> |
| | | <view class="icon-wrapper-big"> |
| | | <uni-icons class="right-icon" type="scan" style=" |
| | | background-color: #3a78ff; |
| | | padding: 6rpx; |
| | | color: #fff; |
| | | border-radius: 100%; |
| | | " size="20" @click="toScanCode"></uni-icons> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | |
| | | v-model="hform.HShiftsName" @update:modelValue="HWorkShiftChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <!-- <view class="form-item"> |
| | | <view class="left"></view> |
| | | <view class="right"> |
| | | <input type="text"></view> |
| | | </view> --> |
| | | <view class="form-item"> |
| | | <view class="left">任务单号</view> |
| | | <view class="right disabled"> |
| | |
| | | <view class="right none-border"> |
| | | <radio-group @changer="checkResultChange"> |
| | | <label> |
| | | <radio value="0" :checked="judgeConclusion" /><text></text> |
| | | <radio value="0" :checked="hform.HLastResult" /><text></text> |
| | | 合格 |
| | | </label> |
| | | <view style="width: 20rpx;display: inline-block;"></view> |
| | | <view style="width: 20rpx; display: inline-block"></view> |
| | | <label> |
| | | <radio value="1" :checked="!judgeConclusion" /><text></text> |
| | | <radio value="1" :checked="!hform.HLastResult" /><text></text> |
| | | 不合格 |
| | | </label> |
| | | </radio-group> |
| | |
| | | <view class="bill-sub-area"> |
| | | <!-- 子表页签 --> |
| | | <view class="bill-sub-tabs"> |
| | | <view v-for="subTab in subTabs" :key="subTab.id" :class="subTab.id == subTabSelected ? 'selected':''" |
| | | @tap="subTabSelected = subTab.id">{{subTab.name}}</view> |
| | | <view v-for="subTab in subTabs" :key="subTab.id" :class="subTab.id == subTabSelected ? 'selected' : ''" |
| | | @tap="subTabSelected = subTab.id">{{ subTab.name }}</view> |
| | | </view> |
| | | <!-- 子表内容 --> |
| | | <view class="bill-main-contents"> |
| | |
| | | <view v-if="subTabSelected == 1"> |
| | | <!-- 需通过显式调用忽略$event参数 --> |
| | | <view class="buttons" @tap="addCheckItem()"> |
| | | <uni-icons type="plus" style="margin-right: 10rpx;" size="22"></uni-icons>新增 |
| | | <uni-icons type="plus" style="margin-right: 10rpx" size="22"></uni-icons>新增 |
| | | </view> |
| | | <view class="over" v-if="!checkItems || getObjLength(checkItems) == 0">暂无数据</view> |
| | | <view class="list" v-else> |
| | | <uni-card v-for="checkItem in checkItems" :key="checkItem.num"> |
| | | <view class="card-detail"> |
| | | <view class="detail"> |
| | | <text>序号:</text>{{checkItem.num}} |
| | | </view> |
| | | <view class="detail"> <text>序号:</text>{{ checkItem.num }} </view> |
| | | <view class="detail editable"> |
| | | <view style="flex-shrink: 0;"><text>检验项目:</text></view> |
| | | <view style="flex-shrink: 0"><text>检验项目:</text></view> |
| | | <input type="text" :value="checkItem.HQCCheckItemName" disabled="" /> |
| | | <view class="icon-wrapper"><uni-icons type="search" size="16" |
| | | @click="showSelectorModule(checkItem, 2)"></uni-icons></view> |
| | | </view> |
| | | <view class="detail editable"> |
| | | <view style="flex-shrink: 0;"><text>检验仪器:</text></view> |
| | | <view style="flex-shrink: 0"><text>检验仪器:</text></view> |
| | | <input type="text" :value="checkItem.HInspectInstruMentName" disabled="" /> |
| | | <view class="icon-wrapper"><uni-icons type="search" size="16" |
| | | @click="showSelectorModule(checkItem, 3)"></uni-icons></view> |
| | | </view> |
| | | <view class="detail editable"> |
| | | <view><text>结论:</text></view> |
| | | <view style="width: 4em; "> |
| | | {{ checkItem.HResult == 1?"合格":"不合格" }} |
| | | <view style="width: 4em"> |
| | | {{ checkItem.HResult == 1 ? "合格" : "不合格" }} |
| | | </view> |
| | | <view> |
| | | <switch style="width: 2em; transform:scale(0.7);" |
| | | <switch style="width: 2em; transform: scale(0.7)" |
| | | :checked="checkItem.HResult == 1" |
| | | @change="HResultChange(checkItem.num, $event)" /> |
| | | </view> |
| | | </view> |
| | | <view class="detail editable" style="position: relative;"> |
| | | <view style="flex-shrink: 0;"><text>分析方法:</text></view> |
| | | <view class="detail editable" style="position: relative"> |
| | | <view style="flex-shrink: 0"><text>分析方法:</text></view> |
| | | <picker :range="arrayAnalysisMethod" range-key="name" |
| | | @change="HAnalysisMethodChange(checkItem.num, $event)"> |
| | | <input disabled :value="getAnalysisMethodDisplay(checkItem.HAnalysisMethod)" |
| | |
| | | </picker> |
| | | </view> |
| | | <view class="detail editable"> |
| | | <view style="flex-shrink: 0;"><text>重点检查:</text></view> |
| | | <view style="flex-shrink: 0"><text>重点检查:</text></view> |
| | | <view> |
| | | <switch type="checkbox" style="transform:scale(0.7);" |
| | | <switch type="checkbox" style="transform: scale(0.7)" |
| | | :checked="checkItem.HKeyInspect" |
| | | @change="HKeyInspectChange(checkItem, $event)" /> |
| | | </view> |
| | | </view> |
| | | <view class="detail" v-if="checkItem.HQCStd"> |
| | | <text>检验标准:</text>{{checkItem.HQCStd}} |
| | | <text>检验标准:</text>{{ checkItem.HQCStd }} |
| | | </view> |
| | | <view class="detail" v-if="checkItem.HUnit"> |
| | | <text>单位:</text>{{checkItem.HUnit}} |
| | | <text>单位:</text>{{ checkItem.HUnit }} |
| | | </view> |
| | | <view class="detail" v-if="checkItem.HQCStd"> |
| | | <text>检验值:</text>{{checkItem.HQCStd}} |
| | | <text>检验值:</text>{{ checkItem.HQCStd }} |
| | | </view> |
| | | <view class="detail" v-if="checkItem.HQCNote"> |
| | | <text>检验记录:</text>{{checkItem.HQCNote}} |
| | | <text>检验记录:</text>{{ checkItem.HQCNote }} |
| | | </view> |
| | | <view class="detail" v-if="checkItem.HTargetVal"> |
| | | <text>目标值:</text>{{checkItem.HTargetVal}} |
| | | <text>目标值:</text>{{ checkItem.HTargetVal }} |
| | | </view> |
| | | <view class="detail" v-if="checkItem.HUpLimit"> |
| | | <text>上限值:</text>{{checkItem.HUpLimit}} |
| | | <text>上限值:</text>{{ checkItem.HUpLimit }} |
| | | </view> |
| | | <view class="detail" v-if="checkItem.HDownLimit"> |
| | | <text>下限值:</text>{{checkItem.HDownLimit}} |
| | | <text>下限值:</text>{{ checkItem.HDownLimit }} |
| | | </view> |
| | | <view class="detail" v-if="checkItem.HMax"> |
| | | <text>最大值:</text>{{checkItem.HMax}} |
| | | <text>最大值:</text>{{ checkItem.HMax }} |
| | | </view> |
| | | <view class="detail" v-if="checkItem.HMin"> |
| | | <text>最小值:</text>{{checkItem.HMin}} |
| | | <text>最小值:</text>{{ checkItem.HMin }} |
| | | </view> |
| | | <view class="detail" v-if="checkItem.HAvg"> |
| | | <text>平均值:</text>{{checkItem.HAvg}} |
| | | <text>平均值:</text>{{ checkItem.HAvg }} |
| | | </view> |
| | | </view> |
| | | <view style="height: 20rpx;"></view> |
| | | <view style="height: 20rpx"></view> |
| | | <view class="more"> |
| | | <view class="part" style="color: #da0000;" @tap.stop="removeCheckItem(checkItem)"> |
| | | <uni-icons type="trash" style="color: #da0000;margin-right: 10rpx;" |
| | | <view class="part" style="color: #da0000" @tap.stop="removeCheckItem(checkItem)"> |
| | | <uni-icons type="trash" style="color: #da0000; margin-right: 10rpx" |
| | | size="18"></uni-icons>删除 |
| | | </view> |
| | | </view> |
| | |
| | | <view class="list" v-else> |
| | | <uni-card v-for="SamplingItem in checkItems" :key="SamplingItem.num"> |
| | | <view class="card-detail"> |
| | | <view class="detail"> |
| | | <text>序号:</text>{{SamplingItem.num}} |
| | | </view> |
| | | <view class="detail"> <text>序号:</text>{{ SamplingItem.num }} </view> |
| | | <view class="detail editable"> |
| | | <text>检验项目:</text>{{SamplingItem.HQCCheckItemName}} |
| | | <text>检验项目:</text>{{ SamplingItem.HQCCheckItemName }} |
| | | </view> |
| | | <view style="width: 100%; height: 1px; border-bottom: 1px solid #e3e3e3;"></view> |
| | | <view class="detail editable" style="width: 100%;"> |
| | | <view style="flex-shrink: 0;"><text>抽样方案:</text></view> |
| | | <view style="width: 100%; height: 1px; border-bottom: 1px solid #e3e3e3"></view> |
| | | <view class="detail editable" style="width: 100%"> |
| | | <view style="flex-shrink: 0"><text>抽样方案:</text></view> |
| | | <input type="text" :value="SamplingItem.HSampleSchemeName" disabled /> |
| | | <view class="icon-wrapper"><uni-icons type="search" size="16" |
| | | @click="showSelectorModule(SamplingItem, 1)"></uni-icons></view> |
| | | </view> |
| | | <view class="detail editable"> |
| | | <text>抽样类型:</text>{{SamplingItem.HSamplingType}} |
| | | <text>抽样类型:</text>{{ SamplingItem.HSamplingType }} |
| | | </view> |
| | | <view class="detail editable"> |
| | | <text>检验水平:</text>{{SamplingItem.HInspectionLevel}} |
| | | <text>检验水平:</text>{{ SamplingItem.HInspectionLevel }} |
| | | </view> |
| | | <view class="detail editable"> |
| | | <text>严格度:</text>{{SamplingItem.HStrictness}} |
| | | <text>严格度:</text>{{ SamplingItem.HStrictness }} |
| | | </view> |
| | | <view class="detail editable"> |
| | | <text>AQL:</text>{{SamplingItem.HAQL}} |
| | | <text>AQL:</text>{{ SamplingItem.HAQL }} |
| | | </view> |
| | | <view style="width: 100%; height: 1px; border-bottom: 1px solid #e3e3e3;"></view> |
| | | <view style="width: 100%; height: 1px; border-bottom: 1px solid #e3e3e3"></view> |
| | | <view class="detail editable"> |
| | | <text>样本量:</text>{{SamplingItem.HSampleQty}} |
| | | <text>样本量:</text>{{ SamplingItem.HSampleQty }} |
| | | </view> |
| | | <view class="detail editable"> |
| | | <text>允许数:</text>{{SamplingItem.HAcceptQty}} |
| | | <text>允许数:</text>{{ SamplingItem.HAcceptQty }} |
| | | </view> |
| | | <view class="detail editable"> |
| | | <text>拒绝数:</text>{{SamplingItem.HRejectQty}} |
| | | <text>拒绝数:</text>{{ SamplingItem.HRejectQty }} |
| | | </view> |
| | | <view class="detail editable"> |
| | | <text>样本不合格数:</text>{{SamplingItem.HSampleUnRightQty}} |
| | | <text>样本不合格数:</text>{{ SamplingItem.HSampleUnRightQty }} |
| | | </view> |
| | | <view class="detail editable"> |
| | | <text>样本破坏数:</text>{{SamplingItem.HSampleDamageQty}} |
| | | <text>样本破坏数:</text>{{ SamplingItem.HSampleDamageQty }} |
| | | </view> |
| | | <view class="detail editable"> |
| | | <text>检验结果:</text>{{SamplingItem.HInspectResultToSee}} |
| | | <text>检验结果:</text> |
| | | <view style="border-radius: 15%; padding: 0 10rpx" :class=" |
| | | SamplingItem.HInspectResultToSee == '合格' |
| | | ? 'pass-background' |
| | | : SamplingItem.HInspectResultToSee == '不合格' |
| | | ? 'unpass-background' |
| | | : '' |
| | | "> |
| | | {{ SamplingItem.HInspectResultToSee }} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | |
| | | <view v-else v-for="item in InspectModules" :key="item.id"> |
| | | <view v-if="subTabSelected == item.id"> |
| | | <InspectValueTemplateVue ref="InspectValueModules" :bind-key="item.id" |
| | | :bind-data="{data: checkItems[item.checkItemId], list: InspectValues[item.checkItemId]}"> |
| | | @syncCheckData="InspectValueComplete" :bind-data="{ |
| | | data: checkItems[item.checkItemId], |
| | | list: InspectValues[item.checkItemId], |
| | | }"> |
| | | </InspectValueTemplateVue> |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | </view> |
| | | <view style="height: 120rpx;"></view> |
| | | <view style="height: 120rpx"></view> |
| | | <view class="bottom-btn"> |
| | | <button class="btn-a" size="mini" @tap="submit">提交</button> |
| | | <view style="flex: 1;"></view> |
| | | <view style="flex: 1"></view> |
| | | <button class="btn-a" size="mini" @tap="addNew">新增</button> |
| | | <button class="btn-c" size="mini" @tap="goBack">退出</button> |
| | | </view> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import dayjs from 'dayjs' |
| | | import dayjs from "dayjs"; |
| | | import { |
| | | CommonUtils |
| | | } from '../../../utils/common' |
| | | import InspectValueTemplateVue from '@/components/ZLGL/InspectValueTemplate.vue' |
| | | import SampleSchemePopupVue from '@/components/ZLGL/SampleSchemePopup.vue' |
| | | import CheckItemPopupVue from '@/components/ZLGL/CheckItemPopup.vue' |
| | | import InspectMentPopupVue from '../../../components/ZLGL/InspectMentPopup.vue' |
| | | import MaterialPopupVue from '../../../components/ZLGL/MaterialPopup.vue' |
| | | import ICMOBillPopupVue from '../../../components/ZLGL/ICMOBillPopup.vue' |
| | | import ProcExchBillPopupVue from '../../../components/ZLGL/ProcExchBillPopup.vue' |
| | | import ProcessPopupVue from '../../../components/ZLGL/ProcessPopup.vue' |
| | | import CheckProjectPopupVue from '../../../components/ZLGL/CheckProjectPopup.vue' |
| | | } from "../../../utils/common"; |
| | | import InspectValueTemplateVue from "@/components/ZLGL/InspectValueTemplate.vue"; |
| | | import SampleSchemePopupVue from "@/components/ZLGL/SampleSchemePopup.vue"; |
| | | import CheckItemPopupVue from "@/components/ZLGL/CheckItemPopup.vue"; |
| | | import InspectMentPopupVue from "../../../components/ZLGL/InspectMentPopup.vue"; |
| | | import MaterialPopupVue from "../../../components/ZLGL/MaterialPopup.vue"; |
| | | import ICMOBillPopupVue from "../../../components/ZLGL/ICMOBillPopup.vue"; |
| | | import ProcExchBillPopupVue from "../../../components/ZLGL/ProcExchBillPopup.vue"; |
| | | import ProcessPopupVue from "../../../components/ZLGL/ProcessPopup.vue"; |
| | | import CheckProjectPopupVue from "../../../components/ZLGL/CheckProjectPopup.vue"; |
| | | import { |
| | | getUserInfo |
| | | } from '../../../utils/auth' |
| | | } from "../../../utils/auth"; |
| | | import { |
| | | MpaasScan |
| | | } from "../../../utils/mpaasScan"; |
| | | export default { |
| | | components: { |
| | | InspectValueTemplateVue, |
| | |
| | | ICMOBillPopupVue, |
| | | ProcExchBillPopupVue, |
| | | ProcessPopupVue, |
| | | CheckProjectPopupVue |
| | | CheckProjectPopupVue, |
| | | }, |
| | | computed: { |
| | | judgeConclusion: { |
| | | get() { |
| | | return true |
| | | } |
| | | } |
| | | return true; |
| | | }, |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | subTabSelected: 1, |
| | | |
| | | // 控制当前显示的弹窗模块 |
| | | enablePopupModule: '', |
| | | PopupModuleNameList: ["", "SampleScheme", "CheckItem", |
| | | "InspectMent", "Material", "ICMOBill", "ProcExchBill", "QCScheme", "Process" |
| | | enablePopupModule: "", |
| | | PopupModuleNameList: [ |
| | | "", |
| | | "SampleScheme", |
| | | "CheckItem", |
| | | "InspectMent", |
| | | "Material", |
| | | "ICMOBill", |
| | | "ProcExchBill", |
| | | "QCScheme", |
| | | "Process", |
| | | ], |
| | | // 当前操作的检验单ID缓存 |
| | | currentChechItemIDCache: -1, |
| | |
| | | |
| | | // 检验方案 |
| | | arrayAnalysisMethod: [{ |
| | | value: 1, |
| | | name: '定性分析' |
| | | }, { |
| | | value: 2, |
| | | name: '定量分析' |
| | | }, { |
| | | value: 3, |
| | | name: '其他分析' |
| | | }], |
| | | value: 1, |
| | | name: "定性分析", |
| | | }, |
| | | { |
| | | value: 2, |
| | | name: "定量分析", |
| | | }, |
| | | { |
| | | value: 3, |
| | | name: "其他分析", |
| | | }, |
| | | ], |
| | | ArrayAnalysisMethodValue: [1, 2, 3], |
| | | // 子表 页签信息 |
| | | subTabs: { |
| | | "1": { |
| | | 1: { |
| | | id: "1", |
| | | name: "检验项目" |
| | | name: "检验项目", |
| | | }, |
| | | "2": { |
| | | 2: { |
| | | id: "2", |
| | | name: "抽样检验" |
| | | } |
| | | name: "抽样检验", |
| | | }, |
| | | }, |
| | | |
| | | // 源单类型 |
| | | HSourceBillType: "工序进站接收单", |
| | | HSourceBillTypeValueList: ["3790", "3793", "3710", "3772"], |
| | | HSourceBillTypeNameList: [ |
| | | "工序进站接收单", |
| | | "工序委外接收单", |
| | | "生产订单", |
| | | "工序流转卡", |
| | | ], |
| | | // 主表属性 |
| | | hform: { |
| | | "HBillNo": "", |
| | | "HInterID": "0", |
| | | "HDate": dayjs(new Date()).format("YYYY-MM-DD"), |
| | | "HSourceName": "", |
| | | "HSourceID": "0", |
| | | "HShiftsName": "", |
| | | "HShiftsID": "0", |
| | | "HICMOBillNo": "", |
| | | "HICMOInterID": "0", |
| | | "HICMOEntryID": "1", |
| | | "HICMOQty": "0", |
| | | "HProcExchBillNo": "", |
| | | "HProcExchInterID": "0", |
| | | "HProcExchEntryID": "0", |
| | | "HProcExchQty": "0", |
| | | "HMaterNumber": "", |
| | | "HMaterID": "0", |
| | | "HMaterName": "", |
| | | "HFirstCheckEmpName": "", |
| | | "HFirstCheckEmp": 0, |
| | | "HQCSchemeName": "", |
| | | "HQCSchemeID": "0", |
| | | "HBatchNo": "", |
| | | "HLastResult": true, // 默认合格 |
| | | "HProcName": "", |
| | | "HProcID": "0", |
| | | "HTakeSampleCheckBillNo": "", // 取样单 |
| | | "HTakeSampleCheckBillID": "0", |
| | | "HRemark": "", |
| | | "HErrTreatment": "", // 异常临时处理方案 |
| | | "HMaker": getUserInfo()["Czymc"] || "", |
| | | "HChecker": "", |
| | | "HCloseMan": "", |
| | | "HMakeDate": dayjs(new Date()).format("YYYY-MM-DDTHH:mm:ss"), |
| | | "HCheckDate": "", |
| | | "HCloseDate": "", |
| | | "HUpDater": "", |
| | | "HDeleteMan": "", |
| | | "HUpDateDate": "", |
| | | "HDeleteDate": "", |
| | | "HResult": "", |
| | | "HAnalysisMethod": "", |
| | | HSourceBillType: "3790", |
| | | HSourceBillNo: "", |
| | | HBillNo: "", |
| | | HInterID: "0", |
| | | HDate: dayjs(new Date()).format("YYYY-MM-DD"), |
| | | HSourceName: "", |
| | | HSourceID: "0", |
| | | HShiftsName: "", |
| | | HShiftsID: "0", |
| | | HICMOBillNo: "", |
| | | HICMOInterID: "0", |
| | | HICMOEntryID: "1", |
| | | HICMOQty: "0", |
| | | HProcExchBillNo: "", |
| | | HProcExchInterID: "0", |
| | | HProcExchEntryID: "0", |
| | | HProcExchQty: "0", |
| | | HMaterNumber: "", |
| | | HMaterID: "0", |
| | | HMaterName: "", |
| | | HFirstCheckEmpName: "", |
| | | HFirstCheckEmp: 0, |
| | | HQCSchemeName: "", |
| | | HQCSchemeID: "0", |
| | | HBatchNo: "", |
| | | HLastResult: true, // 默认合格 |
| | | HProcName: "", |
| | | HProcID: "0", |
| | | HTakeSampleCheckBillNo: "", // 取样单 |
| | | HTakeSampleCheckBillID: "0", |
| | | HRemark: "", |
| | | HErrTreatment: "", // 异常临时处理方案 |
| | | HMaker: getUserInfo()["Czymc"] || "", |
| | | HChecker: "", |
| | | HCloseMan: "", |
| | | HMakeDate: dayjs(new Date()).format("YYYY-MM-DDTHH:mm:ss"), |
| | | HCheckDate: "", |
| | | HCloseDate: "", |
| | | HUpDater: "", |
| | | HDeleteMan: "", |
| | | HUpDateDate: "", |
| | | HDeleteDate: "", |
| | | HResult: "", |
| | | HAnalysisMethod: "", |
| | | |
| | | "HResDec": "", |
| | | "HStatus": "", |
| | | HResDec: "", |
| | | HStatus: "", |
| | | |
| | | "HMainSourceBillType": "", |
| | | "HMainSourceInterID": "0", |
| | | "HMainSourceEntryID": "1", |
| | | "HMainSourceBillNo": "" |
| | | HMainSourceBillType: "", |
| | | HMainSourceInterID: "0", |
| | | HMainSourceEntryID: "1", |
| | | HMainSourceBillNo: "", |
| | | }, |
| | | // 检验项目和抽样检验 值 |
| | | checkItems: { |
| | | |
| | | }, |
| | | checkItems: {}, |
| | | // 检测值模块 |
| | | InspectModules: { |
| | | |
| | | }, |
| | | InspectModules: {}, |
| | | // 检测值 |
| | | InspectValues: { |
| | | |
| | | } |
| | | } |
| | | InspectValues: {}, |
| | | }; |
| | | }, |
| | | methods: { |
| | | // 源单类型选择 |
| | | HSourceBillTypeNameChange(e) { |
| | | this.HSourceBillType = this.HSourceBillTypeNameList[e.detail.value]; |
| | | this.hform.HSourceBillType = this.HSourceBillTypeValueList[e.detail.value]; |
| | | }, |
| | | toScanCode() { |
| | | MpaasScan.scanCode((res) => { |
| | | if (res) { |
| | | this.getSourceBillInfo(HBarCode); |
| | | } |
| | | }); |
| | | }, |
| | | async getSourceBillInfo(HBarCode) { |
| | | console.log('HBarCode: ',HBarCode); |
| | | // 根据单据类型,调用不同的下推函数 |
| | | if (this.hform.HSourceBillType == 3790) { |
| | | // 工序进站接收单列表首检 |
| | | await this.LoadingInformation_StationInBill(HBarCode); |
| | | if ( |
| | | (uni.getStorageSync("OrganizationID") == "7667152" && |
| | | uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") || |
| | | (uni.getStorageSync("OrganizationID") == "100199" && |
| | | uni.getStorageSync("Organization") == "杭州斯莫尔磁性材料有限公司") |
| | | ) { |
| | | await this.GetCheckItemID(); // 客户为斯莫尔,进入按照质检方案表头上的物料绑定带出默认方案 |
| | | } |
| | | return; |
| | | } |
| | | if (this.hform.HSourceBillType == 3793) { |
| | | // 工序委外接收单列表首检 |
| | | await this.LoadingInformation_StationEntrustOutBill(HBarCode); |
| | | if ( |
| | | (uni.getStorageSync("OrganizationID") == "7667152" && |
| | | uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") || |
| | | (uni.getStorageSync("OrganizationID") == "100199" && |
| | | uni.getStorageSync("Organization") == "杭州斯莫尔磁性材料有限公司") |
| | | ) { |
| | | await this.GetCheckItemID(); // 客户为斯莫尔,进入按照质检方案表头上的物料绑定带出默认方案 |
| | | } |
| | | return; |
| | | } |
| | | if (this.hform.HSourceBillType == 3710) { |
| | | // 生产订单列表首检 |
| | | await this.LoadingInformation_ICMO(HBarCode); |
| | | if ( |
| | | (uni.getStorageSync("OrganizationID") == "7667152" && |
| | | uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") || |
| | | (uni.getStorageSync("OrganizationID") == "100199" && |
| | | uni.getStorageSync("Organization") == "杭州斯莫尔磁性材料有限公司") |
| | | ) { |
| | | await this.GetCheckItemID(); // 客户为斯莫尔,进入按照质检方案表头上的物料绑定带出默认方案 |
| | | } |
| | | return; |
| | | } |
| | | if (this.hform.HSourceBillType == 3772) { |
| | | // 工序流转卡列表首检 |
| | | await this.LoadingInformation_ProcExchange(HBarCode); |
| | | if ( |
| | | (uni.getStorageSync("OrganizationID") == "7667152" && |
| | | uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") || |
| | | (uni.getStorageSync("OrganizationID") == "100199" && |
| | | uni.getStorageSync("Organization") == "杭州斯莫尔磁性材料有限公司") |
| | | ) { |
| | | await this.GetCheckItemID(); // 客户为斯莫尔,进入按照质检方案表头上的物料绑定带出默认方案 |
| | | } |
| | | return; |
| | | } |
| | | }, |
| | | async GetCheckItemID() { |
| | | if (!this.hform.HMaterName && !this.hform.HProcName) { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/Web/GetCheckItemID", |
| | | data: { |
| | | HName: this.hform.HMaterName, |
| | | HProName: this.hform.HProcName, |
| | | HSourceID: this.hform.HSourceID, |
| | | }, |
| | | }); |
| | | |
| | | let { |
| | | count, |
| | | Message, |
| | | data |
| | | } = res.data; |
| | | |
| | | if (count != 1) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: `获取检验方案 错误: ${Message}`, |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | this.hform.HQCSchemeName = data[0].检验方案名称; |
| | | this.hform.HQCSchemeID = data[0].hmainid; |
| | | |
| | | this.get_CheckItem(); |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: `获取检验方案 错误: ${err}`, |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | async LoadingInformation_ProcExchange(HBarCode) { |
| | | // 工序流转卡 |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/CheckBill/get_ProcessExchangeBill_ByBillNo", |
| | | data: { |
| | | HBillNo: HBarCode, |
| | | user: getUserInfo()["Czymc"], |
| | | }, |
| | | }); |
| | | |
| | | let { |
| | | count, |
| | | Message, |
| | | data |
| | | } = res.data; |
| | | |
| | | if (count != 1) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: `获取工序流转卡 错误: ${Message}`, |
| | | }); |
| | | return; |
| | | } |
| | | this.hform.HProcExchBillNo = data[0].流转卡号; |
| | | this.hform.HProcExchInterID = data[0].HProcExchInterID; |
| | | this.hform.HProcExchEntryID = data[0].HProcExchEntryID || 0; |
| | | this.hform.HProcExchQty = data[0].流转卡数量; |
| | | this.hform.HICMOBillNo = data[0].任务单; |
| | | this.hform.HICMOInterID = data[0].HICMOInterID; |
| | | this.hform.HICMOQty = data[0].HICMOQty || 0; |
| | | this.hform.HSourceName = data[0].生产资源; |
| | | this.hform.HSourceID = data[0].HSourceID || 0; |
| | | this.hform.HMaterID = data[0].HMaterID; |
| | | this.hform.HMaterName = data[0].产品名称; |
| | | this.hform.HMainSourceBillNo = data[0].单据号; |
| | | this.hform.HMainSourceBillType = data[0].HBillType; |
| | | this.hform.HMainSourceInterID = data[0].HInterID; |
| | | this.hform.HICMOEntryID = data[0].HICMOEntryID || 0; |
| | | this.hform.HQCSchemeName = data[0].检验方案名称; |
| | | this.hform.HQCSchemeID = data[0].检验方案ID; |
| | | this.hform.HProcName = data[0].当前工序; |
| | | this.hform.HBatchNo = data[0].批号; |
| | | this.get_CheckItem(); |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: `获取工序流转卡 错误: ${err}`, |
| | | }); |
| | | } |
| | | }, |
| | | async LoadingInformation_ICMO(HBarCode) { |
| | | // 生产订单 |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/QC_FirstPieceCheckBill/get_ICMOBill_ByBillNo", |
| | | data: { |
| | | HBillNo: HBarCode, |
| | | user: getUserInfo()["Czymc"], |
| | | }, |
| | | }); |
| | | |
| | | let { |
| | | count, |
| | | Message, |
| | | data |
| | | } = res.data; |
| | | |
| | | if (count != 1) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: `获取生产订单 错误: ${Message}`, |
| | | }); |
| | | return; |
| | | } |
| | | this.hform.HProcExchBillNo = data[0].流转卡号; |
| | | this.hform.HProcExchInterID = data[0].HProcExchInterID; |
| | | this.hform.HProcExchEntryID = data[0].HProcExchEntryID; |
| | | this.hform.HProcExchQty = data[0].流转卡数量; |
| | | this.hform.HICMOBillNo = data[0].任务单; |
| | | this.hform.HICMOInterID = data[0].HICMOInterID; |
| | | this.hform.HICMOQty = data[0].HICMOQty; |
| | | this.hform.HSourceName = data[0].生产资源; |
| | | this.hform.HSourceID = data[0].HSourceID; |
| | | this.hform.HMaterID = data[0].HMaterID; |
| | | this.hform.HMaterName = data[0].产品名称; |
| | | this.hform.HMainSourceBillNo = data[0].单据号; |
| | | this.hform.HMainSourceBillType = data[0].HBillType; |
| | | this.hform.HMainSourceInterID = data[0].HInterID; |
| | | this.hform.HICMOEntryID = data[0].HICMOEntryID; |
| | | this.hform.HQCSchemeName = data[0].检验方案名称; |
| | | this.hform.HQCSchemeID = data[0].检验方案ID; |
| | | this.hform.HProcName = data[0].当前工序; |
| | | |
| | | this.get_CheckItem(); |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: `获取生产订单 错误: ${err}`, |
| | | }); |
| | | } |
| | | }, |
| | | async LoadingInformation_StationEntrustOutBill(HBarCode) { |
| | | // 工序委外接收单 |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/Cj_StationEntrustOutBill/list", |
| | | data: { |
| | | sWhere: ` and HBillNo = '${HBarCode}'`, |
| | | }, |
| | | }); |
| | | |
| | | let { |
| | | count, |
| | | Message, |
| | | data |
| | | } = res.data; |
| | | |
| | | if (count != 1) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: `获取工序委外接收单 错误: ${Message}`, |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | HProcExchBillNo = data[0].流转卡号; |
| | | HProcExchInterID = data[0].HProcExchInterID; |
| | | HProcExchEntryID = data[0].HProcExchEntryID; |
| | | HProcExchQty = data[0].流转卡数量; |
| | | HICMOBillNo = data[0].生产订单号; |
| | | HICMOInterID = data[0].HICMOInterID; |
| | | HICMOQty = data[0].HICMOQty; |
| | | HSourceName = data[0].生产资源; |
| | | HSourceID = data[0].HSourceID; |
| | | HMaterID = data[0].HMaterID; |
| | | HMaterName = data[0].产品名称; |
| | | HMainSourceBillNo = data[0].单据号; |
| | | HMainSourceBillType = data[0].HBillType; |
| | | HMainSourceInterID = data[0].HInterID; |
| | | HICMOEntryID = data[0].HICMOEntryID; |
| | | |
| | | this.get_CheckItem(); |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: `获取工序委外接收单 错误: ${err}`, |
| | | }); |
| | | } |
| | | }, |
| | | async LoadingInformation_StationInBill(HBarCode) { |
| | | // 进站接收单 |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/QC_FirstPieceCheckBill/get_StationInBill_ByHBillNo", |
| | | data: { |
| | | HBillNo: HBarCode, |
| | | user: getUserInfo()["Czymc"], |
| | | }, |
| | | }); |
| | | |
| | | let { |
| | | count, |
| | | Message, |
| | | data |
| | | } = res.data; |
| | | |
| | | if (count != 1) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: `获取进站接收单 错误: ${Message}`, |
| | | }); |
| | | return; |
| | | } |
| | | this.hform.HProcExchBillNo = data[0].流转卡号; |
| | | this.hform.HProcExchInterID = data[0].HProcExchInterID; |
| | | this.hform.HProcExchEntryID = data[0].HProcExchEntryID; |
| | | this.hform.HProcExchQty = data[0].流转卡数量; |
| | | this.hform.HICMOBillNo = data[0].任务单; |
| | | this.hform.HICMOInterID = data[0].HICMOInterID; |
| | | this.hform.HICMOQty = data[0].HICMOQty; |
| | | this.hform.HSourceName = data[0].生产资源; |
| | | this.hform.HSourceID = data[0].HSourceID; |
| | | this.hform.HMaterID = data[0].HMaterID; |
| | | this.hform.HMaterName = data[0].产品名称; |
| | | this.hform.HMainSourceBillNo = data[0].单据号; |
| | | this.hform.HMainSourceBillType = data[0].HBillType; |
| | | this.hform.HMainSourceInterID = data[0].HInterID; |
| | | this.hform.HICMOEntryID = data[0].HICMOEntryID; |
| | | this.hform.HQCSchemeName = data[0].检验方案名称; |
| | | this.hform.HQCSchemeID = data[0].检验方案ID; |
| | | this.hform.HProcName = data[0].当前工序; |
| | | |
| | | this.get_CheckItem(); |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: `获取进站接收单 错误: ${err}`, |
| | | }); |
| | | } |
| | | }, |
| | | // 检验员初始化 |
| | | async InitHEmp() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_Employee/list', |
| | | url: "/Gy_Employee/list", |
| | | data: { |
| | | sWhere: ` and 组织名称 = '${uni.getStorageSync("Organization")}' and 禁用标记 = ''and 审核人 !='' order by 部门代码`, |
| | | user: getUserInfo()['Czymc'], |
| | | Organization: uni.getStorageSync("Organization") |
| | | } |
| | | }) |
| | | sWhere: ` and 组织名称 = '${uni.getStorageSync( |
| | | "Organization" |
| | | )}' and 禁用标记 = ''and 审核人 !='' order by 部门代码`, |
| | | user: getUserInfo()["Czymc"], |
| | | Organization: uni.getStorageSync("Organization"), |
| | | }, |
| | | }); |
| | | |
| | | let { |
| | | data, |
| | | Message, |
| | | count |
| | | } = res.data |
| | | } = res.data; |
| | | |
| | | if (count == 1) { |
| | | console.log('data: ', data); |
| | | this.GyFirstCheckEmpList = data |
| | | this.GyFirstCheckEmpNameList = Array.from(data).map(e => e["职员名称"]) |
| | | console.log("data: ", data); |
| | | this.GyFirstCheckEmpList = data; |
| | | this.GyFirstCheckEmpNameList = Array.from(data).map((e) => e["职员名称"]); |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `初始化检验员失败: ${Message}` |
| | | }) |
| | | title: "温馨提示", |
| | | message: `初始化检验员失败: ${Message}`, |
| | | }); |
| | | } |
| | | |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `初始化检验员失败: ${err}` |
| | | }) |
| | | title: "温馨提示", |
| | | message: `初始化检验员失败: ${err}`, |
| | | }); |
| | | } |
| | | }, |
| | | async HFirstCheckEmpChange(e) { |
| | | console.log('选中检验员: ', e); |
| | | let index = this.GyFirstCheckEmpList.findIndex(elem => elem["职员名称"] == e) |
| | | console.log("选中检验员: ", e); |
| | | let index = this.GyFirstCheckEmpList.findIndex((elem) => elem["职员名称"] == e); |
| | | if (index == -1) { |
| | | this.hform.HFirstCheckEmp = 0 |
| | | this.hform.HFirstCheckEmpName = '' |
| | | return |
| | | this.hform.HFirstCheckEmp = 0; |
| | | this.hform.HFirstCheckEmpName = ""; |
| | | return; |
| | | } |
| | | |
| | | this.hform.HFirstCheckEmp = this.GyFirstCheckEmpList[index]["HItemID"] |
| | | this.hform.HFirstCheckEmpName = this.GyFirstCheckEmpList[index]["职员名称"] |
| | | this.hform.HFirstCheckEmp = this.GyFirstCheckEmpList[index]["HItemID"]; |
| | | this.hform.HFirstCheckEmpName = this.GyFirstCheckEmpList[index]["职员名称"]; |
| | | }, |
| | | // 生产班次初始化 |
| | | async InitHWorkShift() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_ShiftsController/Get_Gy_WorkShiftList', |
| | | url: "/Gy_ShiftsController/Get_Gy_WorkShiftList", |
| | | data: { |
| | | sWhere: ` and 禁用标记 = '' and ISNULL(审核人,'') != '' and 使用组织名称 = '${uni.getStorageSync("Organization")}'`, |
| | | HMaker: getUserInfo()['Czymc'] |
| | | } |
| | | }) |
| | | sWhere: ` and 禁用标记 = '' and ISNULL(审核人,'') != '' and 使用组织名称 = '${uni.getStorageSync( |
| | | "Organization" |
| | | )}'`, |
| | | HMaker: getUserInfo()["Czymc"], |
| | | }, |
| | | }); |
| | | |
| | | let { |
| | | data, |
| | | Message, |
| | | count |
| | | } = res.data |
| | | } = res.data; |
| | | |
| | | if (count == 1) { |
| | | console.log('data: ', data); |
| | | this.GyWorkShiftList = data |
| | | this.GyWorkShiftNameList = Array.from(data).map(e => e["班次名称"]) |
| | | console.log("data: ", data); |
| | | this.GyWorkShiftList = data; |
| | | this.GyWorkShiftNameList = Array.from(data).map((e) => e["班次名称"]); |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `初始化班次失败: ${Message}` |
| | | }) |
| | | title: "温馨提示", |
| | | message: `初始化班次失败: ${Message}`, |
| | | }); |
| | | } |
| | | |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `初始化班次失败: ${err}` |
| | | }) |
| | | title: "温馨提示", |
| | | message: `初始化班次失败: ${err}`, |
| | | }); |
| | | } |
| | | }, |
| | | async HWorkShiftChange(e) { |
| | | console.log('选中班次: ', e); |
| | | let index = this.GyWorkShiftList.findIndex(elem => elem["班次名称"] == e) |
| | | console.log("选中班次: ", e); |
| | | let index = this.GyWorkShiftList.findIndex((elem) => elem["班次名称"] == e); |
| | | if (index == -1) { |
| | | this.hform.HWorkShiftID = 0 |
| | | this.hform.HWorkShiftName = '' |
| | | return |
| | | this.hform.HWorkShiftID = 0; |
| | | this.hform.HWorkShiftName = ""; |
| | | return; |
| | | } |
| | | |
| | | this.hform.HWorkShiftID = this.GySourceList[index]["HInterID"] |
| | | this.hform.HWorkShiftName = this.GySourceList[index]["班次名称"] |
| | | this.hform.HWorkShiftID = this.GySourceList[index]["HInterID"]; |
| | | this.hform.HWorkShiftName = this.GySourceList[index]["班次名称"]; |
| | | }, |
| | | // 生产资源更新 |
| | | // 生产资源初始化 |
| | | async InitHSource() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_Source/list', |
| | | url: "/Gy_Source/list", |
| | | data: { |
| | | sWhere: `and 禁用标记 != 'Y' and ISNULL(审核人,'') != '' and HUSEORGID = '100038'`, |
| | | user: getUserInfo()['Czymc'] |
| | | } |
| | | }) |
| | | user: getUserInfo()["Czymc"], |
| | | }, |
| | | }); |
| | | |
| | | let { |
| | | data, |
| | | Message, |
| | | count |
| | | } = res.data |
| | | } = res.data; |
| | | |
| | | if (count == 1) { |
| | | this.GySourceList = data |
| | | this.GySourceNameList = Array.from(data).map(e => e["生产资源名称"]) |
| | | this.GySourceList = data; |
| | | this.GySourceNameList = Array.from(data).map((e) => e["生产资源名称"]); |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `初始化生产资源失败: ${Message}` |
| | | }) |
| | | title: "温馨提示", |
| | | message: `初始化生产资源失败: ${Message}`, |
| | | }); |
| | | } |
| | | |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `初始化生产资源失败: ${err}` |
| | | }) |
| | | title: "温馨提示", |
| | | message: `初始化生产资源失败: ${err}`, |
| | | }); |
| | | } |
| | | }, |
| | | // 生产资源更新 |
| | | async HSourceChange(e) { |
| | | console.log('选中生产资源: ', e); |
| | | let index = this.GySourceList.findIndex(elem => elem["生产资源名称"] == e) |
| | | console.log("选中生产资源: ", e); |
| | | let index = this.GySourceList.findIndex((elem) => elem["生产资源名称"] == e); |
| | | if (index == -1) { |
| | | this.hform.HSourceID = 0 |
| | | this.hform.HSourceName = '' |
| | | return |
| | | this.hform.HSourceID = 0; |
| | | this.hform.HSourceName = ""; |
| | | return; |
| | | } |
| | | |
| | | this.hform.HSourceID = this.GySourceList[index]["HItemID"] |
| | | this.hform.HSourceName = this.GySourceList[index]["生产资源名称"] |
| | | this.hform.HSourceID = this.GySourceList[index]["HItemID"]; |
| | | this.hform.HSourceName = this.GySourceList[index]["生产资源名称"]; |
| | | |
| | | this.get_ICMOBillStatusList(); |
| | | this.get_QC_TakeSampleCheckBillList(); |
| | | this.GetCheckItemID(); |
| | | }, |
| | | // 显示弹窗 |
| | | async showSelectorModule(item, index) { |
| | | this.currentChechItemIDCache = item.num || 0 // 0 表示没有任何子表被选中 |
| | | this.enablePopupModule = this.PopupModuleNameList[index] |
| | | console.log('this.$refs: ', this.$refs); |
| | | await this.$nextTick() |
| | | this.currentChechItemIDCache = item.num || 0; // 0 表示没有任何子表被选中 |
| | | this.enablePopupModule = this.PopupModuleNameList[index]; |
| | | console.log("this.$refs: ", this.$refs); |
| | | await this.$nextTick(); |
| | | if (index == 7) { |
| | | // 检验方案需要额外传递工序和物料名称两个参数 |
| | | this.$refs.listPopup.setRequiredInfo(item.HMaterName, item.HProcName) |
| | | this.$refs.listPopup.setRequiredInfo(item.HMaterName, item.HProcName); |
| | | } |
| | | |
| | | this.$refs.listPopup.showPopup() |
| | | this.$refs.listPopup.showPopup(); |
| | | }, |
| | | getAnalysisMethodDisplay(val) { |
| | | console.log('AnalysisMethodVal: ', val); |
| | | console.log("AnalysisMethodVal: ", val); |
| | | if (val) { |
| | | return this.arrayAnalysisMethod.find(e => e.value == val).name |
| | | return this.arrayAnalysisMethod.find((e) => e.value == val).name; |
| | | } |
| | | return '' |
| | | return ""; |
| | | }, |
| | | checkResultChange(event) { |
| | | console.log('event: ', event); |
| | | console.log("event: ", event); |
| | | }, |
| | | // 检验项目新增行 |
| | | addCheckItem(resource) { |
| | | |
| | | let ordinal = this.getObjLength(this.checkItems) + 1 |
| | | let ordinal = this.getObjLength(this.checkItems) + 1; |
| | | let checkItem = { |
| | | "num": ordinal, |
| | | "HInterID": this.hform.HInterID, |
| | | "HQCCheckItemID": "", |
| | | "HQCCheckItemNumber": "", |
| | | "HQCCheckItemName": "", |
| | | "HInspectInstruMentID": "0", |
| | | "HInspectInstruMentNumber": "", |
| | | "HInspectInstruMentName": "", |
| | | "HQCStd": "", |
| | | "HUnit": "", |
| | | "HQCNote": "", |
| | | "HAnalysisMethod": "", |
| | | "HResult": false, |
| | | "HMax": "", |
| | | "HMin": "", |
| | | "HAvg": "", |
| | | "HRemark": "", |
| | | "HKeyInspect": false, |
| | | "HStatus": 0, |
| | | "HSampleSchemeID": "", |
| | | "HUnitID": 0, |
| | | "HInspectVal": '', |
| | | "HTargetVal": '', |
| | | "HUpLimit": '', |
| | | "HDownLimit": '', |
| | | "HUpOffSet": '', |
| | | "HDownOffSet": '', |
| | | "HSampleDamageQty": 0, |
| | | "HSampleSchemeName": "", |
| | | "HSampleQty": 0, |
| | | "HAcceptQty": 0, |
| | | "HInspectionLevel": "", |
| | | "HRejectQty": 0, |
| | | "HStrictness": "", |
| | | "HSampleUnRightQty": 0, |
| | | "HAQL": "", |
| | | "HSamplingType": "", |
| | | "HInspectResultToSee": "" |
| | | num: ordinal, |
| | | HInterID: this.hform.HInterID, |
| | | HQCCheckItemID: "", |
| | | HQCCheckItemNumber: "", |
| | | HQCCheckItemName: "", |
| | | HInspectInstruMentID: "0", |
| | | HInspectInstruMentNumber: "", |
| | | HInspectInstruMentName: "", |
| | | HQCStd: "", |
| | | HUnit: "", |
| | | HQCNote: "", |
| | | HAnalysisMethod: "", |
| | | HResult: 1, |
| | | HMax: "", |
| | | HMin: "", |
| | | HAvg: "", |
| | | HRemark: "", |
| | | HKeyInspect: false, |
| | | HStatus: 1, |
| | | HSampleSchemeID: "", |
| | | HUnitID: 0, |
| | | HInspectVal: "", |
| | | HTargetVal: "", |
| | | HUpLimit: "", |
| | | HDownLimit: "", |
| | | HUpOffSet: "", |
| | | HDownOffSet: "", |
| | | HSampleDamageQty: 0, |
| | | HSampleSchemeName: "", |
| | | HSampleQty: 0, |
| | | HAcceptQty: 0, |
| | | HInspectionLevel: "", |
| | | HRejectQty: 0, |
| | | HStrictness: "", |
| | | HSampleUnRightQty: 0, |
| | | HAQL: "", |
| | | HSamplingType: "", |
| | | HInspectResultToSee: "", |
| | | }; |
| | | if (resource) { |
| | | // 通过主表检验方案带出的检验项目 |
| | | Object.assign(checkItem, resource); |
| | | } |
| | | if (resource) { // 通过主表检验方案带出的检验项目 |
| | | Object.assign(checkItem, resource) |
| | | } |
| | | this.$set(this.checkItems, ordinal, checkItem) |
| | | this.$set(this.checkItems, ordinal, checkItem); |
| | | this.$nextTick(() => { |
| | | // 检查是否可以新增检验值项 |
| | | this.setInspectValModule(this.checkItems[ordinal]) |
| | | }) |
| | | |
| | | |
| | | this.setInspectValModule(this.checkItems[ordinal]); |
| | | }); |
| | | }, |
| | | // 检验项目删除行 |
| | | removeCheckItem(item) { |
| | |
| | | content: `确认要删除第${item.num}行吗?删除后不能恢复`, |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | this.$delete(this.checkItems, item.num) |
| | | this.refreshCheckItemNum() |
| | | this.$delete(this.checkItems, item.num); |
| | | this.$delete(this.subTabs, `_${item.num}`); |
| | | this.$forceUpdate(); |
| | | this.refreshCheckItemNum(); |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | }); |
| | | }, |
| | | async refreshCheckItemNum() { |
| | | await this.$nextTick() |
| | | await this.$nextTick(); |
| | | // 重排序号 |
| | | let num = 1 |
| | | let checkItemsCache = {} |
| | | let num = 1; |
| | | let checkItemsCache = {}; |
| | | for (let s in this.checkItems) { |
| | | checkItemsCache[num] = this.checkItems[s] |
| | | checkItemsCache[num].num = num |
| | | num++ |
| | | checkItemsCache[num] = this.checkItems[s]; |
| | | checkItemsCache[num].num = num; |
| | | num++; |
| | | } |
| | | this.checkItems = checkItemsCache |
| | | this.checkItems = checkItemsCache; |
| | | }, |
| | | getObjLength(obj) { |
| | | return Object.keys(obj).length |
| | | return Object.keys(obj).length; |
| | | }, |
| | | // 结论修改 |
| | | HResultChange(id, e) { |
| | | console.log('e: ', e); |
| | | this.checkItems[id]["HResult"] = e.detail.value |
| | | console.log("e: ", e); |
| | | this.checkItems[id]["HResult"] = e.detail.value ? 1 : 0; |
| | | |
| | | this.HCheckLastResult(); |
| | | }, |
| | | // 每次检验项目的结论更新,都要判断最终结论 |
| | | HCheckLastResult() { |
| | | let unPassNum = 0; |
| | | for (var key in this.checkItems) { |
| | | if (this.checkItems[key]["HResult"] == 0) { |
| | | unPassNum++; |
| | | } |
| | | } |
| | | |
| | | if (unPassNum > 0) { |
| | | this.hform.HLastResult = false; |
| | | return; |
| | | } |
| | | this.hform.HLastResult = true; |
| | | }, |
| | | // 检验方案修改 |
| | | HAnalysisMethodChange(id, e) { |
| | | console.log('e: ', e); |
| | | this.checkItems[id]["HAnalysisMethod"] = this.arrayAnalysisMethod[e.detail.value]["value"] |
| | | console.log("e: ", e); |
| | | this.checkItems[id]["HAnalysisMethod"] = this.arrayAnalysisMethod[e.detail.value][ |
| | | "value" |
| | | ]; |
| | | |
| | | // 检查是否可以新增检验值项 |
| | | this.setInspectValModule(this.checkItems[id]) |
| | | this.setInspectValModule(this.checkItems[id]); |
| | | }, |
| | | // 重点检查修改 |
| | | HKeyInspectChange(id, e) { |
| | | console.log('e: ', e); |
| | | this.checkItems[id]["HKeyInspect"] = e.detail.value |
| | | console.log("e: ", e); |
| | | this.checkItems[id]["HKeyInspect"] = e.detail.value; |
| | | }, |
| | | // 检验项目返回 |
| | | async CheckItemComplete(e) { |
| | | console.log('CheckItemRet: ', e); |
| | | console.log("CheckItemRet: ", e); |
| | | for (var key in e["retVal"]) { |
| | | let data = e["retVal"][key] |
| | | let data = e["retVal"][key]; |
| | | Object.assign(this.checkItems[key], { |
| | | "HQCCheckItemID": data["HItemID"], |
| | | "HQCCheckItemNumber": data["代码"], |
| | | "HQCCheckItemName": data["名称"], |
| | | }) |
| | | await this.$nextTick() |
| | | this.$refs.listPopup.exit() |
| | | HQCCheckItemID: data["HItemID"], |
| | | HQCCheckItemNumber: data["代码"], |
| | | HQCCheckItemName: data["名称"], |
| | | }); |
| | | await this.$nextTick(); |
| | | this.$refs.listPopup.exit(); |
| | | // 确保在弹窗结束后,再将页面上挂在的组件置空 |
| | | await this.$nextTick() |
| | | this.enablePopupModule = this.PopupModuleNameList[0] |
| | | await this.$nextTick(); |
| | | this.enablePopupModule = this.PopupModuleNameList[0]; |
| | | } |
| | | }, |
| | | // 检验方案返回 |
| | | async SampleSchemeComplete(e) { |
| | | console.log('SampleSchemeRet: ', e); |
| | | console.log("SampleSchemeRet: ", e); |
| | | for (var key in e["retVal"]) { |
| | | let data = e["retVal"][key] |
| | | let data = e["retVal"][key]; |
| | | Object.assign(this.checkItems[key], { |
| | | "HSampleSchemeID": data["hmainid"], |
| | | "HSampleSchemeNumber": data["抽样方案代码"], |
| | | "HSampleSchemeName": data["抽样方案名称"], |
| | | "HSampleQty": data["样本量"] || 0, |
| | | "HAcceptQty": data["允许数"] || 0, |
| | | "HInspectionLevel": data["检验水平"], |
| | | "HRejectQty": data["拒绝数"] || 0, |
| | | "HStrictness": data["严格度"], |
| | | "HSampleUnRightQty": data["样本不合格数"] || 0, |
| | | "HAQL": data["AQL"], |
| | | "HSamplingType": data["抽样类型"], |
| | | "HInspectResultToSee": data["检验结果"], |
| | | "HUpLimit": data["上限值"] || 0, |
| | | "HDownLimit": data["下限值"] || 0, |
| | | "HSampleDamageQty": data["样本破坏数"] || 0 |
| | | }) |
| | | await this.$nextTick() |
| | | this.$refs.listPopup.exit() |
| | | this.setInspectValModule(this.checkItems[key]) |
| | | HSampleSchemeID: data["hmainid"], |
| | | HSampleSchemeNumber: data["抽样方案代码"], |
| | | HSampleSchemeName: data["抽样方案名称"], |
| | | HSampleQty: data["样本量"] || 0, |
| | | HAcceptQty: data["允许数"] || 0, |
| | | HInspectionLevel: data["检验水平"], |
| | | HRejectQty: data["拒绝数"] || 0, |
| | | HStrictness: data["严格度"], |
| | | HSampleUnRightQty: data["样本不合格数"] || 0, |
| | | HAQL: data["AQL"], |
| | | HSamplingType: data["抽样类型"], |
| | | HInspectResultToSee: data["检验结果"], |
| | | HUpLimit: data["上限值"] || 0, |
| | | HDownLimit: data["下限值"] || 0, |
| | | HSampleDamageQty: data["样本破坏数"] || 0, |
| | | }); |
| | | await this.$nextTick(); |
| | | this.$refs.listPopup.exit(); |
| | | this.setInspectValModule(this.checkItems[key]); |
| | | |
| | | await this.$nextTick() |
| | | this.enablePopupModule = this.PopupModuleNameList[0] |
| | | await this.$nextTick(); |
| | | this.enablePopupModule = this.PopupModuleNameList[0]; |
| | | } |
| | | }, |
| | | // 检验仪器返回 |
| | | async InspectMentComplete(e) { |
| | | console.log('InspectInstruMentRet: ', e); |
| | | console.log("InspectInstruMentRet: ", e); |
| | | for (var key in e["retVal"]) { |
| | | let data = e["retVal"][key] |
| | | let data = e["retVal"][key]; |
| | | Object.assign(this.checkItems[key], { |
| | | "HInspectInstruMentID": data["HItemID"], |
| | | "HInspectInstruMentNumber": data["检验仪器代码"], |
| | | "HInspectInstruMentName": data["检验仪器名称"], |
| | | }) |
| | | await this.$nextTick() |
| | | this.$refs.listPopup.exit() |
| | | HInspectInstruMentID: data["HItemID"], |
| | | HInspectInstruMentNumber: data["检验仪器代码"], |
| | | HInspectInstruMentName: data["检验仪器名称"], |
| | | }); |
| | | await this.$nextTick(); |
| | | this.$refs.listPopup.exit(); |
| | | // 确保在弹窗结束后,再将页面上挂在的组件置空 |
| | | await this.$nextTick() |
| | | this.enablePopupModule = this.PopupModuleNameList[0] |
| | | await this.$nextTick(); |
| | | this.enablePopupModule = this.PopupModuleNameList[0]; |
| | | } |
| | | }, |
| | | // 产品代码返回 |
| | | async MaterComplete(e) { |
| | | console.log('MaterRet: ', e); |
| | | console.log("MaterRet: ", e); |
| | | for (var key in e["retVal"]) { |
| | | let data = e["retVal"][key] |
| | | let data = e["retVal"][key]; |
| | | Object.assign(this.hform, { |
| | | "HMaterNumber": data["物料代码"], |
| | | "HMaterName": data["物料名称"], |
| | | "HMaterID": data["HItemID"], |
| | | }) |
| | | await this.$nextTick() |
| | | this.$refs.listPopup.exit() |
| | | HMaterNumber: data["物料代码"], |
| | | HMaterName: data["物料名称"], |
| | | HMaterID: data["HItemID"], |
| | | }); |
| | | await this.$nextTick(); |
| | | this.$refs.listPopup.exit(); |
| | | // 确保在弹窗结束后,再将页面上挂在的组件置空 |
| | | await this.$nextTick() |
| | | this.enablePopupModule = this.PopupModuleNameList[0] |
| | | await this.$nextTick(); |
| | | this.enablePopupModule = this.PopupModuleNameList[0]; |
| | | this.GetCheckItemID(); |
| | | } |
| | | }, |
| | | // 任务单返回 |
| | | async ICMOBillComplete(e) { |
| | | console.log('ICMOBillRet: ', e); |
| | | console.log("ICMOBillRet: ", e); |
| | | for (var key in e["retVal"]) { |
| | | let data = e["retVal"][key] |
| | | let data = e["retVal"][key]; |
| | | Object.assign(this.hform, { |
| | | "HICMOInterID": data.hmainid, |
| | | "HICMOEntryID": data.HEntryID, |
| | | "HICMOBillNo": data.单据号, |
| | | "HMaterNumber": data.产品代码, |
| | | "HMaterName": data.产品名称, |
| | | "HMaterID": data.HMaterID, |
| | | "HICMOQty": data.生产任务单数量, |
| | | }) |
| | | await this.$nextTick() |
| | | this.$refs.listPopup.exit() |
| | | HICMOInterID: data.hmainid, |
| | | HICMOEntryID: data.HEntryID, |
| | | HICMOBillNo: data.单据号, |
| | | HMaterNumber: data.产品代码, |
| | | HMaterName: data.产品名称, |
| | | HMaterID: data.HMaterID, |
| | | HICMOQty: data.生产任务单数量, |
| | | }); |
| | | await this.$nextTick(); |
| | | this.$refs.listPopup.exit(); |
| | | // 确保在弹窗结束后,再将页面上挂在的组件置空 |
| | | await this.$nextTick() |
| | | this.enablePopupModule = this.PopupModuleNameList[0] |
| | | await this.$nextTick(); |
| | | this.enablePopupModule = this.PopupModuleNameList[0]; |
| | | } |
| | | }, |
| | | // 流转卡返回 |
| | | async ProcExchBillComplete(e) { |
| | | console.log('ProcExchBillRet: ', e); |
| | | console.log("ProcExchBillRet: ", e); |
| | | for (var key in e["retVal"]) { |
| | | let data = e["retVal"][key] |
| | | let data = e["retVal"][key]; |
| | | Object.assign(this.hform, { |
| | | "HProcExchInterID": data.hmainid, |
| | | "HProcExchEntryID": data.hsubid, |
| | | "HProcExchBillNo": data.单据号, |
| | | }) |
| | | await this.$nextTick() |
| | | this.$refs.listPopup.exit() |
| | | HProcExchInterID: data.hmainid, |
| | | HProcExchEntryID: data.hsubid, |
| | | HProcExchBillNo: data.单据号, |
| | | }); |
| | | await this.$nextTick(); |
| | | this.$refs.listPopup.exit(); |
| | | // 确保在弹窗结束后,再将页面上挂在的组件置空 |
| | | await this.$nextTick() |
| | | this.enablePopupModule = this.PopupModuleNameList[0] |
| | | await this.$nextTick(); |
| | | this.enablePopupModule = this.PopupModuleNameList[0]; |
| | | } |
| | | }, |
| | | // 检验方案(主表)返回 |
| | | async HQCSchemeComplete(e) { |
| | | console.log('HQCSchemeRet: ', e); |
| | | console.log("HQCSchemeRet: ", e); |
| | | for (var key in e["retVal"]) { |
| | | let data = e["retVal"][key] |
| | | let data = e["retVal"][key]; |
| | | Object.assign(this.hform, { |
| | | HQCSchemeID: data.hmainid, |
| | | HQCSchemeName: data.检验方案名称 |
| | | }) |
| | | HQCSchemeName: data.检验方案名称, |
| | | }); |
| | | await this.get_CheckItem(); |
| | | await this.$nextTick() |
| | | this.$refs.listPopup.exit() |
| | | await this.$nextTick(); |
| | | this.$refs.listPopup.exit(); |
| | | // 确保在弹窗结束后,再将页面上挂在的组件置空 |
| | | await this.$nextTick() |
| | | this.enablePopupModule = this.PopupModuleNameList[0] |
| | | await this.$nextTick(); |
| | | this.enablePopupModule = this.PopupModuleNameList[0]; |
| | | } |
| | | }, |
| | | // 工序返回 |
| | | async HProcComplete(e) { |
| | | console.log(' HProcRet: ', e); |
| | | console.log(" HProcRet: ", e); |
| | | for (var key in e["retVal"]) { |
| | | let data = e["retVal"][key] |
| | | let data = e["retVal"][key]; |
| | | Object.assign(this.hform, { |
| | | "HProcName": data["工序名称"], |
| | | "HProcID": data["HItemID"], |
| | | }) |
| | | await this.$nextTick() |
| | | this.$refs.listPopup.exit() |
| | | HProcName: data["工序名称"], |
| | | HProcID: data["HItemID"], |
| | | }); |
| | | await this.$nextTick(); |
| | | this.$refs.listPopup.exit(); |
| | | // 确保在弹窗结束后,再将页面上挂在的组件置空 |
| | | await this.$nextTick() |
| | | this.enablePopupModule = this.PopupModuleNameList[0] |
| | | await this.$nextTick(); |
| | | this.enablePopupModule = this.PopupModuleNameList[0]; |
| | | await this.GetCheckItemID(); |
| | | await this.get_ICMOBillStatusList(); |
| | | await this.get_QC_TakeSampleCheckBillList(); |
| | | } |
| | | }, |
| | | setInspectValModule(checkItem) { |
| | | console.log('checkItem: ', checkItem); |
| | | if (!checkItem.HAnalysisMethod || !checkItem.HSampleSchemeID) { |
| | | return |
| | | async get_QC_TakeSampleCheckBillList() { |
| | | // 取样单查询 |
| | | let HProcID = this.hform.HProcID; |
| | | let HProcExchInterId = this.hform.HProcExchInterID; |
| | | let sWhere = ""; |
| | | |
| | | if (HProcID == "0" || HProcID == "") { |
| | | CommonUtils.showTips({ |
| | | message: "请选择工序", |
| | | }); |
| | | return; |
| | | } |
| | | // 区分检验值页签和静态页签,检验值页签的id以_开头 |
| | | this.$set(this.InspectModules, `_${checkItem.num}`, { |
| | | id: `_${checkItem.num}`, |
| | | checkItemId: checkItem.num |
| | | }) |
| | | console.log(' this.arrayAnalysisMethod: ', checkItem.HAnalysisMethod); |
| | | let analysisMethodName = this.arrayAnalysisMethod.find(e => e.value == checkItem.HAnalysisMethod) |
| | | .name |
| | | this.$set(this.subTabs, `_${checkItem.num}`, { |
| | | id: `_${checkItem.num}`, |
| | | name: `${analysisMethodName}-${checkItem.HQCCheckItemName}` |
| | | }) |
| | | }, |
| | | InspectValueUpdate(e) { |
| | | console.log('e: ', e); |
| | | let { |
| | | data, |
| | | list |
| | | } = e |
| | | this.checkItems[data.num] = Object.assign(this.checkItems[data.num], data) |
| | | this.$set(this.InspectValues, `${data.num}`, list) |
| | | }, |
| | | // 带出检验项目 |
| | | async get_CheckItem() { |
| | | |
| | | sWhere = " and 工序流转卡主内码='" + HProcExchInterID + "' and HProcID=" + HProcID; |
| | | |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Web/GetCheckItemByCheckProjectID', |
| | | url: "//QC_TakeSampleCheckBill/QC_TakeSampleCheckBillMainList", |
| | | data: { |
| | | CheckProjectID: this.hform.HQCSchemeID || 0, |
| | | HBatchQty: this.hform.HProcExchQty |
| | | } |
| | | }) |
| | | sWhere: sWhere, |
| | | user: getUserInfo()["Czymc"], |
| | | }, |
| | | }); |
| | | |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | } = res.data; |
| | | if (count != 1) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: `获取取样单信息失败: ${Message}`, |
| | | }); |
| | | } |
| | | |
| | | this.hform.HTakeSampleCheckBillID = data[0]["hmainid"]; |
| | | this.hform.HTakeSampleCheckBillNo = data[0]["单据号"]; |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: `获取取样单信息失败: ${err}`, |
| | | }); |
| | | } |
| | | }, |
| | | async get_ICMOBillStatusList() { |
| | | let sWhere = ""; |
| | | let HProcID = this.hform.HProcID; |
| | | let HSourceID = this.hform.HSourceID; |
| | | let HProcExchInterId = this.hform.HProcExchInterID; |
| | | |
| | | if (HProcID != "0") { |
| | | sWhere += " and HProcID=" + HProcID; |
| | | } |
| | | if (HSourceID != "0") { |
| | | sWhere += " and HSourceID=" + HSourceID; |
| | | } |
| | | |
| | | sWhere += " and HSourceInterID=" + HProcExchInterID; |
| | | |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/CheckBill/GetICMOBillStatusList", |
| | | data: { |
| | | sWhere: sWhere, |
| | | user: getUserInfo()["Czymc"], |
| | | }, |
| | | }); |
| | | |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data; |
| | | if (count != 1) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: `获取生产工单信息失败: ${Message}`, |
| | | }); |
| | | } |
| | | |
| | | this.hform.HProcID = data[0]["HProcID"]; |
| | | this.hform.HProcName = data[0]["工序"]; |
| | | this.hform.HSourceID = data[0]["HSourceID"]; |
| | | this.hform.HSourceName = data[0]["生产资源"]; |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: `获取生产工单信息失败: ${err}`, |
| | | }); |
| | | } |
| | | }, |
| | | setInspectValModule(checkItem) { |
| | | console.log("checkItem: ", checkItem); |
| | | if (!checkItem.HAnalysisMethod || !checkItem.HSampleSchemeID) { |
| | | return; |
| | | } |
| | | // 区分检验值页签和静态页签,检验值页签的id以_开头 |
| | | this.$set(this.InspectModules, `_${checkItem.num}`, { |
| | | id: `_${checkItem.num}`, |
| | | checkItemId: checkItem.num, |
| | | }); |
| | | console.log(" this.arrayAnalysisMethod: ", checkItem.HAnalysisMethod); |
| | | let analysisMethodName = this.arrayAnalysisMethod.find( |
| | | (e) => e.value == checkItem.HAnalysisMethod |
| | | ).name; |
| | | this.$set(this.subTabs, `_${checkItem.num}`, { |
| | | id: `_${checkItem.num}`, |
| | | name: `${analysisMethodName}-${checkItem.HQCCheckItemName}`, |
| | | }); |
| | | }, |
| | | InspectValueUpdate(e) { |
| | | console.log("e: ", e); |
| | | let { |
| | | data, |
| | | list |
| | | } = e; |
| | | this.checkItems[data.num] = Object.assign(this.checkItems[data.num], data); |
| | | this.$set(this.InspectValues, `${data.num}`, list); |
| | | }, |
| | | // 带出检验项目 |
| | | async get_CheckItem() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/Web/GetCheckItemByCheckProjectID", |
| | | data: { |
| | | CheckProjectID: this.hform.HQCSchemeID || 0, |
| | | HBatchQty: this.hform.HProcExchQty || 0, |
| | | }, |
| | | }); |
| | | |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data; |
| | | |
| | | if (count == 1) { |
| | | for (var i = 0; i < data.length; i++) { |
| | | let checkItem = { |
| | | "HQCCheckItemID": data[i]["HQCCheckItemID"], |
| | | "HQCCheckItemNumber": data[i]["检验项目代码"], |
| | | "HQCCheckItemName": data[i]["检验项目"], |
| | | "HInspectInstruMentID": data[i]["HInspectInstruMentID"], |
| | | "HInspectInstruMentNumber": data[i]["检验仪器代码"], |
| | | "HInspectInstruMentName": data[i]["检验仪器"], |
| | | "HQCStd": data[i]["HQCStd"], |
| | | "HUnit": data[i]["单位名称"], |
| | | "HQCNote": "", |
| | | "HAnalysisMethod": data[i]["分析方法"], |
| | | "HResult": data[i]["默认结论"], |
| | | "HMax": "", |
| | | "HMin": "", |
| | | "HAvg": "", |
| | | "HRemark": "", |
| | | "HKeyInspect": data[i]["重点检查"] == 1 ? true : false, |
| | | "HStatus": 0, |
| | | "HSampleSchemeID": data[i]["HSampleSchemeID"], |
| | | "HUnitID": data[i]["HUnitID"], |
| | | "HInspectVal": '', |
| | | "HTargetVal": '', |
| | | "HUpLimit": data[i].上限值, |
| | | "HDownLimit": data[i].下限值, |
| | | "HUpOffSet": '', |
| | | "HDownOffSet": '', |
| | | "HSampleDamageQty": "0", |
| | | "HSampleSchemeName": data[i].抽样方案名称, |
| | | "HSampleQty": data[i].样本量, |
| | | "HAcceptQty": data[i].允许数, |
| | | "HInspectionLevel": data[i].检验水平, |
| | | "HRejectQty": data[i].拒绝数, |
| | | "HStrictness": data[i].严格度, |
| | | "HSampleUnRightQty": "", |
| | | "HAQL": data[i].AQL, |
| | | "HSamplingType": data[i].抽样类型 |
| | | } |
| | | HQCCheckItemID: data[i]["HQCCheckItemID"], |
| | | HQCCheckItemNumber: data[i]["检验项目代码"], |
| | | HQCCheckItemName: data[i]["检验项目"], |
| | | HInspectInstruMentID: data[i]["HInspectInstruMentID"], |
| | | HInspectInstruMentNumber: data[i]["检验仪器代码"], |
| | | HInspectInstruMentName: data[i]["检验仪器"], |
| | | HQCStd: data[i]["HQCStd"], |
| | | HUnit: data[i]["单位名称"], |
| | | HQCNote: "", |
| | | HAnalysisMethod: data[i]["分析方法"], |
| | | HResult: data[i]["默认结论"], |
| | | HMax: "", |
| | | HMin: "", |
| | | HAvg: "", |
| | | HRemark: "", |
| | | HKeyInspect: data[i]["重点检查"] == 1 ? true : false, |
| | | HStatus: 0, |
| | | HSampleSchemeID: data[i]["HSampleSchemeID"], |
| | | HUnitID: data[i]["HUnitID"], |
| | | HInspectVal: "", |
| | | HTargetVal: "", |
| | | HUpLimit: data[i].上限值, |
| | | HDownLimit: data[i].下限值, |
| | | HUpOffSet: "", |
| | | HDownOffSet: "", |
| | | HSampleDamageQty: "0", |
| | | HSampleSchemeName: data[i].抽样方案名称, |
| | | HSampleQty: data[i].样本量, |
| | | HAcceptQty: data[i].允许数, |
| | | HInspectionLevel: data[i].检验水平, |
| | | HRejectQty: data[i].拒绝数, |
| | | HStrictness: data[i].严格度, |
| | | HSampleUnRightQty: "", |
| | | HAQL: data[i].AQL, |
| | | HSamplingType: data[i].抽样类型, |
| | | }; |
| | | |
| | | this.addCheckItem(checkItem) |
| | | this.addCheckItem(checkItem); |
| | | } |
| | | |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取检验项目信息失败: ${Message} ` |
| | | }) |
| | | title: "温馨提示", |
| | | message: `获取检验项目信息失败: ${Message} `, |
| | | }); |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取检验项目信息失败: ${err} ` |
| | | }) |
| | | title: "温馨提示", |
| | | message: `获取检验项目信息失败: ${err} `, |
| | | }); |
| | | } |
| | | }, |
| | | async getMaxBillNo() { |
| | |
| | | let res = await CommonUtils.doRequest2Sync({ |
| | | url: "/Web/GetMAXNum", |
| | | data: { |
| | | "HBillType": '7505' |
| | | } |
| | | }) |
| | | HBillType: "7505", |
| | | }, |
| | | }); |
| | | |
| | | if (!res) { |
| | | return |
| | | return; |
| | | } |
| | | |
| | | let { |
| | | data, |
| | | Message, |
| | | count |
| | | } = res.data |
| | | } = res.data; |
| | | if (count == 1) { |
| | | this.hform.HInterID = data[0].HInterID |
| | | this.hform.HBillNo = data[0].HBillNo |
| | | this.hform.HInterID = data[0].HInterID; |
| | | this.hform.HBillNo = data[0].HBillNo; |
| | | } else { |
| | | throw (Message) |
| | | throw Message; |
| | | } |
| | | |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: "获取单据号异常: " + err |
| | | }) |
| | | title: "温馨提示", |
| | | message: "获取单据号异常: " + err, |
| | | }); |
| | | } |
| | | }, |
| | | // 检验项目返回值 |
| | | InspectValueComplete(e) { |
| | | console.log("e: ", e); |
| | | let key = e.num; |
| | | Object.assign(this.checkItems[key], e); |
| | | this.checkItems[key].HInspectResultToSee = this.checkItems[key].HResult2; |
| | | }, |
| | | checkSubmitValidate() { |
| | | if (this.hform.HICMOQty == "" || this.hform.HICMOQty <= 0) { |
| | | CommonUtils.showTips({ |
| | | message: "任务单数量不能为空且不能小于等于0!" |
| | | }) |
| | | return false |
| | | message: "任务单数量不能为空且不能小于等于0!", |
| | | }); |
| | | return false; |
| | | } |
| | | |
| | | if (this.hform.HFirstCheckEmp) { |
| | | CommonUtils.showTips({ |
| | | message: "检验员未选择!" |
| | | }) |
| | | return false |
| | | message: "检验员未选择!", |
| | | }); |
| | | return false; |
| | | } |
| | | |
| | | for (let key in this.checkItems) { |
| | | if (this.checkItems[key].HQCCheckItemID) { |
| | | CommonUtils.showTips({ |
| | | message: `第${this.checkItems[key].num}行检验项目不能为空!` |
| | | }) |
| | | return false |
| | | message: `第${this.checkItems[key].num}行检验项目不能为空!`, |
| | | }); |
| | | return false; |
| | | } |
| | | |
| | | if (this.checkItems[key].HSampleSchemeID == '' || this.checkItems[key].HSampleSchemeID == null) { |
| | | this.checkItems[key].HSampleSchemeID = 0 |
| | | if ( |
| | | this.checkItems[key].HSampleSchemeID == "" || |
| | | this.checkItems[key].HSampleSchemeID == null |
| | | ) { |
| | | this.checkItems[key].HSampleSchemeID = 0; |
| | | } |
| | | if (this.checkItems[key].HSampleQty == '' || this.checkItems[key].HSampleQty == null) { |
| | | this.checkItems[key].HSampleQty = 0 |
| | | if ( |
| | | this.checkItems[key].HSampleQty == "" || |
| | | this.checkItems[key].HSampleQty == null |
| | | ) { |
| | | this.checkItems[key].HSampleQty = 0; |
| | | } |
| | | if (this.checkItems[key].HSampleDamageQty == '' || this.checkItems[key].HSampleDamageQty == null) { |
| | | this.checkItems[key].HSampleDamageQty = 0 |
| | | if ( |
| | | this.checkItems[key].HSampleDamageQty == "" || |
| | | this.checkItems[key].HSampleDamageQty == null |
| | | ) { |
| | | this.checkItems[key].HSampleDamageQty = 0; |
| | | } |
| | | if (this.checkItems[key].HAcceptQty == '' || this.checkItems[key].HAcceptQty == null) { |
| | | this.checkItems[key].HAcceptQty = 0 |
| | | if ( |
| | | this.checkItems[key].HAcceptQty == "" || |
| | | this.checkItems[key].HAcceptQty == null |
| | | ) { |
| | | this.checkItems[key].HAcceptQty = 0; |
| | | } |
| | | if (this.checkItems[key].HRejectQty == '' || this.checkItems[key].HRejectQty == null) { |
| | | this.checkItems[key].HRejectQty = 0 |
| | | if ( |
| | | this.checkItems[key].HRejectQty == "" || |
| | | this.checkItems[key].HRejectQty == null |
| | | ) { |
| | | this.checkItems[key].HRejectQty = 0; |
| | | } |
| | | if (this.checkItems[key].HSampleUnRightQty == '' || this.checkItems[key].HSampleUnRightQty == |
| | | null) { |
| | | this.checkItems[key].HSampleUnRightQty = 0 |
| | | if ( |
| | | this.checkItems[key].HSampleUnRightQty == "" || |
| | | this.checkItems[key].HSampleUnRightQty == null |
| | | ) { |
| | | this.checkItems[key].HSampleUnRightQty = 0; |
| | | } |
| | | if (this.checkItems[key].HUnitID == '') { |
| | | this.checkItems[key].HUnitID = 0 |
| | | if (this.checkItems[key].HUnitID == "") { |
| | | this.checkItems[key].HUnitID = 0; |
| | | } |
| | | } |
| | | |
| | | return true |
| | | return true; |
| | | }, |
| | | async submit() { |
| | | if (!this.checkSubmitValidate) { |
| | | return |
| | | return; |
| | | } |
| | | try { |
| | | // 检查是否有未切换的检验值模块(是否包含set_SaveValue方法),如果有,则运行一次保存检验值的方法,根据检验值是否保存成功再执行下一步 |
| | | if (typeof this.$refs.InspectValueModules != 'undefined') { |
| | | if (typeof this.$refs.InspectValueModules != "undefined") { |
| | | // 加载有检验值模块 |
| | | await this.$refs.InspectValueModules[0].set_SaveValue() |
| | | this.InspectValues[0] = this.$refs.InspectValueModules[0].InSpectValues |
| | | await this.$refs.InspectValueModules[0].set_SaveValue(); |
| | | this.InspectValues[0] = this.$refs.InspectValueModules[0].InSpectValues; |
| | | } |
| | | let InspectValuesTrans = [] |
| | | let HInterID = this.hform.HInterID |
| | | let InspectValuesTrans = []; |
| | | let HInterID = this.hform.HInterID; |
| | | for (let key in this.InspectValues) { |
| | | let HEntryID = key |
| | | let HEntryID = key; |
| | | |
| | | InspectValuesTrans.push( |
| | | `${JSON.stringify(this.InspectValues[key])};${HInterID};${HEntryID}`) |
| | | `${JSON.stringify(this.InspectValues[key])};${HInterID};${HEntryID}` |
| | | ); |
| | | } |
| | | let checkItemsArray = [] |
| | | let checkItemsArray = []; |
| | | for (var key in this.checkItems) { |
| | | checkItemsArray.push(this.checkItems[key].data) |
| | | checkItemsArray.push(this.checkItems[key].data); |
| | | } |
| | | |
| | | let sMainSub = |
| | | `${JSON.stringify(this.hform)};${JSON.stringify(checkItemsArray)};${this.operationType};${getUserInfo()["Czymc"]};${InspectValuesTrans[0]}` |
| | | console.log('this.checkItems: ', this.checkItems); |
| | | let sMainSub = `${JSON.stringify(this.hform)};${JSON.stringify( |
| | | checkItemsArray |
| | | )};${this.operationType};${getUserInfo()["Czymc"]};${InspectValuesTrans[0]}`; |
| | | console.log("this.checkItems: ", this.checkItems); |
| | | |
| | | let msg = { |
| | | sMainSub: sMainSub, |
| | | sValues: InspectValuesTrans |
| | | } |
| | | sValues: InspectValuesTrans, |
| | | }; |
| | | |
| | | console.log('msg: ', msg); |
| | | console.log("msg: ", msg); |
| | | let res = await CommonUtils.doRequest2Sync({ |
| | | url: "/QC_FirstPieceCheckBill/set_SaveBill", |
| | | data: { |
| | | sMainSub: sMainSub, |
| | | }, |
| | | method: 'POST' |
| | | }) |
| | | method: "POST", |
| | | }); |
| | | |
| | | if (!res) { |
| | | return |
| | | return; |
| | | } |
| | | |
| | | let { |
| | | count, |
| | | Message, |
| | | data |
| | | } = res.data |
| | | } = res.data; |
| | | if (count == 1) { |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: res.data.Message + '。是否继续新增?', |
| | | title: "提示", |
| | | content: res.data.Message + "。是否继续新增?", |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | console.log("用户点击确定"); |
| | | uni.redirectTo({ |
| | | url: '/pages/ZLGL/shoujianjianyan/form?operationType=1' |
| | | }) |
| | | url: "/pages/ZLGL/shoujianjianyan/form?operationType=1", |
| | | }); |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消'); |
| | | console.log("用户点击取消"); |
| | | // setTimeout(() => { |
| | | // uni.navigateBack(); |
| | | // }, 50) |
| | | } |
| | | } |
| | | }, |
| | | }); |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `首件检验单保存错误: ${Message}` |
| | | }) |
| | | title: "温馨提示", |
| | | message: `首件检验单保存错误: ${Message}`, |
| | | }); |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `首件检验单保存错误: ${err}` |
| | | }) |
| | | title: "温馨提示", |
| | | message: `首件检验单保存错误: ${err}`, |
| | | }); |
| | | } |
| | | |
| | | }, |
| | | addNew() { |
| | | uni.redirectTo({ |
| | | url: "pages/ZLGL/shoujianjianyan/form?operationType=1" |
| | | }) |
| | | url: "pages/ZLGL/shoujianjianyan/form?operationType=1", |
| | | }); |
| | | }, |
| | | goBack() { |
| | | uni.navigateBack() |
| | | uni.navigateBack(); |
| | | }, |
| | | async RoadBillMain() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/QC_FirstPieceCheckBill/QC_FirstPieceCheckBill_Edit', |
| | | url: "/QC_FirstPieceCheckBill/QC_FirstPieceCheckBill_Edit", |
| | | data: { |
| | | sWhere: ` and hmainid=${this.hform.HInterID}`, |
| | | user: getUserInfo()["Czymc"] |
| | | } |
| | | }) |
| | | user: getUserInfo()["Czymc"], |
| | | }, |
| | | }); |
| | | |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | } = res.data; |
| | | |
| | | if (count == 1) { |
| | | console.log('RoadBillMain: : ',data ); |
| | | console.log("RoadBillMain: : ", data); |
| | | Object.assign(this.hform, { |
| | | "HInterID": data[0].hmainid, |
| | | "HBillNo": data[0].单据号, |
| | | "HDate": dayjs(data[0].日期).format("YYYY-MM-DD"), |
| | | "HSourceID": data[0].HSourceID, |
| | | "HSourceName": data[0].生产资源名称, |
| | | "HICMOBillNo": data[0].任务单号, |
| | | "HICMOQty": data[0].任务单数量, |
| | | "HICMOInterID": data[0].HICMOInterID, |
| | | "HICMOEntryID": data[0].HICMOEntryID, |
| | | "HMaterID": data[0].HMaterID, |
| | | "HMaterName": data[0].物料名称, |
| | | "HMaterNumber": data[0].物料代码, |
| | | "HProcID": data[0].HProcID, |
| | | "HProcName": data[0].HProcName, |
| | | "HProcExchQty": data[0].HProcExchQty, |
| | | "HProcExchBillNo": data[0].HProcExchBillNo, |
| | | "HProcExchInterID": data[0].HProcExchInterID, |
| | | "HProcExchEntryID": data[0].HProcExchEntryID, |
| | | "HFirstCheckEmp": data[0].HFirstCheckEmp, |
| | | "HFirstCheckEmpName": data[0].质检员名称, |
| | | "HQCSchemeID": data[0].检验方案ID, |
| | | "HQCSchemeName": data[0].检验方案名称, |
| | | "HRemark": data[0].表头备注, |
| | | "HMaker": data[0].制单人, |
| | | "HMakeDate": data[0].制单日期, |
| | | "HChecker": data[0].审核人, |
| | | "HCheckDate": data[0].审核日期, |
| | | "HCloseMan": data[0].关闭人, |
| | | "HCloseDate": data[0].关闭日期, |
| | | "HUpDateDate": data[0].修改日期, |
| | | "HDeleteDate": data[0].作废日期, |
| | | "HSampleSchemeID": data[0].HSampleSchemeID, |
| | | "HSampleSchemeName": data[0].抽样方案名称, |
| | | "HSampleQty": data[0].样本量, |
| | | "HSampleQty2": data[0].样本量, |
| | | "HSampleDamageQty": data[0].样本破坏数, |
| | | "HSamplingType": data[0].抽样类型, |
| | | "HAcceptQty": data[0].允许数, |
| | | "HInspectionLevel": data[0].检验水平, |
| | | "HRejectQty": data[0].拒绝数, |
| | | "HStrictness": data[0].严格度, |
| | | "HSampleUnRightQty": data[0].样本不合格数, |
| | | "HSampleUnRightQty2": data[0].样本不合格数, |
| | | "HAQL": data[0].AQL, |
| | | "HUnitID": data[0].HUnitID, |
| | | "HUnit": data[0].单位, |
| | | "HInspectValB": data[0].检测值基础资料, |
| | | "HInspectVal": data[0].检测值, |
| | | "HTargetValB": data[0].目标值基础资料, |
| | | "HTargetVal": data[0].目标值, |
| | | "HUpLimit": data[0].上限值, |
| | | "HDownLimit": data[0].下限值, |
| | | "HUpOffSet": data[0].上偏差, |
| | | "HDownOffSet": data[0].下偏差, |
| | | "HEntryID": data[0].hsubid, |
| | | "HQCCheckItemName": data[0].检验项目名称, |
| | | "HQCCheckItemID": data[0].HQCCheckItemID, |
| | | "HShiftsID": data[0].HShiftsID, |
| | | "HShiftsName": data[0].班次名称, |
| | | "HErrTreatment": data[0].异常临时处理方案, |
| | | "HBatchNo": data[0].批号, |
| | | "HLastResult": data[0].判定结论 == "合格" ? "true" : "false", |
| | | "HTakeSampleCheckBillID": data[0].HTakeSampleCheckBillID, |
| | | "HTakeSampleCheckBillNo": data[0].HTakeSampleCheckBillNo |
| | | }) |
| | | HInterID: data[0].hmainid, |
| | | HBillNo: data[0].单据号, |
| | | HDate: dayjs(data[0].日期).format("YYYY-MM-DD"), |
| | | HSourceID: data[0].HSourceID, |
| | | HSourceName: data[0].生产资源名称, |
| | | HICMOBillNo: data[0].任务单号, |
| | | HICMOQty: data[0].任务单数量, |
| | | HICMOInterID: data[0].HICMOInterID, |
| | | HICMOEntryID: data[0].HICMOEntryID, |
| | | HMaterID: data[0].HMaterID, |
| | | HMaterName: data[0].物料名称, |
| | | HMaterNumber: data[0].物料代码, |
| | | HProcID: data[0].HProcID, |
| | | HProcName: data[0].HProcName, |
| | | HProcExchQty: data[0].HProcExchQty, |
| | | HProcExchBillNo: data[0].HProcExchBillNo, |
| | | HProcExchInterID: data[0].HProcExchInterID, |
| | | HProcExchEntryID: data[0].HProcExchEntryID, |
| | | HFirstCheckEmp: data[0].HFirstCheckEmp, |
| | | HFirstCheckEmpName: data[0].质检员名称, |
| | | HQCSchemeID: data[0].检验方案ID, |
| | | HQCSchemeName: data[0].检验方案名称, |
| | | HRemark: data[0].表头备注, |
| | | HMaker: data[0].制单人, |
| | | HMakeDate: data[0].制单日期, |
| | | HChecker: data[0].审核人, |
| | | HCheckDate: data[0].审核日期, |
| | | HCloseMan: data[0].关闭人, |
| | | HCloseDate: data[0].关闭日期, |
| | | HUpDateDate: data[0].修改日期, |
| | | HDeleteDate: data[0].作废日期, |
| | | HSampleSchemeID: data[0].HSampleSchemeID, |
| | | HSampleSchemeName: data[0].抽样方案名称, |
| | | HSampleQty: data[0].样本量, |
| | | HSampleQty2: data[0].样本量, |
| | | HSampleDamageQty: data[0].样本破坏数, |
| | | HSamplingType: data[0].抽样类型, |
| | | HAcceptQty: data[0].允许数, |
| | | HInspectionLevel: data[0].检验水平, |
| | | HRejectQty: data[0].拒绝数, |
| | | HStrictness: data[0].严格度, |
| | | HSampleUnRightQty: data[0].样本不合格数, |
| | | HSampleUnRightQty2: data[0].样本不合格数, |
| | | HAQL: data[0].AQL, |
| | | HUnitID: data[0].HUnitID, |
| | | HUnit: data[0].单位, |
| | | HInspectValB: data[0].检测值基础资料, |
| | | HInspectVal: data[0].检测值, |
| | | HTargetValB: data[0].目标值基础资料, |
| | | HTargetVal: data[0].目标值, |
| | | HUpLimit: data[0].上限值, |
| | | HDownLimit: data[0].下限值, |
| | | HUpOffSet: data[0].上偏差, |
| | | HDownOffSet: data[0].下偏差, |
| | | HEntryID: data[0].hsubid, |
| | | HQCCheckItemName: data[0].检验项目名称, |
| | | HQCCheckItemID: data[0].HQCCheckItemID, |
| | | HShiftsID: data[0].HShiftsID, |
| | | HShiftsName: data[0].班次名称, |
| | | HErrTreatment: data[0].异常临时处理方案, |
| | | HBatchNo: data[0].批号, |
| | | HLastResult: data[0].判定结论 == "合格" ? "true" : "false", |
| | | HTakeSampleCheckBillID: data[0].HTakeSampleCheckBillID, |
| | | HTakeSampleCheckBillNo: data[0].HTakeSampleCheckBillNo, |
| | | }); |
| | | |
| | | for (let i = 0; i < data.length; i++) { |
| | | this.addCheckItem({ |
| | | |
| | | "HQCCheckItemID": data[i].HQCCheckItemID, |
| | | "HQCCheckItemNumber": data[i].检验项目代码, |
| | | "HQCCheckItemName": data[i].检验项目名称, |
| | | "HInspectInstruMentID": data[i].HInspectInstruMentID, |
| | | "HInspectInstruMentNumber": data[i].检验仪器代码, |
| | | "HInspectInstruMentName": data[i].检验仪器名称, |
| | | "HQCStd": data[i].检验标准, |
| | | "HUnit": data[i].单位名称, |
| | | "HQCNote": data[i].检验记录, |
| | | "HResult": data[i].结论 == "合格" ? 1 : 2, |
| | | "HMax": data[i].最大值, |
| | | "HMin": data[i].最小值, |
| | | "HAvg": data[i].平均值, |
| | | "HRemark": data[i].表体备注, |
| | | "HAnalysisMethod": data[i].分析方法 == "定性分析" ? 1 : (data[i].分析方法 == "定量分析" ? |
| | | HQCCheckItemID: data[i].HQCCheckItemID, |
| | | HQCCheckItemNumber: data[i].检验项目代码, |
| | | HQCCheckItemName: data[i].检验项目名称, |
| | | HInspectInstruMentID: data[i].HInspectInstruMentID, |
| | | HInspectInstruMentNumber: data[i].检验仪器代码, |
| | | HInspectInstruMentName: data[i].检验仪器名称, |
| | | HQCStd: data[i].检验标准, |
| | | HUnit: data[i].单位名称, |
| | | HQCNote: data[i].检验记录, |
| | | HResult: data[i].结论 == "合格" ? 1 : 0, |
| | | HMax: data[i].最大值, |
| | | HMin: data[i].最小值, |
| | | HAvg: data[i].平均值, |
| | | HRemark: data[i].表体备注, |
| | | HAnalysisMethod: data[i].分析方法 == "定性分析" ? |
| | | 1 : |
| | | data[i].分析方法 == "定量分析" ? |
| | | 2 : |
| | | 3), |
| | | "HKeyInspect": data[i].重点检查 == "否" ? false : true, |
| | | "HSampleSchemeID": data[i].HSampleSchemeID, |
| | | "HUnitID": data[i].HUnitID, |
| | | "HInspectVal": data[i].检测值, |
| | | "HTargetVal": data[i].目标值, |
| | | "HUpLimit": data[i].上限值, |
| | | "HDownLimit": data[i].下限值, |
| | | "HUpOffSet": data[i].上偏差, |
| | | "HDownOffSet": data[i].下偏差, |
| | | "HSampleDamageQty": data[i].样本破坏数, |
| | | "HSampleSchemeName": data[i].抽样方案名称, |
| | | "HSampleQty": data[i].样本量, |
| | | "HSampleDamageQty": data[i].样本破坏数, |
| | | "HAcceptQty": data[i].允许数, |
| | | "HInspectionLevel": 0, |
| | | "HRejectQty": data[i].拒绝数, |
| | | "HStrictness": 0, |
| | | "HSampleUnRightQty": data[i].样本不合格数, |
| | | "HAQL": data[i].AQL, |
| | | "HSamplingType": 0, |
| | | "HSamplingType": data[i].抽样类型, |
| | | "HStrictness": data[i].严格度 |
| | | }) |
| | | 3, |
| | | HKeyInspect: data[i].重点检查 == "否" ? false : true, |
| | | HSampleSchemeID: data[i].HSampleSchemeID, |
| | | HUnitID: data[i].HUnitID, |
| | | HInspectVal: data[i].检测值, |
| | | HTargetVal: data[i].目标值, |
| | | HUpLimit: data[i].上限值, |
| | | HDownLimit: data[i].下限值, |
| | | HUpOffSet: data[i].上偏差, |
| | | HDownOffSet: data[i].下偏差, |
| | | HSampleDamageQty: data[i].样本破坏数, |
| | | HSampleSchemeName: data[i].抽样方案名称, |
| | | HSampleQty: data[i].样本量, |
| | | HSampleDamageQty: data[i].样本破坏数, |
| | | HAcceptQty: data[i].允许数, |
| | | HInspectionLevel: 0, |
| | | HRejectQty: data[i].拒绝数, |
| | | HStrictness: 0, |
| | | HSampleUnRightQty: data[i].样本不合格数, |
| | | HAQL: data[i].AQL, |
| | | HSamplingType: 0, |
| | | HSamplingType: data[i].抽样类型, |
| | | HStrictness: data[i].严格度, |
| | | }); |
| | | } |
| | | |
| | | |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `加载单据失败: ${Message}` |
| | | }) |
| | | title: "温馨提示", |
| | | message: `加载单据失败: ${Message}`, |
| | | }); |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `加载单据失败: ${err}` |
| | | }) |
| | | title: "温馨提示", |
| | | message: `加载单据失败: ${err}`, |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | async onLoad(e) { |
| | | this.operationType = e.operationType || 1 |
| | | this.hform.HInterID = e.linterid || 0 |
| | | this.operationType = e.operationType || 1; |
| | | this.hform.HInterID = e.linterid || 0; |
| | | if (this.operationType == 1) { |
| | | await this.getMaxBillNo() |
| | | await this.getMaxBillNo(); |
| | | } else if (this.operationType == 2) { |
| | | await this.RoadBillMain() |
| | | } else if (this.operationType == 3) { |
| | | await this.RoadBillMain(); |
| | | } else if (this.operationType == 3) {} |
| | | |
| | | } |
| | | |
| | | await this.InitHSource() |
| | | await this.InitHWorkShift() |
| | | await this.InitHEmp() |
| | | } |
| | | } |
| | | await this.InitHSource(); |
| | | await this.InitHWorkShift(); |
| | | await this.InitHEmp(); |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | <style lang="scss" scoped> |
| | | input { |
| | | width: inherit; |
| | | font-size: 26rpx; |
| | | } |
| | | |
| | | .uni-input { |
| | | padding: 0 |
| | | padding: 0; |
| | | } |
| | | |
| | | |
| | | .bill-main-tabs, |
| | | .bill-sub-tabs { |
| | |
| | | height: inherit; |
| | | font-size: 26rpx; |
| | | } |
| | | |
| | | } |
| | | |
| | | .disabled { |
| | |
| | | } |
| | | |
| | | .btn-a { |
| | | background-color: #3A78FF; |
| | | background-color: #3a78ff; |
| | | color: #fff; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | .icon-wrapper { |
| | | background-color: #3A78FF; |
| | | background-color: #3a78ff; |
| | | border-radius: 100%; |
| | | width: 40rpx; |
| | | height: 40rpx; |
| | |
| | | } |
| | | |
| | | .icon-wrapper-big { |
| | | background-color: #3A78FF; |
| | | background-color: #3a78ff; |
| | | border-radius: 100%; |
| | | width: 50rpx; |
| | | height: 50rpx; |
| | |
| | | text-align: center; |
| | | } |
| | | } |
| | | |
| | | .pass-background { |
| | | background-color: #cee3f2; |
| | | border: none; |
| | | } |
| | | |
| | | .unpass-background { |
| | | background-color: #f0d6e3; |
| | | border: none; |
| | | } |
| | | </style> |