From 920675a9f1ccf311d32e6466ebde737dff765645 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期五, 23 一月 2026 09:15:00 +0800
Subject: [PATCH] Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev
---
pages/MJGL/Sc_MouldRepairSendWork/Sc_MouldRepairSendWorkBill.vue | 1740 +++++++++++++++++++++++++++++++----------------------------
1 files changed, 902 insertions(+), 838 deletions(-)
diff --git a/pages/MJGL/Sc_MouldRepairSendWork/Sc_MouldRepairSendWorkBill.vue b/pages/MJGL/Sc_MouldRepairSendWork/Sc_MouldRepairSendWorkBill.vue
index ef6f93b..1b6dd86 100644
--- a/pages/MJGL/Sc_MouldRepairSendWork/Sc_MouldRepairSendWorkBill.vue
+++ b/pages/MJGL/Sc_MouldRepairSendWork/Sc_MouldRepairSendWorkBill.vue
@@ -1,887 +1,951 @@
<template>
- <view>
- <view class="tabs" id="tabs">
- <view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">鍩烘湰淇℃伅</view>
- <view :class="tabs == 1 ? 'on':''" @tap="tabs = 1">鍏朵粬淇℃伅</view>
- <view :class="tabs == 2 ? 'on':''" @tap="tabs = 2">鍒跺崟淇℃伅</view>
- <!-- <view :class="tabs == 3 ? 'on':''" @tap="tabs = 3">闄勪欢淇℃伅</view> -->
- </view>
- <!-- 鍩烘湰淇℃伅 -->
- <template v-if="tabs == 0">
- <view class="form" :style="{
+ <view>
+ <view class="tabs" id="tabs">
+ <view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">鍩烘湰淇℃伅</view>
+ <view :class="tabs == 1 ? 'on':''" @tap="tabs = 1">鍏朵粬淇℃伅</view>
+ <view :class="tabs == 2 ? 'on':''" @tap="tabs = 2">鍒跺崟淇℃伅</view>
+ <!-- <view :class="tabs == 3 ? 'on':''" @tap="tabs = 3">闄勪欢淇℃伅</view> -->
+ </view>
+ <!-- 鍩烘湰淇℃伅 -->
+ <template v-if="tabs == 0">
+ <view class="form" :style="{
height: containerHeight + 'px',
overflow: 'auto'
}">
- <view class="form-item">
- <view class="title">鍣ㄥ叿鏉$爜:</view>
- <view :class="enableEdit?'right':'righton'">
- <input v-model="hform.HBarCode" :disabled="!enableEdit"
- @confirm="GetMessageByBarCode(hform.HBarCode)" placeholder="璇疯緭鍏�(鎴栨壂鎻�)鍣ㄥ叿鏉$爜" />
- </view>
- <view class="icon-wrapper">
- <uni-icons type="scan" size="20" @click="toScanCode"></uni-icons>
- </view>
- </view>
- <view class="form-item">
- <view class="title">缁翠慨寮�濮嬫棩鏈�:</view>
- <view class="right">
- <uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HRepairBeginDate">
- <input :value="hform.HRepairBeginDate" />
- </uni-datetime-picker>
- </view>
- </view>
- <view class="form-item">
- <view class="title">缁翠慨缁撴潫鏃ユ湡:</view>
- <view class="right">
- <uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HRepairEndDate">
- <input :value="hform.HRepairEndDate" />
- </uni-datetime-picker>
- </view>
- </view>
- <view class="form-item">
- <view class="title">鍗曟嵁鍙�:</view>
- <view class="righton">
- <input disabled v-model="hform.HBillNo" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">鍗曟嵁鏃ユ湡:</view>
- <view class="righton">
- <input disabled v-model="hform.HDate" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">鏃堕棿鍗曚綅:</view>
- <zxz-uni-data-select class="right" :localdata="[
- {key: '灏忔椂', value: '灏忔椂'},
- {key: '澶�', value: '澶�'},
- {key: '鏈�', value: '鏈�'},
- ]" dataKey="key" dataValue="value" v-model="hform.HCycleUnit">
- </zxz-uni-data-select>
- </view>
- <view class="form-item">
- <view class="title required">璁″垝缁翠慨宸ユ椂:</view>
- <view class="right">
- <input type="number" v-model="hform.HPlanTimes" />
- </view>
- </view>
- <view class="form-item">
- <view class="title required">瀹為檯缁翠慨宸ユ椂:</view>
- <view class="right">
- <input type="number" v-model="hform.HTimes" />
- </view>
- </view>
- <view class="form-item">
- <view class="title required">缁翠慨閮ㄩ棬:</view>
- <zxz-uni-data-select required class="right" :localdata="HDeptList" dataKey="閮ㄩ棬鍚嶇О"
- dataValue="HItemID" v-model="hform.HDeptID">
- </zxz-uni-data-select>
- <!-- <input disabled v-model="hform.HDeptName" placeholder="璇烽�夋嫨閮ㄩ棬" /> -->
- </view>
- <view class="form-item">
- <view class="title required">缁翠慨浜�:</view>
- <zxz-uni-data-select required class="right" :localdata="HEmpList" dataKey="HName"
- dataValue="HItemID" v-model="hform.HEmpID">
+ <!-- 鍘熷唴瀹逛繚鎸佷笉鍙� -->
+ <view class="form-item">
+ <view class="title">鍣ㄥ叿鏉$爜:</view>
+ <view :class="enableEdit?'right':'righton'">
+ <input v-model="hform.HBarCode" :disabled="!enableEdit"
+ @confirm="GetMessageByBarCode(hform.HBarCode)" placeholder="璇疯緭鍏�(鎴栨壂鎻�)鍣ㄥ叿鏉$爜" />
+ </view>
+ <view class="icon-wrapper">
+ <uni-icons type="scan" size="20" @click="toScanCode"></uni-icons>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">缁翠慨寮�濮嬫棩鏈�:</view>
+ <view class="right">
+ <uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HRepairBeginDate">
+ <input :value="hform.HRepairBeginDate" />
+ </uni-datetime-picker>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">缁翠慨缁撴潫鏃ユ湡:</view>
+ <view class="right">
+ <uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HRepairEndDate">
+ <input :value="hform.HRepairEndDate" />
+ </uni-datetime-picker>
+ </view>
+ </view>
+ <!-- 鏂板婧愬崟绫诲瀷鍜屾晠闅滅櫥璁板崟閫夋嫨 -->
+ <view class="form-item">
+ <view class="title">婧愬崟绫诲瀷</view>
+ <view class="right" v-show="showHMainSourceBillType">
+ <picker :range="arrayHMainSourceBillType" @change="HMainSourceBillTypeChange">
- </zxz-uni-data-select>
- <!-- <input disabled v-model="hform.HDeptName" placeholder="璇烽�夋嫨閮ㄩ棬" /> -->
- </view>
- <view class="form-item">
- <view class="title required">缁翠慨椤圭洰:</view>
- <zxz-uni-data-select required class="right" :localdata="HRepairList" dataKey="缁翠慨椤圭洰"
- dataValue="hitemid" v-model="hform.HRepairID">
+ <input disabled name="HMainSourceBillType" v-model="HMainSourceBillType"
+ placeholder="璇烽�夋嫨婧愬崟绫诲瀷" />
+ <view class="picker-overlay"></view>
+ </picker>
+ </view>
+ <view class="righton" v-show="!showHMainSourceBillType">
+ <input name="HMainSourceBillType" disabled v-model="HMainSourceBillType"
+ placeholder="璇烽�夋嫨婧愬崟绫诲瀷" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title required">鏁呴殰鐧昏鍗�</view>
+ <view class="right" v-show="hform.HMainSourceBillType != 1">
+ <input type="text" name="HBarCode" v-model="hform.HMainSourceBillNo" />
+ </view>
+ <view class="icon-wrapper" v-show="hform.HMainSourceBillType != 1"
+ :disabled="hform.HMainSourceBillType == -1">
+ <uni-icons type="search" size="20" @click="showBillList"></uni-icons>
+ </view>
+ <view class="righton" v-show="hform.HMainSourceBillType == 1">
+ <input type="text" disabled name="HBarCode" v-model="hform.HMainSourceBillNo" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鍗曟嵁鍙�:</view>
+ <view class="righton">
+ <input disabled v-model="hform.HBillNo" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鍗曟嵁鏃ユ湡:</view>
+ <view class="righton">
+ <input disabled v-model="hform.HDate" />
+ </view>
+ </view>
- </zxz-uni-data-select>
- <!-- <input disabled v-model="hform.HDeptName" placeholder="璇烽�夋嫨閮ㄩ棬" /> -->
- </view>
- <view class="form-item">
- <view class="title required">涓荤:</view>
- <zxz-uni-data-select required class="right" :localdata="HEmpList" dataKey="HName"
- dataValue="HItemID" v-model="hform.HManagerID">
+ <view class="form-item">
+ <view class="title required">缁翠慨閮ㄩ棬:</view>
+ <zxz-uni-data-select required class="right" :localdata="HDeptList" dataKey="閮ㄩ棬鍚嶇О"
+ dataValue="HItemID" v-model="hform.HDeptID">
- </zxz-uni-data-select>
- <!-- <input disabled v-model="hform.HDeptName" placeholder="璇烽�夋嫨閮ㄩ棬" /> -->
- </view>
- <view class="form-item">
- <view class="title">鍣ㄥ叿鍚嶇О:</view>
- <view class="righton">
- <input v-model="hform.HMouldName" disabled />
- </view>
- </view>
- <view class="form-item">
- <view class="title">鍣ㄥ叿瑙勬牸:</view>
- <view class="righton">
- <input v-model="hform.HMouldModel" disabled />
- </view>
- </view>
- <view class="form-item">
- <view class="title">鍣ㄥ叿鍨嬪彿:</view>
- <view class="righton">
- <input v-model="hform.HMouldSpec" disabled />
- </view>
- </view>
- </view>
- </template>
- <!-- 鍏朵粬淇℃伅(闈為噸瑕佷俊鎭�) -->
- <template v-if="tabs == 1">
- <view class="form" :style="{
+ </zxz-uni-data-select>
+ </view>
+ <view class="form-item">
+ <view class="title required">缁翠慨浜�:</view>
+ <zxz-uni-data-select required class="right" :localdata="HEmpList" dataKey="HName"
+ dataValue="HItemID" v-model="hform.HEmpID">
+
+ </zxz-uni-data-select>
+ </view>
+ <view class="form-item">
+ <view class="title required">缁翠慨椤圭洰:</view>
+ <zxz-uni-data-select required class="right" :localdata="HRepairList" dataKey="缁翠慨椤圭洰"
+ dataValue="hitemid" v-model="hform.HRepairID">
+
+ </zxz-uni-data-select>
+ </view>
+ <view class="form-item">
+ <view class="title required">涓荤:</view>
+ <zxz-uni-data-select required class="right" :localdata="HEmpList" dataKey="HName"
+ dataValue="HItemID" v-model="hform.HManagerID">
+
+ </zxz-uni-data-select>
+ </view>
+ <view class="form-item">
+ <view class="title">鍣ㄥ叿鍚嶇О:</view>
+ <view class="righton">
+ <input v-model="hform.HMouldName" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鍣ㄥ叿瑙勬牸:</view>
+ <view class="righton">
+ <input v-model="hform.HMouldModel" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鍣ㄥ叿鍨嬪彿:</view>
+ <view class="righton">
+ <input v-model="hform.HMouldSpec" disabled />
+ </view>
+ </view>
+ </view>
+ </template>
+ <!-- 鍏朵粬淇℃伅(闈為噸瑕佷俊鎭�) -->
+ <template v-if="tabs == 1">
+ <view class="form" :style="{
height: containerHeight + 'px',
overflow: 'auto'
}">
- <view class="form-item">
- <view class="title">渚涘簲鍟�:</view>
- <view class="right">
- <input v-model="hform.HSupID" placeholder="" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">缁翠慨绫诲瀷:</view>
- <zxz-uni-data-select class="right" :localdata="[
- {key: '鍐呴儴缁翠慨', value: '鍐呴儴缁翠慨'},
- {key: '澶栭儴缁翠慨', value: '澶栭儴缁翠慨'},
- ]" dataKey="key" dataValue="value" v-model="hform.HRepairType">
- </zxz-uni-data-select>
- </view>
- <view class="form-item">
- <view class="title">缁翠慨鍚庢柊瑙勬牸:</view>
- <view class="right">
- <input type="number" v-model="hform.HNewModel" placeholder="" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">鏂拌璁″鍛�:</view>
- <view class="right">
- <input type="number" v-model="hform.HNewDesignLife" placeholder="" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">璁惧:</view>
- <view class="right">
- <input v-model="hform.HEquipID" placeholder="" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">缁翠慨璐圭敤:</view>
- <view class="right">
- <input type="number" v-model="HDetailList[0].HMoney" placeholder="" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">缁翠慨鍐呭:</view>
- <view class="right">
- <textarea v-model="hform.HRepairContent" placeholder="璇疯緭鍏ョ淮淇唴瀹�" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">缁翠慨瑕佹眰:</view>
- <view class="right">
- <textarea v-model="hform.HExplanation" placeholder="璇疯緭鍏ョ淮淇姹�" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">澶囨敞:</view>
- <view class="right">
- <textarea v-model="hform.HRemark" placeholder="璇疯緭鍏ュ娉�" />
- </view>
- </view>
- </view>
- </template>
- <!-- 鍒跺崟淇℃伅 -->
- <template v-if="tabs == 2">
- <view class="form" :style="{
- height: containerHeight + 'px',
- overflow: 'auto'
- }">
- <view class="form-item">
- <view class="title">鍒涘缓浜�:</view>
- <view class="righton">
- <input v-model="hform.HMaker" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">鍒涘缓鏃ユ湡:</view>
- <view class="righton">
- <input v-model="hform.HMakeDate" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">淇敼浜�:</view>
- <view class="righton">
- <input v-model="hform.HUpDater" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">淇敼鏃ユ湡:</view>
- <view class="righton">
- <input v-model="hform.HUpDateDate" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">瀹℃牳浜�:</view>
- <view class="righton">
- <input v-model="hform.HChecker" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">瀹℃牳鏃堕棿:</view>
- <view class="righton">
- <input v-model="hform.HCheckDate" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">浣滃簾浜�:</view>
- <view class="righton">
- <input v-model="hform.HDeleteMan" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">浣滃簾鏃ユ湡:</view>
- <view class="righton">
- <input v-model="hform.HDeleteDate" />
- </view>
- </view>
- </view>
+ <view class="form-item">
+ <view class="title">鏃堕棿鍗曚綅:</view>
+ <zxz-uni-data-select class="right" :localdata="[
+ {key: '灏忔椂', value: '灏忔椂'},
+ {key: '澶�', value: '澶�'},
+ {key: '鏈�', value: '鏈�'},
+ ]" dataKey="key" dataValue="value" v-model="hform.HCycleUnit">
+ </zxz-uni-data-select>
+ </view>
+ <view class="form-item">
+ <view class="title">璁″垝缁翠慨宸ユ椂:</view>
+ <view class="right">
+ <input type="number" v-model="hform.HPlanTimes" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">瀹為檯缁翠慨宸ユ椂:</view>
+ <view class="right">
+ <input type="number" v-model="hform.HTimes" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">渚涘簲鍟�:</view>
+ <view class="right">
+ <input v-model="hform.HSupID" placeholder="" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">缁翠慨绫诲瀷:</view>
+ <zxz-uni-data-select class="right" :localdata="[
+ {key: '鍐呴儴缁翠慨', value: '鍐呴儴缁翠慨'},
+ {key: '澶栭儴缁翠慨', value: '澶栭儴缁翠慨'},
+ ]" dataKey="key" dataValue="value" v-model="hform.HRepairType">
+ </zxz-uni-data-select>
+ </view>
+ <view class="form-item">
+ <view class="title">缁翠慨鍚庢柊瑙勬牸:</view>
+ <view class="right">
+ <input type="number" v-model="hform.HNewModel" placeholder="" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鏂拌璁″鍛�:</view>
+ <view class="right">
+ <input type="number" v-model="hform.HNewDesignLife" placeholder="" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">璁惧:</view>
+ <view class="right">
+ <input v-model="hform.HEquipID" placeholder="" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">缁翠慨璐圭敤:</view>
+ <view class="right">
+ <input type="number" v-model="HDetailList[0].HMoney" placeholder="" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">缁翠慨鍐呭:</view>
+ <view class="right">
+ <textarea v-model="hform.HRepairContent" placeholder="璇疯緭鍏ョ淮淇唴瀹�" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">缁翠慨瑕佹眰:</view>
+ <view class="right">
+ <textarea v-model="hform.HExplanation" placeholder="璇疯緭鍏ョ淮淇姹�" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">澶囨敞:</view>
+ <view class="right">
+ <textarea v-model="hform.HRemark" placeholder="璇疯緭鍏ュ娉�" />
+ </view>
+ </view>
+ </view>
+ </template>
+ <!-- 鍒跺崟淇℃伅 -->
+ <template v-if="tabs == 2">
+ <view class="form" :style="{
+ height: containerHeight + 'px',
+ overflow: 'auto'
+ }">
+ <view class="form-item">
+ <view class="title">鍒涘缓浜�:</view>
+ <view class="righton">
+ <input v-model="hform.HMaker" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鍒涘缓鏃ユ湡:</view>
+ <view class="righton">
+ <input v-model="hform.HMakeDate" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">淇敼浜�:</view>
+ <view class="righton">
+ <input v-model="hform.HUpDater" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">淇敼鏃ユ湡:</view>
+ <view class="righton">
+ <input v-model="hform.HUpDateDate" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">瀹℃牳浜�:</view>
+ <view class="righton">
+ <input v-model="hform.HChecker" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">瀹℃牳鏃堕棿:</view>
+ <view class="righton">
+ <input v-model="hform.HCheckDate" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">浣滃簾浜�:</view>
+ <view class="righton">
+ <input v-model="hform.HDeleteMan" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">浣滃簾鏃ユ湡:</view>
+ <view class="righton">
+ <input v-model="hform.HDeleteDate" />
+ </view>
+ </view>
+ </view>
+ </template>
- </template>
- <!-- 鎿嶄綔鎸夐挳 -->
- <view class="buttons" id="buttons">
- <button class="btn-a" size="mini" @tap="submit">鎻愪氦</button>
- <view style="flex: 1;"></view>
- <button class="btn-a" size="mini" @tap="addNew">鏂板</button>
- <button class="btn-c" size="mini" @tap="goBack">閫�鍑�</button>
- </view>
- <!-- <xe-upload ref="XeUpload" :options="uploadOptions" @callback="handleUploadCallback"></xe-upload> -->
- </view>
+ <!-- 鎿嶄綔鎸夐挳 -->
+ <view class="buttons" id="buttons">
+ <button class="btn-a" size="mini" @tap="submit">鎻愪氦</button>
+ <view style="flex: 1;"></view>
+ <button class="btn-a" size="mini" @tap="addNew">鏂板</button>
+ <button class="btn-c" size="mini" @tap="goBack">閫�鍑�</button>
+ </view>
+
+ <!-- 鏂板寮圭獥缁勪欢 -->
+ <BillListPopupMouldConkBookBillVue ref="billList" :HBillType="hform.HBillType"
+ :HSourceBillType="hform.HMainSourceBillType" :HStockOrgID="hform.HStockOrgID">
+ </BillListPopupMouldConkBookBillVue>
+ </view>
</template>
<script>
- import dayjs from "dayjs";
- import {
- CommonUtils
- } from "@/utils/common";
- import {
- MpaasScan
- } from "@/utils/mpaasScan.js"
- import {
- getUserInfo
- } from "../../../utils/auth";
- export default {
- // 鍣ㄥ叿缁翠慨娲惧伐鍗�
- name: 'Sc_MouldRepairSendWorkBill',
- data() {
- return {
- tabs: 0,
- HMainSourceBillType: "",
- btnTop: 0,
- tabsBottom: 0,
- HModName: "Sc_MouldRepairSendWorkBill",
- HBillType: '3843',
- operationType: 1,
- uploadOptions: {},
- enableEdit: true,
+ import dayjs from "dayjs";
+ import {
+ CommonUtils
+ } from "@/utils/common";
+ import {
+ MpaasScan
+ } from "@/utils/mpaasScan.js"
+ import {
+ getUserInfo
+ } from "../../../utils/auth";
+ // 鏂板寮曞叆缁勪欢
+ import BillListPopupMouldConkBookBillVue from '../../../components/BillListPopup/BillListPopupMouldConkBookBill.vue';
- HDeptList: [],
- HRepairCheckList: [],
- HEmpList: [],
- HRepairList: [],
+ export default {
+ // 鍣ㄥ叿缁翠慨娲惧伐鍗�
+ name: 'Sc_MouldRepairSendWorkBill',
+ components: {
+ BillListPopupMouldConkBookBillVue,
+ },
+ data() {
+ return {
+ tabs: 0,
+ HMainSourceBillType: '妯″叿鏁呴殰鐧昏鍗�', // 鏂板
+ showHMainSourceBillType: true, // 鏂板
+ arrayHMainSourceBillType: ['妯″叿鏁呴殰鐧昏鍗�'], // 鏂板
+ arrayHMainSourceBillTypeID: ['3815'], // 鏂板
+ btnTop: 0,
+ tabsBottom: 0,
+ HModName: "Sc_MouldRepairSendWorkBill",
+ HBillType: '3843',
+ operationType: 1,
+ uploadOptions: {},
+ enableEdit: true,
- hform: {
- "HBarCode": "",
- "HBillNo": "",
- "HInterID": "0",
- "HDate": dayjs(new Date()).format('YYYY-MM-DD'),
- "HInnerBillNo": "",
- "MouldHNumber": "",
- "HMouldID": "0",
- "HRepairIDName": "",
- "HRepairID": "0",
- "HCycleUnit": "灏忔椂",
- "MouldHName": "",
- "MouldHModel": "",
- "HDeptIDName": "",
- "HDeptID": "0",
- "HManagerIDName": "",
- "HManagerID": "0",
- "HEmpIDName": "",
- "HEmpID": "0",
- "HRepairBeginDate": dayjs(new Date()).format('YYYY-MM-DD'),
- "HMainSourceBillType": "",
- "HMainSourceInterID": "0",
- "HMainSourceEntryID": "0",
- "HPlanTimes": "0",
- "HTimes": "0",
- "HRepairEndDate": dayjs(new Date()).format('YYYY-MM-DD'),
- "HMainSourceBillNo": "",
- "HSupIDName": "",
- "HSupID": "0",
- "HRepairType": "鍐呴儴缁翠慨",
- "HNewModel": "0",
- "HOrgID": "",
- "HNewDesignLife": "0",
- "HEquipIDName": "",
- "HEquipID": "0",
- "HRepairContent": "",
- "HExplanation": "",
- "HRemark": "",
- "HMaker": getUserInfo()["Czymc"],
- "HChecker": "",
- "HCloseMan": "",
- "HUpDater": "",
- "HMakeDate": dayjs(new Date()).format('YYYY-MM-DD'),
- "HCheckDate": "",
- "HCloseDate": "",
- "HUpDateDate": "",
- "HDeleteMan": "",
- "HDeleteDate": "",
- HMouldName: "",
- HMouldSpec: "",
- HMouldModel: "",
- },
- HDetailList: [{ // 鍚庣鎺ュ彛鎻愪氦闇�瑕� 鏄庣粏淇℃伅
- "瀛愮淮淇」鐩�": "",
- "HRepairID": 0,
- "瀛愮淮淇」鐩唬鐮�": "",
- "HRepairExplanation": "",
- "瀛愯礋璐d汉浠g爜": "",
- "HManagerID": "",
- "瀛愯礋璐d汉": "",
- "HMoney": 0,
- "HRemark": ""
- }]
- };
- },
- computed: {
- containerHeight: {
- get() {
- return this.btnTop - this.tabsBottom - 5
- }
- },
- },
- methods: {
- // 缁翠慨椤圭洰
- async getRepairList() {
- try {
- let res = await CommonUtils.doRequest2Async({
- url: '/Gy_Repair/GetRepairList',
- data: {
- sWhere: '',
- user: getUserInfo()["Czymc"]
- }
- })
+ HDeptList: [],
+ HRepairCheckList: [],
+ HEmpList: [],
+ HRepairList: [],
- let {
- data,
- count,
- Message
- } = res.data
- if (count == 1) {
- this.HRepairList = data
- } else {
- CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: `鑾峰彇妫�楠岄」鐩け璐�: ${Message}`
- })
- }
- } catch (err) {
- CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: `鑾峰彇妫�楠岄」鐩け璐�: ${err}`
- })
- }
- },
- // 鍒犻櫎鏄庣粏
- delDetail(item) {
+ hform: {
+ "HBarCode": "",
+ "HBillNo": "",
+ "HInterID": "0",
+ "HDate": dayjs(new Date()).format('YYYY-MM-DD'),
+ "HInnerBillNo": "",
+ "MouldHNumber": "",
+ "HMouldID": "0",
+ "HRepairIDName": "",
+ "HRepairID": "0",
+ "HCycleUnit": "灏忔椂",
+ "MouldHName": "",
+ "MouldHModel": "",
+ "HDeptName": getUserInfo()["HDeptName"],
+ "HDeptID": getUserInfo()["HDeptID"],
+ "HEmpName": getUserInfo().HEmpName,
+ "HEmpID": getUserInfo().HEmpID,
+ "HManagerName": getUserInfo().HSecManager,
+ "HManagerID": getUserInfo().HSecManagerID,
+ "HRepairBeginDate": dayjs(new Date()).format('YYYY-MM-DD'),
+ "HMainSourceBillType": 3815, // 鏂板锛氶粯璁ゆā鍏锋晠闅滅櫥璁板崟
+ "HMainSourceInterID": "0", // 鏂板
+ "HMainSourceEntryID": "0", // 鏂板
+ "HPlanTimes": "0",
+ "HTimes": "0",
+ "HRepairEndDate": dayjs(new Date()).format('YYYY-MM-DD'),
+ "HMainSourceBillNo": "", // 鏂板
+ "HSupIDName": "",
+ "HSupID": "0",
+ "HRepairType": "鍐呴儴缁翠慨",
+ "HNewModel": "0",
+ "HOrgID": "",
+ "HNewDesignLife": "0",
+ "HEquipIDName": "",
+ "HEquipID": "0",
+ "HRepairContent": "",
+ "HExplanation": "",
+ "HRemark": "",
+ "HMaker": getUserInfo()["Czymc"],
+ "HChecker": "",
+ "HCloseMan": "",
+ "HUpDater": "",
+ "HMakeDate": dayjs(new Date()).format('YYYY-MM-DD'),
+ "HCheckDate": "",
+ "HCloseDate": "",
+ "HUpDateDate": "",
+ "HDeleteMan": "",
+ "HDeleteDate": "",
+ HMouldName: "",
+ HMouldSpec: "",
+ HMouldModel: "",
+ "HStockOrgID": uni.getStorageSync("OrganizationID") || "0" // 鏂板
+ },
+ HDetailList: [{ // 鍚庣鎺ュ彛鎻愪氦闇�瑕� 鏄庣粏淇℃伅
+ "瀛愮淮淇」鐩�": "",
+ "HRepairID": 0,
+ "瀛愮淮淇」鐩唬鐮�": "",
+ "HRepairExplanation": "",
+ "瀛愯礋璐d汉浠g爜": "",
+ "HManagerID": "",
+ "瀛愯礋璐d汉": "",
+ "HMoney": 0,
+ "HRemark": ""
+ }]
+ };
+ },
+ computed: {
+ containerHeight: {
+ get() {
+ return this.btnTop - this.tabsBottom - 5
+ }
+ },
+ },
+ methods: {
+ // 鏂板锛氶�夋嫨婧愬崟绫诲瀷
+ HMainSourceBillTypeChange(e) {
+ if (e.detail.value == -1 || e.detail.value == NaN) {
+ this.HMainSourceBillType = '鎵嬪伐褰曞叆'
+ this.hform.HMainSourceBillType = -1
+ return
+ }
+ console.log(e.detail.value)
+ console.log(e)
+ this.HMainSourceBillType = this.arrayHMainSourceBillType[e.detail.value]
+ this.hform.HMainSourceBillType = this.arrayHMainSourceBillTypeID[e.detail.value]
- },
- // 鎻愪氦鏁版嵁鏈夋晥鎬ф牎楠�
- ValidCheck() {
- if (this.hform.HMouldID == 0) {
- return {
- Message: "鏈綍鍏ュ櫒鍏蜂俊鎭紝璇峰厛褰曞叆鍣ㄥ叿淇℃伅!",
- state: false
- }
- }
- if (this.hform.HDeptID == 0) {
- return {
- Message: "閮ㄩ棬涓嶅緱涓虹┖!",
- state: false
- }
- }
- if (this.hform.HEmpID == 0) {
- return {
- Message: "楠屾敹浜轰笉寰椾负绌�!",
- state: false
- }
- }
- if (this.hform.HRepairCheckMainID == 0) {
- return {
- Message: "楠岃瘉椤圭洰涓嶅緱涓虹┖!",
- state: false
- }
- }
- if (this.hform.HManagerID == 0) {
- return {
- Message: "璐熻矗浜轰笉寰椾负绌�!",
- state: false
- }
- }
- if (this.hform.HPlanTimes == '') {
- return {
- Message: "璁″垝缁翠慨宸ユ椂涓嶅緱涓虹┖!",
- state: false
- }
- }
- if (this.hform.HTimes == '') {
- return {
- Message: "瀹為檯缁翠慨宸ユ椂涓嶅緱涓虹┖!",
- state: false
- }
- }
+ // 缂撳瓨褰撳墠椤甸潰閫夋嫨
+ const pages = getCurrentPages()
+ const currentPage = pages[pages.length - 1]
+ uni.setStorageSync(`${currentPage.route.split("/").pop()}_HSourceBillTypeCache`, {
+ HSourceBillTypeName: this.HMainSourceBillType,
+ HSourceBillType: this.hform.HMainSourceBillType
+ })
+ },
+ // 鏂板锛氭樉绀哄崟鎹垪琛ㄥ脊绐�
+ showBillList() {
+ this.$refs.billList.showPopup()
+ },
- return {
- Message: "",
- state: true
- }
- },
- addNew() {
- uni.redirectTo({
- url: './Sb_EquipRepairSendWorkBill?operationType=1'
- })
- },
- goBack() {
- uni.navigateBack()
- },
- checkBoxChangeHandler(index, e) {
- let cr = e.detail.value
- if (cr.length == 0) {
- this.HCheckFileList[index]["HDotCheckResult"] = false
- } else {
- this.HCheckFileList[index]["HDotCheckResult"] = true
- }
- },
- uploadFile(index) {
- console.log('filePath: ', this.attachmentInfo[index].filePath);
- // 閫氳繃涓存椂璺緞璇诲彇鏂囦欢
- uni.uploadFile({
- url: CommonUtils.getServerUrl() + "/Sb_EquipDotCheckBill/UploadFile",
- filePath: this.attachmentInfo[index].filePath,
- name: 'file',
- formData: {
- HBillNo: this.hform.HBillNo,
- HRemark: "",
- HUserName: getUserInfo()["Czymc"]
- },
- success: (uploadRes) => {
- CommonUtils.showTips({
- message: "涓婁紶鎴愬姛"
- })
- this.attachmentInfo[index].status = "涓婁紶鎴愬姛"
- },
- fail: (err) => {
- CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: `涓婁紶澶辫触: ${err}`
- })
- }
- })
- },
- delFile(index) {
- console.log('attachmentInfo: ', this.attachmentInfo[index]);
- uni.showModal({
- title: '鎻愮ず',
- content: '纭瑕佸垹闄� " ' + this.attachmentInfo[index].fileName + ' " 鍒犻櫎鍚庡皢涓嶅彲鎭㈠锛�',
- success: (res) => {
- if (res.confirm) {
- this.attachmentInfo.splice(index, 1)
- }
- },
- })
+ // 鏂板锛氳鍙栫紦瀛�
+ loadCache() {
+ const pages = getCurrentPages()
+ const currentPage = pages[pages.length - 1]
+ let HBillTypeCache = uni.getStorageSync(`${currentPage.route.split("/").pop()}_HSourceBillTypeCache`)
+ if (HBillTypeCache) {
+ this.HMainSourceBillType = HBillTypeCache.HSourceBillTypeName
+ this.hform.HMainSourceBillType = HBillTypeCache.HSourceBillType
+ }
+ },
- },
- handleUploadCallback(res) { // 鏂囦欢涓婁紶鍥炶皟
- console.log('file: ', res);
- let fileInfo = res.data[0]
- this.attachmentInfo.push({
- fileName: fileInfo.name,
- size: fileInfo.size,
- status: '绛夊緟涓婁紶',
- filePath: fileInfo.tempFilePath
- })
- },
- // 涓婁紶鏂囦欢
- fileUpload() {
- this.$refs.XeUpload.upload('file', {});
- },
- //鑾峰彇鐝鏁版嵁
- async getShiftList() {
- try {
- let res = await CommonUtils.doRequest2Async({
- url: '/Web/GetGy_ShiftsList_Json',
- data: {
- Shifts: "",
- }
- })
+ // 缁翠慨椤圭洰
+ async getRepairList() {
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: '/Gy_Repair/GetRepairList',
+ data: {
+ sWhere: '',
+ user: getUserInfo()["Czymc"]
+ }
+ })
- let {
- data,
- count,
- Message
- } = res.data
- if (count == 1) {
- this.HShiftsList = data
- } else {
- CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: Message
- })
- }
- } catch (err) {
- CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: err
- })
- }
- },
- //鑾峰彇浣跨敤閮ㄩ棬鏁版嵁
- async getHDeptList() {
- try {
- let res = await CommonUtils.doRequest2Async({
- url: '/Gy_Department/list',
- data: {
- sWhere: ` and HUSEORGID = ${uni.getStorageSync('OrganizationID')}`,
- user: uni.getStorageSync('HUserName'),
- Organization: uni.getStorageSync('Organization')
- }
- })
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ this.HRepairList = data
+ } else {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: `鑾峰彇妫�楠岄」鐩け璐�: ${Message}`
+ })
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: `鑾峰彇妫�楠岄」鐩け璐�: ${err}`
+ })
+ }
+ },
+ // 鍒犻櫎鏄庣粏
+ delDetail(item) {
- let {
- data,
- count,
- Message
- } = res.data
- if (count == 1) {
- this.HDeptList = data
- } else {
- CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: Message
- })
- }
- } catch (err) {
- CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: err
- })
- }
- },
- // 鑾峰彇鑱屽憳鏁版嵁
- async getEmpList() {
- try {
- let res = await CommonUtils.doRequest2Async({
- url: '/PublicPageMethod/UserList',
- data: {
- sWhere: " where 1=1",
- }
- })
+ },
+ // 鎻愪氦鏁版嵁鏈夋晥鎬ф牎楠�
+ ValidCheck() {
+ // 鏂板锛氭鏌ユ晠闅滅櫥璁板崟
+ if (this.hform.HMainSourceBillType != 1 && !this.hform.HMainSourceBillNo) {
+ return {
+ Message: "鏁呴殰鐧昏鍗曚笉寰椾负绌�!",
+ state: false
+ }
+ }
- let {
- data,
- count,
- Message
- } = res.data
- if (count == 1) {
- this.HEmpList = data
- } else {
- CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: Message
- })
- }
- } catch (err) {
- CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: err
- })
- }
- },
- // 鑾峰彇楠岃瘉椤圭洰鏁版嵁
- async getCheckProjList() {
- try {
- let res = await CommonUtils.doRequest2Async({
- url: '/Gy_RepairCheck/GetRepairCheckList',
- data: {
- sWhere: "",
- user: uni.getStorageSync('HUserName'),
- }
- })
+ if (this.hform.HMouldID == 0) {
+ return {
+ Message: "鏈綍鍏ュ櫒鍏蜂俊鎭紝璇峰厛褰曞叆鍣ㄥ叿淇℃伅!",
+ state: false
+ }
+ }
+ if (this.hform.HDeptID == 0) {
+ return {
+ Message: "閮ㄩ棬涓嶅緱涓虹┖!",
+ state: false
+ }
+ }
+ if (this.hform.HEmpID == 0) {
+ return {
+ Message: "缁翠慨浜轰笉寰椾负绌�!",
+ state: false
+ }
+ }
+ if (this.hform.HRepairID == 0) {
+ return {
+ Message: "缁翠慨椤圭洰涓嶅緱涓虹┖!",
+ state: false
+ }
+ }
+ if (this.hform.HManagerID == 0) {
+ return {
+ Message: "涓荤涓嶅緱涓虹┖!",
+ state: false
+ }
+ }
+ if (this.hform.HPlanTimes == '') {
+ return {
+ Message: "璁″垝缁翠慨宸ユ椂涓嶅緱涓虹┖!",
+ state: false
+ }
+ }
+ if (this.hform.HTimes == '') {
+ return {
+ Message: "瀹為檯缁翠慨宸ユ椂涓嶅緱涓虹┖!",
+ state: false
+ }
+ }
- let {
- data,
- count,
- Message
- } = res.data
- if (count == 1) {
- this.HRepairCheckList = data
- } else {
- CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: Message
- })
- }
- } catch (err) {
- CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: err
- })
- }
- },
- toScanCode() {
- MpaasScan.scanCode(cb => {
- this.hfrom.HBarCode = cb
- this.GetMessageByBarCode(cb)
- })
- },
- async GetMessageByBarCode(HBarCode) {
- try {
- let res = await CommonUtils.doRequest2Sync({
- url: "/Sc_PDA_MouldRepairCheckBill/txtHBarCode_KeyDown_List",
- data: {
- HBarCode: HBarCode,
- },
- })
+ return {
+ Message: "",
+ state: true
+ }
+ },
+ addNew() {
+ uni.redirectTo({
+ url: './Sc_MouldRepairSendWorkBill?operationType=1'
+ })
+ },
+ goBack() {
+ uni.navigateBack()
+ },
+ checkBoxChangeHandler(index, e) {
+ let cr = e.detail.value
+ if (cr.length == 0) {
+ this.HCheckFileList[index]["HDotCheckResult"] = false
+ } else {
+ this.HCheckFileList[index]["HDotCheckResult"] = true
+ }
+ },
+ //鑾峰彇浣跨敤閮ㄩ棬鏁版嵁
+ async getHDeptList() {
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: '/Gy_Department/list',
+ data: {
+ sWhere: ` and HUSEORGID = ${uni.getStorageSync('OrganizationID')}`,
+ user: uni.getStorageSync('HUserName'),
+ Organization: uni.getStorageSync('Organization')
+ }
+ })
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ this.HDeptList = data
+ } else {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: Message
+ })
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: err
+ })
+ }
+ },
+ // 鑾峰彇鑱屽憳鏁版嵁
+ async getEmpList() {
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: '/PublicPageMethod/UserList',
+ data: {
+ sWhere: " where 1=1",
+ }
+ })
- if (!res) {
- return
- }
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ this.HEmpList = data
+ } else {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: Message
+ })
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: err
+ })
+ }
+ },
+ // 鑾峰彇楠岃瘉椤圭洰鏁版嵁
+ async getCheckProjList() {
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: '/Gy_RepairCheck/GetRepairCheckList',
+ data: {
+ sWhere: "",
+ user: uni.getStorageSync('HUserName'),
+ }
+ })
- let {
- data,
- count,
- Message
- } = res.data
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ this.HRepairCheckList = data
+ } else {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: Message
+ })
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: err
+ })
+ }
+ },
+ toScanCode() {
+ MpaasScan.scanCode(cb => {
+ this.hform.HBarCode = cb
+ this.GetMessageByBarCode(cb)
+ })
+ },
+ async GetMessageByBarCode(HBarCode) {
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: "/Sc_PDA_MouldRepairCheckBill/txtHBarCode_KeyDown_List",
+ data: {
+ HBarCode: HBarCode,
+ },
+ })
- if (count == 1) {
- console.log('data: ', data);
- this.hform.HMouldID = data[0].hmainid
- this.hform.HMouldName = data[0].妯″叿鍚嶇О
- this.hform.HMouldSpec = data[0].妯″叿鍝佺被
- this.hform.HMouldModel = data[0].妯″叿鍨嬪彿
- this.hform.HQty = 1
+ if (!res) {
+ return
+ }
- this.enableEdit = false
- } else {
- CommonUtils.showTips({
- title: "娓╅Θ鎻愮ず",
- message: Message
- })
- }
+ let {
+ data,
+ count,
+ Message
+ } = res.data
- } catch (err) {
- CommonUtils.showTips({
- title: "娓╅Θ鎻愮ず",
- message: err
- })
- }
- },
- async GetItemByEquipFile() {
- try {
- let res = await CommonUtils.doRequest2Async({
- url: "/Web/GetItemByEquipFile",
- data: {
- "EquipProjectID": this.hform.HEquipID,
- "Type": "DJ",
- "HDate": this.hform.HBeginDate
- }
- })
+ if (count == 1) {
+ console.log('data: ', data);
+ this.hform.HMouldID = data[0].hmainid
+ this.hform.HMouldName = data[0].妯″叿鍚嶇О
+ this.hform.HMouldSpec = data[0].妯″叿鍝佺被
+ this.hform.HMouldModel = data[0].妯″叿鍨嬪彿
+ this.hform.HQty = 1
- let {
- data,
- Message,
- count
- } = res.data
- if (count == 1) {
- this.hform.HEquipDotCheckRuleInterID = data[0].鐐规瑙勭▼ID
- this.hform.HEquipDotCheckRuleInterNo = data[0].鐐规瑙勭▼鍗曞彿
- this.hform.HPlanNo = data[0].鐐规璁″垝鍗�
- this.hform.HPlanInterID = (data[0].鐐规璁″垝ID == null ? 0 : data[0].鐐规璁″垝ID) == "" ? 0 : data[0]
- .鐐规璁″垝ID
- this.hform.HPlanEntryID = (data[0].鐐规璁″垝瀛怚D == null ? 0 : data[0].鐐规璁″垝瀛怚D) == "" ? 0 : data[
- 0].鐐规璁″垝瀛怚D
+ this.enableEdit = false
+ } else {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: Message
+ })
+ }
- this.HCheckFileList = Array.from(data).map(item => {
- return {
- "HDotCheckItemID": item.HDotCheckItemID,
- "HDotCheckCode": item.鐐规椤圭洰浠g爜,
- "HDotCheckItem": item.鐐规椤圭洰,
- "HDotCheckPart": item.鐐规閮ㄤ綅,
- "HClaim": item.鍏蜂綋瑕佹眰,
- "HManagerID": item.璐熻矗浜篒D,
- "HManagerCode": item.璐熻矗浜轰唬鐮�,
- "HManagerName": item.璐熻矗浜哄悕绉�,
- "HSourceInterID": item.鐐规璁″垝ID == null ? 0 : item.鐐规璁″垝ID,
- "HSourceEntryID": item.鐐规璁″垝瀛怚D == null ? 0 : item.鐐规璁″垝瀛怚D,
- "HSourceBillNo": item.鐐规璁″垝鍗�,
- "HDotCheckItemClassID": 0,
- "HDotCheckItemClassName": "",
- "HDotCheckItemMethodID": 0,
- "HDotCheckItemMethodName": "",
- "HDotCheckResult": item.榛樿缁撹 == 1 ? true : false
- }
- })
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: err
+ })
+ }
+ },
+ async GetItemByEquipFile() {
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: "/Web/GetItemByEquipFile",
+ data: {
+ "EquipProjectID": this.hform.HEquipID,
+ "Type": "DJ",
+ "HDate": this.hform.HBeginDate
+ }
+ })
- } else {
- CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: `鑾峰彇鐐规瑙勭▼閿欒锛� ${Message}`
- })
- }
- } catch (err) {
- CommonUtils.showTips({
- title: '娓╅Θ鎻愮ず',
- message: `鑾峰彇鐐规瑙勭▼閿欒锛� ${err}`
- })
- }
- },
- radioChange({
- detail: {
- value
- }
- }) {
- this.hform.HCheckResult = value
- },
- async getMaxNum() {
- try {
- let res = await CommonUtils.doRequest2Async({
- url: "/Web/GetMAXNum",
- data: {
- "HBillType": this.HBillType
- }
- })
+ let {
+ data,
+ Message,
+ count
+ } = res.data
+ if (count == 1) {
+ this.hform.HEquipDotCheckRuleInterID = data[0].鐐规瑙勭▼ID
+ this.hform.HEquipDotCheckRuleInterNo = data[0].鐐规瑙勭▼鍗曞彿
+ this.hform.HPlanNo = data[0].鐐规璁″垝鍗�
+ this.hform.HPlanInterID = (data[0].鐐规璁″垝ID == null ? 0 : data[0].鐐规璁″垝ID) == "" ? 0 : data[0]
+ .鐐规璁″垝ID
+ this.hform.HPlanEntryID = (data[0].鐐规璁″垝瀛怚D == null ? 0 : data[0].鐐规璁″垝瀛怚D) == "" ? 0 : data[
+ 0].鐐规璁″垝瀛怚D
- let {
- count,
- data,
- Message
- } = res.data
- console.log('data: ', data);
- this.hform.HInterID = data[0]["HInterID"]
- this.hform.HBillNo = data[0]["HBillNo"]
- } catch (err) {
- CommonUtils.showTips({
- title: "娓╅Θ鎻愮ず",
- message: "鑾峰彇鍗曟嵁淇℃伅寮傚父: " + err
- })
- }
- },
- async submit() {
- let valid = this.ValidCheck()
- if (!valid.state) {
- CommonUtils.showTips({
- message: valid.Message
- })
- return
- }
+ this.HCheckFileList = Array.from(data).map(item => {
+ return {
+ "HDotCheckItemID": item.HDotCheckItemID,
+ "HDotCheckCode": item.鐐规椤圭洰浠g爜,
+ "HDotCheckItem": item.鐐规椤圭洰,
+ "HDotCheckPart": item.鐐规閮ㄤ綅,
+ "HClaim": item.鍏蜂綋瑕佹眰,
+ "HManagerID": item.璐熻矗浜篒D,
+ "HManagerCode": item.璐熻矗浜轰唬鐮�,
+ "HManagerName": item.璐熻矗浜哄悕绉�,
+ "HSourceInterID": item.鐐规璁″垝ID == null ? 0 : item.鐐规璁″垝ID,
+ "HSourceEntryID": item.鐐规璁″垝瀛怚D == null ? 0 : item.鐐规璁″垝瀛怚D,
+ "HSourceBillNo": item.鐐规璁″垝鍗�,
+ "HDotCheckItemClassID": 0,
+ "HDotCheckItemClassName": "",
+ "HDotCheckItemMethodID": 0,
+ "HDotCheckItemMethodName": "",
+ "HDotCheckResult": item.榛樿缁撹 == 1 ? true : false
+ }
+ })
- try {
- let oMain = JSON.stringify(this.hform);
- this.HDetailList[0].HManagerID = this.hform.HManagerID
- this.HDetailList[0].HRepairID = this.hform.HRepairID
- let sSubStr = JSON.stringify(this.HDetailList);
- let sMainSub = oMain + ';' + sSubStr + `;${this.operationType}` + ';' + getUserInfo()[
- 'Czymc'];
- let res = await CommonUtils.doRequest2Sync({
- url: "/Sc_MouldRepairSendWorkBill/AddBill",
- data: {
- "sMainSub": sMainSub
- },
- method: "POST"
- })
+ } else {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: `鑾峰彇鐐规瑙勭▼閿欒锛� ${Message}`
+ })
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: `鑾峰彇鐐规瑙勭▼閿欒锛� ${err}`
+ })
+ }
+ },
+ radioChange({
+ detail: {
+ value
+ }
+ }) {
+ this.hform.HCheckResult = value
+ },
+ async getMaxNum() {
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: "/Web/GetMAXNum",
+ data: {
+ "HBillType": this.HBillType
+ }
+ })
- if (!res) {
- return
- }
+ let {
+ count,
+ data,
+ Message
+ } = res.data
+ console.log('data: ', data);
+ this.hform.HInterID = data[0]["HInterID"]
+ this.hform.HBillNo = data[0]["HBillNo"]
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: "鑾峰彇鍗曟嵁淇℃伅寮傚父: " + err
+ })
+ }
+ },
+ async submit() {
+ let valid = this.ValidCheck()
+ if (!valid.state) {
+ CommonUtils.showTips({
+ message: valid.Message
+ })
+ return
+ }
- let {
- count,
- Message
- } = res.data
- if (count == 1) {
- uni.showModal({
- title: '鎻愮ず',
- content: res.data.Message + '銆傛槸鍚︾户缁柊澧烇紵(鐐瑰嚮鍙栨秷杩斿洖涓婄骇椤甸潰)',
- success: (res) => {
- if (res.confirm) {
- console.log('鐢ㄦ埛鐐瑰嚮纭畾');
- uni.redirectTo({
- url: './Sb_EquipRepairSendWorkBill?operationType=1'
- })
- } else if (res.cancel) {
- console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
- setTimeout(() => {
- uni.navigateBack();
- }, 50)
- }
- }
- });
- } else {
- CommonUtils.showTips({
- title: "娓╅Θ鎻愮ず",
- message: "鎻愪氦鍗曟嵁澶辫触: " + Message
- })
- }
+ try {
+ let oMain = JSON.stringify(this.hform);
+ this.HDetailList[0].HManagerID = this.hform.HManagerID
+ this.HDetailList[0].HRepairID = this.hform.HRepairID
+ let sSubStr = JSON.stringify(this.HDetailList);
+ let sMainSub = oMain + ';' + sSubStr + `;${this.operationType}` + ';' + getUserInfo()[
+ 'Czymc'];
+ let res = await CommonUtils.doRequest2Sync({
+ url: "/Sc_MouldRepairSendWorkBill/AddBill",
+ data: {
+ "sMainSub": sMainSub
+ },
+ method: "POST"
+ })
+ if (!res) {
+ return
+ }
- } catch (err) {
- CommonUtils.showTips({
- title: "娓╅Θ鎻愮ず",
- message: "鎻愪氦鍗曟嵁澶辫触: " + err
- })
- }
- }
- },
- onLoad(e) {
- console.log('e: ', e);
- if (!e.operationType) {
- this.operationType = 1
- } else {
- this.operationType = e.operationType
- }
+ let {
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ uni.showModal({
+ title: '鎻愮ず',
+ content: res.data.Message + '銆傛槸鍚︾户缁柊澧烇紵(鐐瑰嚮鍙栨秷杩斿洖涓婄骇椤甸潰)',
+ success: (res) => {
+ if (res.confirm) {
+ console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ uni.redirectTo({
+ url: './Sc_MouldRepairSendWorkBill?operationType=1'
+ })
+ } else if (res.cancel) {
+ console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+ setTimeout(() => {
+ uni.navigateBack();
+ }, 50)
+ }
+ }
+ });
+ } else {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: "鎻愪氦鍗曟嵁澶辫触: " + Message
+ })
+ }
- if (this.operationType == 1) {
- // 鏂板
- this.getMaxNum()
- } else if (this.operationType == 2) {
- // 澶嶅埗
- } else if (this.operationType == 3) {
- // 缂栬緫
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: "鎻愪氦鍗曟嵁澶辫触: " + err
+ })
+ }
+ }
+ },
+ onLoad(e) {
+ console.log('e: ', e);
+ if (!e.operationType) {
+ this.operationType = 1
+ } else {
+ this.operationType = e.operationType
+ }
- } else if (this.operationType == 4) {
- // 娴忚
+ if (this.operationType == 1) {
+ // 鏂板
+ this.getMaxNum()
+ } else if (this.operationType == 2) {
+ // 澶嶅埗
+ } else if (this.operationType == 3) {
+ // 缂栬緫
- }
+ } else if (this.operationType == 4) {
+ // 娴忚
- this.getHDeptList()
- this.getEmpList()
- this.getCheckProjList()
- this.getRepairList()
- },
- onReady() {
- const query = uni.createSelectorQuery().in(this)
- query.select("#buttons")
- .boundingClientRect()
- .select("#tabs")
- .boundingClientRect()
- .exec(res => {
- this.btnTop = Math.floor(res[0].top)
- this.tabsBottom = Math.ceil(res[1].bottom)
- })
- }
- }
+ }
+
+ this.getHDeptList()
+ this.getEmpList()
+ this.getCheckProjList()
+ this.getRepairList()
+ this.loadCache() // 鏂板锛氬姞杞界紦瀛�
+
+ // 鏂板锛氱洃鍚崟鎹�夋嫨瀹屾垚浜嬩欢
+ uni.$on('BillSelectComplete', (e) => {
+ console.log("鎺ユ敹鍒扮殑娑堟伅: ", e)
+ this.hform.HMainSourceInterID = e.HInterID
+ this.hform.HMainSourceBillNo = e.HBillNo
+ this.hform.HMainSourceEntryID = e.HEntryID
+ this.hform.HMouldID = e.HMouldID
+ this.hform.HMouldName = e.HMouldName
+ this.hform.HMouldSpec = e.HMouldSpec
+ this.hform.HMouldModel = e.HMouldModel
+ // 濡傛灉閫夋嫨鍗曟嵁鏃跺甫浜嗘潯鐮侊紝涔熻缃潯鐮�
+ if (e.HBarCode) {
+ this.hform.HBarCode = e.HBarCode
+ }
+ this.$refs.billList.exit()
+ })
+ },
+ onUnload() {
+ uni.$off('BillSelectComplete') // 鏂板锛氱Щ闄や簨浠剁洃鍚�
+ },
+ onReady() {
+ const query = uni.createSelectorQuery().in(this)
+ query.select("#buttons")
+ .boundingClientRect()
+ .select("#tabs")
+ .boundingClientRect()
+ .exec(res => {
+ this.btnTop = Math.floor(res[0].top)
+ this.tabsBottom = Math.ceil(res[1].bottom)
+ })
+ }
+ }
</script>
<style lang="scss" scoped>
- @import "@/pages/MJGL/style/MJBillStyle.scss"
+ @import "@/pages/MJGL/style/MJBillStyle.scss";
+
+ .picker-overlay {
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ z-index: 1;
+ }
+
+ .icon-wrapper {
+ background-color: #3A78FF;
+ width: 52rpx;
+ height: 52rpx;
+ border-radius: 100%;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ .uni-icons {
+ color: #fff !important;
+ }
+ }
+
+ .icon-wrapper[disabled] {
+ background-color: rgba(228, 228, 228, 1);
+ pointer-events: none;
+ touch-action: none;
+ }
+
+ .required {
+ position: relative;
+ }
+
+ .required::after {
+ content: "*";
+ position: relative;
+ color: red;
+ left: 0;
+ top: 0;
+ font-size: inherit;
+ }
</style>
\ No newline at end of file
--
Gitblit v1.9.1