From 3ad83d1fb26948c17ffeab33fb3435866dcd3350 Mon Sep 17 00:00:00 2001 From: 南骏 池 <chiffly@163.com> Date: 星期四, 17 四月 2025 14:45:56 +0800 Subject: [PATCH] 1.巡检检验 --- H5/IPQC_XJ/List.aspx.cs | 14 H5/IPQC_XJ/Add.aspx.cs | 14 H5/IPQC_XJ/List.aspx | 136 +++++++ H5/IPQC_XJ/Add.aspx | 341 ++++++++++++++++++ H5/Js/IPQC_XJ/Add.js | 438 ++++++++++++++++++++++++ H5/Js/IPQC_XJ/List.js | 120 ++++++ 6 files changed, 1,063 insertions(+), 0 deletions(-) diff --git a/H5/IPQC_XJ/Add.aspx b/H5/IPQC_XJ/Add.aspx new file mode 100644 index 0000000..56f3478 --- /dev/null +++ b/H5/IPQC_XJ/Add.aspx @@ -0,0 +1,341 @@ +锘�<%@ Page Title="" Language="C#" MasterPageFile="~/Mst.master" AutoEventWireup="true" %> + +<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> + <style> + .bg-info { + background-color: #fff; + } + + .custom-title { + margin-right: 4px; + vertical-align: middle; + } + + .si-status__right-btns { + flex: 1; + display: flex; + align-items: center; + padding-left: 0.16rem; + background: #e3edf7; + align-items: center; + width: 100%; + gap: 10px; /* 鎸夐挳闂磋窛 */ + padding: 0 8px; /* 宸﹀彸鍐呰竟璺� */ + } + + /* 鎸夐挳鏍峰紡 */ + .status-btn { + flex: 1; /* 绛夊垎鍓╀綑绌洪棿 */ + min-width: 0; /* 闃叉鍐呭婧㈠嚭 */ + font-size: 0.25rem; + border-radius: 4px; + } + + </style> +</asp:Content> +<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server"> +<%-- <van-nav-bar + :title=formData.releaseNo + left-text="杩斿洖" + left-arrow + @click-left="GetBack1()" + ></van-nav-bar>--%> + <van-nav-bar + left-text="杩斿洖" + left-arrow + @click-left="GetBack1" + @click-right="showButton = true" + > + <template #title> + <div class="inline-title"> + <span class="release-no">{{ formData.releaseNo }}</span> + <van-tag round plain v-if="formData.fCheckResu === 'N:涓嶅悎鏍�'" type="danger">涓嶅悎鏍�</van-tag> + <van-tag round plain v-else-if="formData.fCheckResu === 'W:鏈煡'" type="warning">鏈煡</van-tag> +<%-- <van-tag round plain v-else-if="formData.fCheckResu === '鏈楠�'" type="warning">鏈楠�</van-tag>--%> + <van-tag round plain v-else-if="formData.fCheckResu === 'I:杩涜涓�'" type="warning">杩涜涓�</van-tag> + <van-tag round plain v-else-if="formData.fCheckResu === 'Y:鍚堟牸'" type="success">鍚堟牸</van-tag> + <van-tag round plain v-else type="danger">寮傚父鐘舵��</van-tag> +<%-- <van-tag round plain + :type="formData.fCheckResu === '涓嶅悎鏍�' ? 'danger' : + formData.fCheckResu === '妫�楠屼腑' ? 'warning' : + formData.fCheckResu === '鏈楠�' ? 'warning' : + formData.fCheckResu === '鍚堟牸' ? 'success' :'danger'" + class="status-tag" + > + {{ formData.fCheckResu }} + </van-tag>--%> + </div> + </template> + <template #right> + <van-icon name="ellipsis" /> + </template> + </van-nav-bar> + <div class="content-wrapper"> + <van-cell-group > + <!-- 鑷畾涔夊瓧娈电敤浜庢樉绀轰袱涓爣璇� --> +<%-- <van-field label="鏍囪瘑" colon="true" readonly> + <template #input> + <div class="checkbox-container"> + 鎬ユ枡<van-checkbox v-model="formData.urgentFlag" disabled></van-checkbox> + </div> + </template> + </van-field>--%> + <van-field label="鎸囦护宸ュ崟" colon="true" v-model="formData.lotNo" readonly ></van-field> +<%-- <van-field label="鍒涘缓鏃堕棿" colon="true" v-model="formData.createDate" readonly ></van-field> + <van-field label="鍒涘缓浜�" colon="true" v-model="formData.createBy" readonly ></van-field>--%> + <van-field label="鐗╂枡缂栫爜" colon="true" v-model="formData.itemNo" readonly ></van-field> + <van-field label="鐗╂枡鍚嶇О" colon="true" v-model="formData.itemName" readonly ></van-field> + <van-field label="鐢熶骇杞﹂棿" colon="true" v-model="formData.departmentName" readonly ></van-field> + <van-field label="鐢熶骇绾垮埆" colon="true" v-model="formData.xtName" readonly ></van-field> + <van-field + label="瑙勬牸鍨嬪彿" + colon + v-model="formData.itemModel" + readonly + class="wrap-field"> + <template #input> + <div class="wrap-content">{{ formData.itemModel }}</div> + </template> + </van-field> +<%-- <van-field label="鏁伴噺" colon="true" v-model="formData.fcovertQty" readonly ></van-field>--%> + <van-field label="涓嶅悎鏍兼弿杩�" v-if='formData.fCheckResu == "N:涓嶅悎鏍�"' colon v-model="remarks" readonly class="wrap-field"> + <template #input> + <div class="wrap-content">{{ remarks }}</div> + </template> + <template #button> + <van-tag type="primary" style="font-size:15px" @click="updateRemarks(formData.guid)">杈撳叆</van-tag> + </template> + </van-field> + <van-dialog v-model="showDialog" title="涓嶅悎鏍兼弿杩�" :show-cancel-button="false" @confirm="remarksConfirm"> + <van-field + v-model="remarks" + rows="5" + autosize + type="textarea" + maxlength="500" + placeholder="璇疯緭鍏ヤ笉鍚堟牸鎻忚堪" + show-word-limit + /> + </van-dialog> + </van-cell-group> + </div> + <!-- 鏂瑰紡 --> + <div class="uploader-container"> + <!-- 浣跨敤 field 鏍峰紡鍖呰9 --> + <div class="van-cell van-field" style="padding: 10px 16px"> + <!-- 宸︿晶鏍囩 --> + <div class="van-field__label" style="width: 90px">鍥剧墖涓婁紶</div> + + <!-- 鍙充晶涓婁紶鍖哄煙 --> + <div class="van-field__body" style="flex: 1"> + <van-uploader + v-model="fileList" + :after-read="afterRead" + style="padding: 8px 0" + @delete="handleDelete" + /> + </div> + </div> +</div> +<%-- <van-button :loading="ttrre" type="info" loading-text="鍔犺浇涓�..." v-if="!isShowTable && formData.fsubmit == 0" @click="submit">妫�楠屾彁浜�</van-button> + <van-button type="danger" v-if="!isShowTable && formData.fsubmit == 0" @click="removeXJ">閲嶆柊鍔犺浇椤圭洰</van-button>--%> +<%-- <van-button :loading="ttrre" type="info" loading-text="鍔犺浇涓�..." @click="submit">妫�楠屾彁浜�</van-button> + <van-button type="danger" @click="removeXJ">鍒锋柊閲嶅仛</van-button>--%> + <van-tabs color="#000" title-active-color="#0283EF" style="padding-bottom: 120px;"> + <van-tab title="妫�楠岄」鐩�" class="mySolid font"> + <van-row type="flex" justify="center"> + <van-col span="10" center class="text-left padding-left">妫�楠岄」鐩�</van-col> + <van-col span="8">宸叉鏁�/鎶芥鏁�</van-col> + <van-col span="6">妫�楠岀粨鏋�</van-col> + </van-row> + <van-row v-for="(item,index) in tableData" :key="index" type="flex" justify="left"> + + <van-col span="10" center class="text-left padding-left" > + <van-cell center + center :title="item.fcheckItem" @click="togglePopup(index)"></van-cell> + </van-col> + <van-col span="8" > + <van-cell center + center :title="item.fenterQty + '/' + item.checkQyt" @click="togglePopup(index)"></van-cell> + </van-col> + <van-col center span="6" > + <van-cell center + center v-if="item.fcheckResu === 'Y:鍚堟牸'"> + <van-tag round plain type="success" style="font-size:15px" @click="togglePopup(index)">鍚堟牸</van-tag> + </van-cell> + <van-cell center + center v-else-if="item.fcheckResu === 'N:涓嶅悎鏍�'"> + <van-tag round plain type="danger" style="font-size:15px" @click="togglePopup(index)">涓嶅悎鏍�</van-tag> + </van-cell> + <van-cell center + center v-else > + <van-tag round plain type="warning" style="font-size:15px" @click="togglePopup(index)">杩涜涓�</van-tag> + </van-cell> + </van-col> + + </van-row> + </van-tab> + </van-tabs> + + <van-popup + v-model="show" + closeable + overlay ="true" + round + close-icon="close" + class="van-icon-popup" + position="right" + :style="{ width: '100%', + height: '100%' , + boxShadow: '-2px 0 12px rgba(0, 0, 0, 0.1)' + }" + @click-close-icon ="init" + > + <!-- 寮瑰嚭鍐呭 --> + <div class="content-wrapper-jymx"> + <van-tabs v-model="tabActive" sticky color="#000" round ellipsis="false" @click="handleTabClick"> + <van-tab v-for="(itm,index) in tableData" round :key="index" :name="index" > + <template #title > {{itm.fcheckItem}} <van-icon v-if="itm.fenterQty >=itm.checkQyt" name="success" color="#1989fa" class="badge-icon" ></van-icon></template> + <template> + <van-cell-group> + <van-field label="椤圭洰鍚嶇О" colon="true" v-model="jymxData.fcheckItem" readonly ></van-field> + <van-field label="瑙勬牸瑕佹眰" colon="true" v-model="jymxData.fspecRequ" readonly ></van-field> + <van-field label="妫�楠屽伐鍏�" colon="true" v-model="jymxData.fcheckTool" readonly ></van-field> + <van-field label="妫�楠屾暟" colon="true" v-model="jymxData.checkQyt" readonly ></van-field> + <van-field label="涓嬮檺" colon="true" v-model="jymxData.fdownAllow" readonly ></van-field> + <van-field label="鏍囧噯鍊�" colon="true" v-model="jymxData.fstand" readonly ></van-field> + <van-field label="涓婇檺" colon="true" v-model="jymxData.fupAllow" readonly ></van-field> + <%--<van-field label="AC鏁�" colon="true" v-model="jymxData.facQty" readonly ></van-field>--%> + <van-field label="RE鏁�" colon="true" v-model="jymxData.freQty" readonly ></van-field> + <van-field label="鏍锋湰鏁�" colon="true" v-model="jymxData.ybsl" readonly ></van-field> + <%--<van-field label="棰勮缁撴灉" colon="true" v-model="jymxData.result" readonly ></van-field>--%> + <%--<van-field label="缁撴灉褰曞叆" colon="true" v-model="resultValue" placeholder="璇疯緭鍏K-鏁板瓧鎴朜G-鏁板瓧"></van-field>--%> + + <van-field label="妫�娴嬬粨鏋�" colon="true" readonly > + <template #input> + <van-tag round plain v-if="jymxData.fcheckResu === 'Y:鍚堟牸'" type="success">鍚堟牸</van-tag> + <van-tag round plain v-else-if="jymxData.fcheckResu === 'N:涓嶅悎鏍�'" type="danger">涓嶅悎鏍�</van-tag> + <van-tag round plain v-else type="warning">杩涜涓�</van-tag> + </template> + </van-field> + + </template> + <template> + <!-- 杈撳叆妗� --> + <div v-if="jymxData.fdownAllow !== '' && jymxData.fupAllow !== ''" class="si-input-box"> + <div class="si-input__left"> + <span class="si-input__label">妫�楠屽�艰緭鍏�</span> + </div> + <div v-if="jymxData.fdownAllow !== '' && jymxData.fupAllow !== ''" class="si-status__right"> + <van-field + :ref="'inputValue' + tabActive" + v-model="inputValue" + placeholder="璇疯緭鍏ユ楠屽��" + :border="false" + class="si-input-field" + @input="handleNumberInput3" + @keyup.enter.native="getInputJYZ" + /> + </div> + </div> + <!-- 杈撳叆妗� --> + <div v-else class="si-input-box"> + <div class="si-input__left"> + <span class="si-input__label">妫�楠屽�艰緭鍏�</span> + </div> + <div class="si-status__right-btns"> <!-- 淇敼瀹瑰櫒绫诲悕 --> + <van-button + type="primary" + size="small" + class="status-btn" + @click="handleQualified(true)" + > + 鍚堟牸 + </van-button> + <van-button + type="danger" + size="small" + class="status-btn" + @click="handleQualified(false)" + > + 涓嶅悎鏍� + </van-button> + </div> + </div> + </template> + <van-row type="flex" justify="center"> + <van-col span="6">椤圭洰</van-col> + <van-col span="6">妫�楠屽��</van-col> + <van-col span="6">鍒ゅ畾鏍囧織</van-col> + <van-col span="6">鎿嶄綔</van-col> + </van-row> + <van-row v-for="(item,index) in tableMxData.list" :key="index" type="flex" justify="left"> + + <van-col span="6" > + <van-cell center + center :title="item.fcheckItem" @click="togglePopup(index)"></van-cell> + </van-col> + <van-col span="6" > + <van-cell center + center :title="item.fcheckResu"></van-cell> + </van-col> + <van-col center span="6" > + <van-cell center + center v-if="item.fstand === '鈭�'"> + <van-tag round plain type="success" style="font-size:15px">鍚堟牸</van-tag> + </van-cell> + <van-cell center + center v-else-if="item.fstand === '脳'"> + <van-tag round plain type="danger" style="font-size:15px">涓嶅悎鏍�</van-tag> + </van-cell> + <van-cell center + center v-else > + <van-tag round plain type="warning" style="font-size:15px">杩涜涓�</van-tag> + </van-cell> + </van-col> + <van-col center span="6" > + <van-tag type="danger" style="font-size:15px" @click="deleteDetail13(item.guid)">鍒犻櫎</van-tag> + </van-col> + </van-row> + + </van-tab> + </van-tabs> + </div> + </van-popup> + + + + <!-- 寮瑰嚭鑿滃崟 --> + <van-popup + v-model="showButton" + position="bottom" + :style="{ width: '100%' }" + > + <div style="padding: 12px;"> + <van-button + block + type="info" + @click="submit" + :loading="ttrre" + loading-text="鍔犺浇涓�..." + >妫�楠屾彁浜�</van-button> + + <van-button + block + type="danger" + @click="removeXJ" + style="margin-top: 8px;" + >鍒锋柊閲嶅仛</van-button> + </div> + </van-popup> + + + +</asp:Content> +<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder3" Runat="Server"> + <comloading v-if="isLoading"></comloading> + <%--<comback ></comback>--%> +</asp:Content> +<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server"> + <script src="../Js/IPQC_XJ/Add.js?<%=1 %>"></script> +</asp:Content> diff --git a/H5/IPQC_XJ/Add.aspx.cs b/H5/IPQC_XJ/Add.aspx.cs new file mode 100644 index 0000000..0bbf74c --- /dev/null +++ b/H5/IPQC_XJ/Add.aspx.cs @@ -0,0 +1,14 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +public partial class H5_Scbl : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } +} \ No newline at end of file diff --git a/H5/IPQC_XJ/List.aspx b/H5/IPQC_XJ/List.aspx new file mode 100644 index 0000000..3b175d6 --- /dev/null +++ b/H5/IPQC_XJ/List.aspx @@ -0,0 +1,136 @@ +锘�<%@ Page Title="" Language="C#" MasterPageFile="~/Mst.master" AutoEventWireup="true" %> + +<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> + <style> + .bg-info { + background-color: #fff; + } + .van-search { + padding: 10px; + background: #f7f8fa; + } + .van-search__action { + color: #1989fa; /* 璁剧疆瀛椾綋棰滆壊涓鸿摑鑹� */ + } + + .van-cell__title { + text-align: left; + } + + </style> + +</asp:Content> +<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server"> + <van-nav-bar + title="宸℃妫�楠�" + left-text="杩斿洖" + left-arrow + @click-left="GoBack()" + ></van-nav-bar> + <van-search + v-model="searchKeyword" + placeholder="杈撳叆妫�楠屽崟鍙�/鐗╂枡/宸ュ崟绛夋悳绱�" + show-action + @search="handleSearch" + > + <template #action> + <%--<van-tag plain round type="primary" @click="handleSearch">鎼滅储</van-tag>--%> + <div @click="handleSearch">鎼滅储</div> + </template> + </van-search> + <div class ="content-wrapper"> +<%-- <van-tabs v-model="current" @click="onClickTab"> + <van-tab title="鏈楠�">--%> + <van-pull-refresh v-model="refreshing" @refresh="onRefresh"> + <van-list + v-model="loading" + :finished="finished" + finished-text="娌℃湁鏇村浜�" + @load="onLoad"> + <van-cell v-for="item in data" :key="item"> + <div> + <van-cell-group> + <van-cell :title="item.releaseNo" is-link :url="'Add.aspx?id='+item.guid+'&lotNo='+item.lotNo+'&releaseNo='+item.releaseNo" ></van-cell> + <van-field label="鎸囦护宸ュ崟" colon="true" v-model="item.lotNo" readonly ></van-field> + <!-- 鑷畾涔夊瓧娈电敤浜庢樉绀轰袱涓爣璇� --> +<%-- <van-field label="鏍囪瘑" colon="true" readonly > + <template #input> + <div class="checkbox-container"> + 鎬ユ枡<van-checkbox v-model="item.urgentFlag" disabled></van-checkbox> + </div> + </template> + </van-field>--%> +<%-- <van-checkbox v-model="item.ftype" disabled>濮斿</van-checkbox> + <van-checkbox v-model="item.urgentFlag == 1" disabled>鎬ユ枡鏍囪瘑</van-checkbox>--%> + <%--<van-field label="鍒涘缓鏃堕棿" colon="true" v-model="item.createDate" readonly ></van-field> + <van-field label="鍒涘缓浜�" colon="true" v-model="item.createBy" readonly ></van-field>--%> + <van-field label="鐗╂枡缂栫爜" colon="true" v-model="item.itemNo" readonly ></van-field> + <van-field label="鐗╂枡鍚嶇О" colon="true" v-model="item.itemName" readonly ></van-field> + <%--<van-field label="瑙勬牸鍨嬪彿" colon="true" v-model="item.itemModel" readonly ></van-field>--%> + <van-field label="鐢熶骇杞﹂棿" colon="true" v-model="item.departmentName" readonly ></van-field> + <van-field label="鐢熶骇绾垮埆" colon="true" v-model="item.xtName" readonly ></van-field> + <%--<van-field label="妫�楠屼汉" colon="true" v-model="item.fcheckBy" readonly ></van-field>--%> + + <van-field label="妫�娴嬬粨鏋�" colon="true" readonly > + <template #input> + <van-tag round plain v-if="item.fCheckResu === 'N:涓嶅悎鏍�'" type="danger">涓嶅悎鏍�</van-tag> + <van-tag round plain v-else-if="item.fCheckResu === 'I:杩涜涓�'" type="warning">杩涜涓�</van-tag> + <van-tag round plain v-else-if="item.fCheckResu === 'W:鏈煡'" type="warning">鏈煡</van-tag> + <van-tag round plain v-else-if="item.fCheckResu === ''" type="warning">鏈煡</van-tag> + <van-tag round plain v-else-if="item.fCheckResu === 'Y:鍚堟牸'" type="success">鍚堟牸</van-tag> + <van-tag round plain v-else type="danger">寮傚父鐘舵��</van-tag> + </template> + </van-field> + </van-cell-group> + </div> + </van-cell> + </van-list> + </van-pull-refresh> +<%-- </van-tab> + <van-tab title="宸叉楠�">--%> + <%--<van-pull-refresh v-model="refreshing" @refresh="onRefresh"> + <van-list + v-model="loading" + :finished="finished" + finished-text="娌℃湁鏇村浜�" + @load="onLoad"> + <van-cell v-for="item in data" :key="item"> + <div> + <van-cell-group> + <van-cell :title="item.releaseNo" is-link :url="'Add.aspx?id='+item.guid+'&lotNo='+item.lotNo+'&releaseNo='+item.releaseNo" ></van-cell> + <van-field label="鍒拌揣鍗曞彿" colon="true" v-model="item.lotNo" readonly ></van-field> + <van-field label="鏍囪瘑" colon="true" readonly> + <template #input> + <div class="checkbox-container"> + 濮斿<van-checkbox v-model="item.ftype" disabled></van-checkbox> + 鎬ユ枡<van-checkbox v-model="item.urgentFlag" disabled></van-checkbox> + </div> + </template> + </van-field>--%> + <%--<van-checkbox v-model="item.ftype" disabled>濮斿</van-checkbox> + <van-checkbox v-model="item.urgentFlag == 1" disabled>鎬ユ枡鏍囪瘑</van-checkbox>--%> +<%-- <van-field label="鍒涘缓鏃堕棿" colon="true" v-model="item.createDate" readonly ></van-field> + <van-field label="鍒涘缓浜�" colon="true" v-model="item.createBy" readonly ></van-field> + <van-field label="鐗╂枡缂栫爜" colon="true" v-model="item.itemNo" readonly ></van-field> + <van-field label="鐗╂枡鍚嶇О" colon="true" v-model="item.itemName" readonly ></van-field> + <van-field label="瑙勬牸鍨嬪彿" colon="true" v-model="item.itemModel" readonly ></van-field> + <van-field label="鏁伴噺" colon="true" v-model="item.fcovertQty" readonly ></van-field> + <van-field label="渚涘簲鍟�" colon="true" v-model="item.suppName" readonly ></van-field> + <van-field label="妫�楠屼汉" colon="true" v-model="item.fcheckBy" readonly ></van-field> + <van-field label="妫�娴嬬粨鏋�" colon="true" v-model="item.fCheckResu" readonly ></van-field> + </van-cell-group> + </div> + </van-cell> + </van-list> + </van-pull-refresh>--%> +<%-- </van-tab> + </van-tabs>--%> + </div> +</asp:Content> +<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder3" Runat="Server"> + <comloading v-if="isLoading"></comloading> + <%--<comback ></comback>--%> +</asp:Content> +<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server"> + <script src="../Js/IPQC_XJ/List.js?<%=11 %>"></script> +</asp:Content> diff --git a/H5/IPQC_XJ/List.aspx.cs b/H5/IPQC_XJ/List.aspx.cs new file mode 100644 index 0000000..0bbf74c --- /dev/null +++ b/H5/IPQC_XJ/List.aspx.cs @@ -0,0 +1,14 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +public partial class H5_Scbl : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } +} \ No newline at end of file diff --git a/H5/Js/IPQC_XJ/Add.js b/H5/Js/IPQC_XJ/Add.js new file mode 100644 index 0000000..5692543 --- /dev/null +++ b/H5/Js/IPQC_XJ/Add.js @@ -0,0 +1,438 @@ +锘縱ar vm = new Vue({ + el: '#app', + data: function () { + return { + isLoading: false, + userInfo: { + "loginGuid": '', + "loginAccount": '', + }, + formData: { + id: "", + releaseNo: "", + createBy: "", + createDate: "", + lotNo: "", + itemNo: "", + billNo: "", + fcovertQty: "", + detailMem: "", + taskNo: "", + fcheckResu: "", + boardModel: "", + planQty: "", + mocode: "", + boardStyle: "" + }, + isShowTable: false, + tableData: [],//杩斿洖鐨勬楠岄」鐩� + jymxData: [],//灞曠ず鐨勬楠岄」鐩� + remarks:'',//涓嶅悎鏍兼弿杩� + okNum:'',//鍚堟牸鏁� + ngNum: '',//涓嶅悎鏍兼暟 + ttrre: false, + show: false,//鏄庣粏闈㈡澘 + tableMxData: [], + tabActive: 0, + inputValue: '',//鐗瑰緛鍊艰緭鍏� + resultValue: '',//妫�楠岀粨鏋滃綍鍏� + showButton: false,//鍙充笂瑙掕彍鍗曡Е鍙� + okValue: '',//OK-鏁伴噺 + ngValue: '',//NG-鏁伴噺 + showDialog: false,//涓嶈壇琛ㄨ堪杈撳叆妗� + //鍥剧墖涓婁紶妗� + fileList: [ + + ], + } + }, + mounted() { + var that = this; + this.userInfo = { + loginGuid: this.GetLoginInfor().loginGuid, + loginAccount: this.GetLoginInfor().loginAccount, + }; + this.formData.id = this.Request("id"), + this.formData.releaseNo = this.Request("releaseNo"); + this.formData.lotNo = this.Request("lotNo"); + this.init(); + }, + methods: { + // 杈撳叆杩囨护 + handleNumberInput1(value) { + // 鍘婚櫎闈炴暟瀛楀苟纭繚棣栦綅涓嶄负0锛堥櫎闈炴槸鍗曠嫭鐨�0锛� + this.okValue = value.replace(/[^\d]/g, '') // 鍘婚櫎闈炴暟瀛楀瓧绗� + .replace(/^0+(?!$)/, ''); // 鍘婚櫎寮�澶寸殑0锛岄櫎闈炴暣涓瓧绗︿覆鏄�0 + }, + handleNumberInput2(value) { + // 鍘婚櫎闈炴暟瀛楀苟纭繚棣栦綅涓嶄负0锛堥櫎闈炴槸鍗曠嫭鐨�0锛� + this.ngValue = value.replace(/[^\d]/g, '') // 鍘婚櫎闈炴暟瀛楀瓧绗� + .replace(/^0+(?!$)/, ''); // 鍘婚櫎寮�澶寸殑0锛岄櫎闈炴暣涓瓧绗︿覆鏄�0 + }, + handleNumberInput3(value) { + this.inputValue = value.replace(/[^\d.]/g, '') // 1. 鍘婚櫎闈炴暟瀛楀拰灏忔暟鐐� + .replace(/(\..*)\./g, '$1') // 2. 绂佹澶氫釜灏忔暟鐐� + .replace(/^\./g, ''); + }, + //閽堝娌℃湁涓婁笅闄愬�肩殑鏁版嵁锛屽彧闇�閫夋嫨鍚堟牸鎴栦笉鍚堟牸.鎸夐挳瑙﹀彂 + handleQualified(isQualified) { + var input = ""; + if (isQualified) { + // 鎵ц鍚堟牸鐩稿叧閫昏緫 + input = "OK-1"; + this.addJyzIpqc(input); + } else { + // 鎵ц涓嶅悎鏍肩浉鍏抽�昏緫 + input = "NG-1"; + this.addJyzIpqc(input); + } + }, + togglePopup(index) { + // 鍒囨崲鎸囧畾绱㈠紩鐨� popup 鐘舵�� + var that = this; + this.show = true; + console.log(index); + console.log(that.tableData[index].guid); + var mxguid = that.tableData[index].guid; + that.jymxData = that.tableData[index]; + that.tabActive = index; + that.AxiosHttp("post", 'MesQaItemsDetect01Manager/GetModel12', { + parentGuid : "", + guid : mxguid , + }, true, 1).then(function (res1) { + if (res1.rtnCode == 1) { + that.tableMxData = res1.rtnData; + + } else { + that.$toast.fail(res1.rtnMsg); + } + }).catch(function (error) { + that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + console.log(error); + }); + }, + getInputJYZ() { + // 鍒囨崲鎸囧畾绱㈠紩鐨� popup 鐘舵�� + var that = this; + + if (!that.inputValue) { + this.$toast.fail("妫�楠屽�间笉鑳戒负绌�"); + that.isLoading = false; + return; + } + that.addJyzIpqc(that.inputValue); + + }, + + addJyzIpqc(input) { + var that = this; + var guid1 = that.formData.guid;//涓昏〃id + var mxguid = that.tableData[that.tabActive].guid;//妫�楠岄」鐩殑guid + that.isLoading = true; + that.AxiosHttp("post", 'PqcManager/AddIpqcJyz', { + inOrderGuid1: guid1, + inOrderGuid5: mxguid, + inP1: input,//鎴栬��0k-19,鎴栬�卬g-19,鎴栧疄闄呮楠屽�� + }, true, 1).then(function (res1) { + if (res1.rtnCode > 0) { + that.$notify({ + type: 'success', message: res1.rtnMsg + }); + that.refreshJYItem();//鍒锋柊妫�楠岄」鐩� + //that.handleTabClick();//鍒锋柊妫�楠屾槑缁嗛潰鏉� + //that.$refs.inputValue.focus(); + that.inputValue = null; + } else { + that.$toast.fail(res1.rtnMsg); + that.inputValue = null; + } + that.isLoading = false; + }).catch(function (error) { + that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + that.inputValue = null; + that.isLoading = false; + }); + }, + + handleTabClick() { + console.log(this.tabActive) + this.togglePopup(this.tabActive); + }, + //妫�楠屾槑缁嗗埛鏂� + refreshJYItem() { + const that = this; + return that.AxiosHttp("post", 'LLJ/getJYItem', { + releaseNo: that.formData.releaseNo + }, false).then(res1 => { + const tableData = res1.data.tbBillList || []; + that.tableData = tableData; + that.handleTabClick();//鍒锋柊妫�楠屾槑缁嗛潰鏉� + }).catch(error => { + that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + console.error('Refresh error:', error); + }); + }, + + //涓婚〉闈㈠姞杞� + init() { + //alert(this.Request("id")); + var that = this; + that.showButton = false; + that.AxiosHttp("post", 'Ipqc/getPageXj', { + id: that.Request("id"), + pageIndex: 1, + limit: 1, + }, false) + .then(function (res) { + let data = res.data.tbBillList[0]; + if (data) { + that.formData = data; + that.remarks = that.formData.remarks; + that.AxiosHttp("post", 'LLJ/getJYItem', { + //id: that.formData.guid, + releaseNo: that.formData.releaseNo + }, false).then(function (res1) { + let tableData = res1.data.tbBillList + //褰撳凡妫�楠屼釜鏁伴兘涓嶄负绌烘椂鎸夌収妫�娴嬬粨鏋勬帓搴� + tableData.sort((a, b) => { + if (a.result === '鏈畬鎴�' && b.result === '鍚堟牸') { + return -1; + } else if (a.result === '鍚堟牸' && b.result === '鏈畬鎴�') { + return 1; + } else { + return 0; + } + }); + that.tableData = tableData; + that.GetImageFileByGid(); + //if (that.tableData.length === 0) { + // that.isShowTable = true; + //} + }).catch(function (error) { + that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + console.log(error); + }); + } + }) + .catch(function (error) { + that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + console.log(error); + }); + }, + submit() { + var that = this; + that.ttrre = true; + that.AxiosHttp("post", 'MesQaItemsDetect01Manager/EditModelSubmit', { + guid: that.formData.guid + }, true, 1).then(function (res1) { + if (res1.rtnData.outSum == 1) { + that.$notify({ type: 'success', message: '鎻愪氦鎴愬姛' }); + that.init(); + } else { + that.$toast.fail(res1.rtnData.outMsg); + } + that.ttrre = false + }).catch(function (error) { + that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + that.ttrre = false + console.log(error); + }); + }, + removeXJ() { + const that = this; + // 娣诲姞纭寮圭獥 + that.$dialog.confirm({ + message: '纭瑕侀噸鏂板姞杞芥楠岄」鐩悧锛�', + confirmButtonText: '纭', + cancelButtonText: '鍙栨秷' + }).then(() => { // 纭鍥炶皟 + that.isLoading = true; + that.AxiosHttp("post", 'MesQaItemsDetect01Manager/ReloadModel5', { + guid: that.formData.guid + }, true, 1).then(res1 => { + if (res1.rtnCode == 1) { + that.$notify({ type: 'success', message: '閲嶆柊鍔犺浇鎴愬姛' }); + that.init(); + } else { + that.$toast.fail(res1.rtnMsg); + } + that.isLoading = false; + }).catch(error => { + that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + that.isLoading = false; + }); + + }).catch(() => { // 鍙栨秷鍥炶皟 + that.$toast('宸插彇娑堟搷浣�'); + }); + }, + GetBack1() { + window.history.back(); + }, + onClickRight() { + + }, + updateRemarks(guid) { + this.showDialog= true + }, + deleteDetail13(guid12) { + const that = this; + var guid1 = that.formData.guid;//涓昏〃id + var mxguid = that.tableData[that.tabActive].guid;//妫�楠岄」鐩殑guid + // 娣诲姞纭寮圭獥 + that.$dialog.confirm({ + message: '纭瑕佸垹闄よ妫�楠屽�艰褰曞悧锛�', + confirmButtonText: '纭', + cancelButtonText: '鍙栨秷' + }).then(() => { // 纭鍥炶皟 + that.isLoading = true; + that.AxiosHttp("post", 'PqcManager/DeleteIpqcJyz', { + inOrderGuid1: guid1, + inOrderGuid5: mxguid, + inOrderGuid12: guid12 + }, true, 1).then(res1 => { + if (res1.rtnCode > 0) { + that.$notify({ + type: 'success', message: res1.rtnMsg + }); + that.refreshJYItem();//鍒锋柊妫�楠岄」鐩� + } else { + that.$toast.fail(res1.rtnMsg); + } + that.isLoading = false; + }).catch(error => { + that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + that.isLoading = false; + }); + + }).catch(() => { // 鍙栨秷鍥炶皟 + that.$toast('宸插彇娑堟搷浣�'); + that.isLoading = false; + }); + }, + remarksConfirm() { + const that = this; + that.isLoading = true; + var guid = that.formData.guid; + that.AxiosHttp("post", 'Llj/updateRemarks', { + gid: guid, + Remarks: that.remarks + }, true, 0).then(res1 => { + if (res1.status == 0) { + that.$notify({ type: 'success', message: '杈撳叆鎴愬姛' }); + that.init();//鍒锋柊妫�楠岄」鐩� + } else { + that.$toast.fail(res1.rtnMsg); + } + that.isLoading = false; + }).catch(error => { + that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + that.isLoading = false; + }); + }, + + async afterRead(file) { + try { + //alert(APIURL_IMAGE); + // 1. 鏄剧ず涓婁紶涓姸鎬� + file.status = 'uploading'; + file.message = '涓婁紶涓�...'; + + // 2. 鍒涘缓 FormData锛堝叧閿細瀛楁鍚嶅繀椤诲拰鍚庣鍙傛暟鍚嶄竴鑷达級 + const formData = new FormData(); + + // 3. 鏋勯�犳枃浠跺悕锛堟牴鎹悗绔姹傜敤 ~ 鍒嗗壊锛� + // 鍋囪闇�瑕� parentGuid锛岃繖閲屼粠缁勪欢鏁版嵁鑾峰彇 + const parentGuid = this.formData.guid; // 鏍规嵁浣犵殑瀹為檯鏁版嵁婧愯皟鏁� + const customFileName = `${parentGuid}~${file.file.name}`; + + // 4. 娣诲姞鏂囦欢锛堢浜屼釜鍙傛暟蹇呴』浣跨敤 new File 鍖呰锛� + formData.append('file', new File([file.file], customFileName, { + type: file.file.type + })); + + // 5. 璋冪敤缁熶竴灏佽鐨� Axios 鏂规硶 + const res = await this.AxiosHttp( + 'post', + 'MesFile/UploadFile', // 鏍规嵁瀹為檯鎺ュ彛璺緞璋冩暣 + formData, + true, // 鏄剧ず鍔犺浇鐘舵�� + 1 // 瓒呮椂鏃堕棿 + ); + + // 6. 澶勭悊鍝嶅簲 + if (res.rtnCode === 1) { + file.status = 'done'; + file.message = '涓婁紶鎴愬姛'; + file.urlPath = res.rtnData.urlPath; // 淇濆瓨杩斿洖鐨勬枃浠惰矾寰� + file.id = res.rtnData.id; // 淇濆瓨杩斿洖鐨勬枃浠秈d + + // 鍙�夛細涓婁紶鎴愬姛鍚庡埛鏂版枃浠跺垪琛� + // await this.loadFileList(); + } else { + file.status = 'failed'; + file.message = res.rtnMsg || '涓婁紶澶辫触'; + this.$toast.fail(res.rtnMsg); + } + + } catch (error) { + // 7. 寮傚父澶勭悊 + file.status = 'failed'; + file.message = '涓婁紶寮傚父'; + this.$toast.fail('缃戠粶閿欒锛岃閲嶈瘯'); + console.error('涓婁紶閿欒:', error); + } finally { + // 8. 寮哄埗鏇存柊瑙嗗浘锛圴ant 3+ 鍙兘闇�瑕侊級 + this.$nextTick(); + } + }, + //鑾峰彇鍥剧墖淇℃伅 + GetImageFileByGid() { + const that = this; + that.AxiosHttp("post", 'MesImage/getImage', { + parentId: that.formData.guid, + }, true, 0).then(res1 => { + if (res1.status === 0) { + // 鍏抽敭杞崲锛氬皢鍚庣鏁版嵁杞崲涓� van-uploader 闇�瑕佺殑鏍煎紡 + that.fileList = res1.data.tbBillList.map(item => ({ + url: `${APIURL_IMAGE}/${item.urlPath}`, // 鎷兼帴瀹屾暣璁块棶璺緞 + status: 'done', // 鏍囪涓哄凡涓婁紶鎴愬姛 + name: item.fileTitle, // 鍙�夋樉绀烘枃浠跺悕 + message: '宸蹭笂浼�', // 鍙�夌姸鎬佹枃瀛� + // 淇濈暀鍘熷鏁版嵁锛堟寜闇�锛� + id: item.guid + })); + } else { + that.$toast.fail(res1.rtnMsg); + } + }).catch(error => { + that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + }); + }, + handleDelete(file, { index }) { + var that = this; + that.$dialog.confirm({ + title: '纭鍒犻櫎', + message: '纭畾瑕佸垹闄よ繖寮犲浘鐗囧悧锛�' + }).then(() => { + // 纭鍒犻櫎閫昏緫 + console.log(file); + that.AxiosHttp("post", 'MesImage/deleteImage', { + id: file.id, + }, true, 0).then(res1 => { + if (res1.status === 0) { + that.$notify({ type: 'success', message: '鍒犻櫎鎴愬姛' }); + that.init();//鍒锋柊妫�楠岄」鐩� + } else { + that.$toast.fail(res1.rtnMsg); + } + }).catch(error => { + that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + }); + + }).catch(() => { + // 鍙栨秷鎿嶄綔 + }) + }, + } +}) \ No newline at end of file diff --git a/H5/Js/IPQC_XJ/List.js b/H5/Js/IPQC_XJ/List.js new file mode 100644 index 0000000..349aa26 --- /dev/null +++ b/H5/Js/IPQC_XJ/List.js @@ -0,0 +1,120 @@ +锘縱ar vm = new Vue({ + el: '#app', + data: function () { + return { + isLoading: false, + userInfo: { + "loginGuid": '', + "loginAccount": '', + }, + data: [], + loading: false, + finished: false, + refreshing: false, + current: 0, + pageIndex: 0, + limit: 20, + totalPage: 0, + totalCount: 0, + + checked: true, + id: '', + searchKeyword: '', // 鎼滅储鍏抽敭璇� + originalData: [], // 淇濆瓨鍘熷鏁版嵁 + } + }, + mounted() { + var that = this; + this.userInfo = { + loginGuid: this.GetLoginInfor().loginGuid, + loginAccount: this.GetLoginInfor().loginAccount, + }; + this.onLoad(); + }, + methods: { + + // 鏂板鎼滅储澶勭悊鏂规硶 + handleSearch() { + this.pageIndex = 0; + this.data = []; + this.finished = false; + this.isSearching = true; + this.onLoad(); + }, + + onLoad() { + + if (this.refreshing) { + this.data = []; + this.refreshing = false; + } + + let result = "鏈畬鎴�"; + if (this.current === 1) { + result = "宸插畬鎴�"; + } + + this.pageIndex++; + + var that = this; + that.AxiosHttp("post", 'Ipqc/getPageXj', { + pageIndex: that.pageIndex, + limit: that.limit, + createUser: that.userInfo.loginAccount, + result: result, + keyword: that.searchKeyword.trim(), // 鏂板鎼滅储鍙傛暟 + }, false) + .then(function (res) { + var json = res; + if (json.status == 0) { + //this.$notify({ type: 'success', message: json.data.tbBillList }); + + if (that.pageIndex === 1) { + // 濡傛灉鏄涓�椤碉紝鐩存帴瑕嗙洊鍘熸暟鎹� + that.data = json.data.tbBillList; + + } else { + + if (json.data.tbBillList.length > 0) { + // 濡傛灉鏄笅涓�椤碉紝杩藉姞鏂版暟鎹� + let thisData = that.data; + that.data = [...thisData, ...json.data.tbBillList]; + } + + } + that.totalCount = json.totalCount; + that.totalPage = Math.ceil(that.totalCount / that.limit); + that.loading = false; + + if (that.pageIndex >= that.totalPage) { + that.finished = true; + } + + } + else { + that.$toast.fail(json.message); + } + }) + .catch(function (error) { + that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + console.log(error); + }); + }, + onRefresh() { + // 娓呯┖鍒楄〃鏁版嵁 + this.finished = false; + + // 閲嶆柊鍔犺浇鏁版嵁 + // 灏� loading 璁剧疆涓� true锛岃〃绀哄浜庡姞杞界姸鎬� + this.loading = true; + this.pageIndex = 0; + this.onLoad(); + }, + + onClickTab(name, title) { + this.current = name; + this.pageIndex = 0; + this.onLoad(); + } + } +}) \ No newline at end of file -- Gitblit v1.9.3