From 2a5638eca91e8f182116486c1d10a76e43182d0d Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期二, 06 一月 2026 09:47:32 +0800
Subject: [PATCH] 锦隆自动登录条码生成
---
src/views/warehouse/barcodeMaster/Gy_BarCodeBill_JinLong_AutoLogin.vue | 813 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/router/index.js | 8
2 files changed, 821 insertions(+), 0 deletions(-)
diff --git a/src/router/index.js b/src/router/index.js
index 63c1083..965ccf1 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -164,6 +164,14 @@
},
//#endregion
+ //#region 鏉$爜鐢熸垚_閿﹂殕_鑷姩鐧诲綍
+ {
+ path: "/warehouse/barcodeMaster/Gy_BarCodeBill_JinLong_AutoLogin",
+ component: () => import("@/views/warehouse/barcodeMaster/Gy_BarCodeBill_JinLong_AutoLogin.vue"),
+ hidden: true,
+ },
+ //#endregion
+
//#region 鏉$爜涓绘尅
{
path: "/warehouse/barcodeMaster/Gy_BarCodeBillList",
diff --git a/src/views/warehouse/barcodeMaster/Gy_BarCodeBill_JinLong_AutoLogin.vue b/src/views/warehouse/barcodeMaster/Gy_BarCodeBill_JinLong_AutoLogin.vue
new file mode 100644
index 0000000..45fda7c
--- /dev/null
+++ b/src/views/warehouse/barcodeMaster/Gy_BarCodeBill_JinLong_AutoLogin.vue
@@ -0,0 +1,813 @@
+<template>
+ <div style="margin: 10px;">
+ <div style=" margin-bottom: 10px; border-bottom: 1px solid #f6f6f6;">
+ <el-button type="primary" @click="onClickMethod_BarCodeProduce" :disabled="disabledFlag_BarCodeProduce">鐢熸垚</el-button>
+ <el-button type="primary" @click="get_PrintReport">鎵撳嵃</el-button>
+ <!-- <el-button type="primary" @click="close">閫� 鍑�</el-button> -->
+ </div>
+ <div style="margin: 10px; font-size: 28px; font-weight: bold; text-align: center;">鏉$爜鐢熸垚</div>
+ <el-form :model="initMainData" label-width="80px">
+ <el-row>
+ <el-col :span="6">
+ <el-form-item label="鏃ユ湡">
+ <el-date-picker v-model="initMainData.HDate" type="date" placeholder="閫夋嫨鏃ユ湡" value-format="yyyy-MM-ddT" style="width: 100%"> </el-date-picker>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="婧愬崟鍗曞彿">
+ <el-input v-model="initMainData.HMainSourceBillNo" disabled></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="閲囪喘璁㈠崟鍙�">
+ <el-input v-model="initMainData.HPOOrderBillNo" disabled></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="6">
+ <el-form-item label="鐗╂枡浠g爜">
+ <el-input v-model="initMainData.HMaterNumber" disabled></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="鐗╂枡鍚嶇О">
+ <el-input v-model="initMainData.HMaterName" disabled></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="瑙勬牸鍨嬪彿">
+ <el-input v-model="initMainData.HMaterModel" disabled></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="6">
+ <el-form-item label="璁¢噺鍗曚綅">
+ <el-input v-model="initMainData.HUnitName" disabled></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="杈呭姪灞炴�т唬鐮�">
+ <el-input v-model="initMainData.HAuxPropNumber" disabled></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="杈呭姪灞炴�у悕绉�">
+ <el-input v-model="initMainData.HAuxPropName" disabled></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="6">
+ <el-form-item label="渚涘簲鍟嗕唬鐮�">
+ <el-input v-model="initMainData.HSupNumber" disabled></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="渚涘簲鍟嗗悕绉�">
+ <el-input v-model="initMainData.HSupName" disabled></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="鎵瑰彿">
+ <el-input v-model="initMainData.HBatchNo"></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="6">
+ <el-form-item label="婧愬崟鏁伴噺">
+ <el-input-number v-model="initMainData.HQty_SourceBill" @change="onChangeForHQty_SourceBill" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="鏍囧噯鍖呰鏁�">
+ <el-input-number v-model="initMainData.HMinQty" @change="onChangeForHMinQty" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="鍖呮暟">
+ <el-input-number v-model="initMainData.HBQty" disabled />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="6">
+ <el-form-item label="灏惧寘鏁伴噺">
+ <el-input-number v-model="initMainData.HEndQty" disabled />
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="閲囪喘璺熻釜鍙�">
+ <el-input v-model="initMainData.HPOOrderBillMTO" disabled></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="澶嶆鍚敤">
+ <el-checkbox v-model="initMainData.HReInspectionFlag" disabled>澶嶆鍚敤</el-checkbox>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="6">
+ <el-form-item label="鐢熶骇鏃ユ湡">
+ <el-date-picker v-model="initMainData.HInspectionDate" type="date" placeholder="閫夋嫨鏃ユ湡" value-format="yyyy-MM-ddT" style="width: 100%"> </el-date-picker>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="澶嶆鍛ㄦ湡">
+ <el-input-number v-model="initMainData.HInspectionCycle" disabled/>澶�
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="澶嶆鏃ユ湡">
+ <el-date-picker v-model="initMainData.HReInspectionDate" type="date" placeholder="閫夋嫨鏃ユ湡" value-format="yyyy-MM-ddT" style="width: 100%" disabled> </el-date-picker>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="6">
+ <el-form-item label="缁勭粐" @change="onChangeMethod_HOrganization">
+ <el-select v-model="initMainData.HOrganizationID" placeholder="璇烽�夋嫨缁勭粐" style="width: 100%">
+ <el-option v-for="(item, index) in HOrganizationList" :key="index" :value="item.ID" :label="item.Name"></el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </el-row>
+
+ <el-tabs type="border-card" v-model="SelectedTabName" style="height:400px;">
+ <!-- 鏉$爜鍒楄〃 -->
+ <el-tab-pane label="鏉$爜鍒楄〃" name="BarCode">
+ <el-table :data="tableData_BarCode" @selection-change="onSelectionChange_BarCode" :row-class-name="RowIndex_BarCode" style="width: 100%" height="900" width="100%" border v-if="tableData_BarCode.length > 0">
+ <el-table-column type="selection" width="55" align="center" />
+ <el-table-column align="center" label="搴忓彿" type="index" width="80" fixed />
+ <template v-for="(item, index) in tableColumns_BarCode">
+ <el-table-column :prop="item.field" :label="item.title" :key="index" show-overflow-tooltip :width="item.width" align="center" v-if="!item.hide">
+ <template slot-scope="{row, column }">
+ <div :style="item.style"><span>{{ row[column.label] }}</span> </div>
+ </template>
+ </el-table-column>
+ </template>
+ </el-table>
+ </el-tab-pane>
+ </el-tabs>
+ </el-form>
+
+ <!-- 鎵撳嵃寮圭獥 -->
+ <el-dialog title="鎵撳嵃妯℃澘閫夋嫨" :visible.sync="openPrintList" width="800px" append-to-body>
+ <PrintList :linterid="rowSel.toString()" :MyMsg="rowSel.toString()" Type="HGy_BarCodeBill"
+ HModName="HGy_BarCodeBill" @rowEditClose="rowSetClose" v-if="printListShow" />
+ </el-dialog>
+ </div>
+</template>
+<script>
+import axios from 'axios' //axios璇锋眰鏂规硶搴�
+import moment from 'moment'; //moment.js搴�
+import PrintList from "@/views/component/printList"; //鎵撳嵃
+
+import HSourceReportHtml from '@/views/component/HSourceReportHtml'
+import GyProperty from "@/views/basic/gyProperty/gyPropertyList.vue";
+import Material from '@/views/gyMaterial/GyMaterial.vue'
+
+export default {
+ name: 'Gy_BarCodeBill_JinLong_AutoLogin',
+ components: { HSourceReportHtml, PrintList, GyProperty, Material },
+ data() {
+ return {
+ baseURL: process.env.VUE_APP_BASE_API, //鍚庣鎺ュ彛璁块棶鍓嶇紑
+ HModName: "Gy_BarCodeBill_JinLong_AutoLogin", //妯″潡鍚嶇О
+ disabledFlag_BarCodeProduce:false, //绂佺敤鏍囪-鐢熸垚 鎸夐挳
+ rules:{ //琛ㄥごform 鏍¢獙
+
+ },
+ HOrganizationList:[], //缁勭粐涓嬫媺鍒楄〃鏁版嵁
+ initMainData:{ //琛ㄥご鏁版嵁鍒濆鍖�
+ HDate: moment().format('YYYY-MM-DD') //鏃ユ湡
+ ,HMainSourceInterID:0 //婧愬崟涓籌D
+ ,HMainSourceEntryID:0 //婧愬崟瀛怚D
+ ,HMainSourceBillNo:"" //婧愬崟鍗曞彿
+ ,HMainSourceBillType:"" //婧愬崟绫诲瀷
+ ,HPOOrderBillNo:"" //閲囪喘璁㈠崟鍙�
+ ,HMaterID:0 //鐗╂枡ID
+ ,HMaterNumber:"" //鐗╂枡浠g爜
+ ,HMaterName:"" //鐗╂枡鍚嶇О
+ ,HMaterModel:"" //瑙勬牸鍨嬪彿
+ ,HUnitID:"" //璁¢噺鍗曚綅ID
+ ,HUnitName:"" //璁¢噺鍗曚綅鍚嶇О
+ ,HAuxPropID:0 //杈呭姪灞炴�D
+ ,HAuxPropNumber:"" //杈呭姪灞炴�т唬鐮�
+ ,HAuxPropName:"" //杈呭姪灞炴��
+ ,HBatchNo:"" //鎵瑰彿
+ ,HSupID:0 //渚涘簲鍟咺D
+ ,HSupNumber:"" //渚涘簲鍟嗕唬鐮�
+ ,HSupName:"" //渚涘簲鍟�
+ ,HQty_SourceBill:0 //婧愬崟鏁伴噺
+ ,HMinQty:0 //鏍囧噯鍖呰鏁�
+ ,HBQty:0 //鍖呮暟
+ ,HEndQty:0 //灏惧寘鏁伴噺
+ ,HReInspectionFlag:false //澶嶆鍚敤
+ ,HInspectionDate:null //鐢熶骇鏃ユ湡
+ ,HInspectionCycle:0 //澶嶆鍛ㄦ湡(澶�)
+ ,HReInspectionDate:null //澶嶆鏃ユ湡
+ ,HPOOrderBillMTO:"" //閲囪喘璺熻釜鍙�
+
+ ,HOrganizationID:0 //缁勭粐ID
+ ,HOrganization:"" //缁勭粐鍚嶇О
+ },
+
+ SelectedTabName:"BarCode", //琛ㄦ牸椤电-褰撳墠閫夋嫨椤甸潰name
+ tableColumns_BarCode: [ //鏉$爜鍒楄〃table 鍒楁暟鎹�
+ { field: 'HItemID', title: 'HItemID', width: 100, hide: true }
+ , { field: 'hmainid', title: 'hmainid', width: 100, hide: true }
+ , { field: 'hsubid', title: 'hsubid', width: 100, hide: true }
+ , { field: 'HinterID', title: 'HinterID', width: 100, hide: true }
+ , { field: '鏉$爜绫诲瀷', title: '鏉$爜绫诲瀷', width: 100 }
+ , { field: '鏉$爜缂栧彿', title: '鏉$爜缂栧彿', width: 120 }
+ , { field: 'HMaterID', title: '鐗╂枡ID', width: 100, hide: true }
+ , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 120 }
+ , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 120 }
+ , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 120 }
+ , { field: 'HUnitID', title: '璁¢噺鍗曚綅ID', width: 100, hide: true }
+ , { field: '璁¢噺鍗曚綅浠g爜', title: '璁¢噺鍗曚綅浠g爜', width: 120 }
+ , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 120 }
+ , { field: 'HAuxPropID', title: '杈呭姪灞炴�D', width: 100, hide: true }
+ , { field: '杈呭姪灞炴�т唬鐮�', title: '杈呭姪灞炴�т唬鐮�', width: 120 }
+ , { field: '杈呭姪灞炴��', title: '杈呭姪灞炴��', width: 120 }
+ , { field: '鎵瑰彿', title: '鎵瑰彿', width: 120 }
+ , { field: '鏁伴噺', title: '鏁伴噺', width: 100 }
+ , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 120 }
+ , { field: '璁″垝璺熻釜鍙�', title: '璁″垝璺熻釜鍙�', width: 120 }
+ , { field: '鏄惁璧犲搧', title: '鏄惁璧犲搧', width: 100 }
+ , { field: 'DeptID', title: '杞﹂棿ID', width: 100, hide: true }
+ , { field: '杞﹂棿', title: '杞﹂棿', width: 120 }
+ , { field: 'HSupID', title: '渚涘簲鍟咺D', width: 100, hide: true }
+ , { field: '渚涘簲鍟嗕唬鐮�', title: '渚涘簲鍟嗕唬鐮�', width: 120 }
+ , { field: '渚涘簲鍟�', title: '渚涘簲鍟�', width: 120 }
+ , { field: '瀹㈡埛鏉$爜缂栧彿', title: '瀹㈡埛鏉$爜缂栧彿', width: 120 }
+ , { field: '瀹㈡埛鍨嬪彿', title: '瀹㈡埛鍨嬪彿', width: 120 }
+ , { field: '寰�鏉ュ崟浣�', title: '寰�鏉ュ崟浣�', width: 120 }
+ , { field: '閿�鍞鍗曞彿', title: '閿�鍞鍗曞彿', width: 120 }
+ , { field: '閿�鍞鍗曡鍙�', title: '閿�鍞鍗曡鍙�', width: 120 }
+ , { field: '鎵樺彿', title: '鎵樺彿', width: 120 }
+ , { field: '鎬绘墭鏁�', title: '鎬绘墭鏁�', width: 100 }
+ , { field: '鏉$爜鏃ユ湡', title: '鏉$爜鏃ユ湡', width: 120 }
+ , { field: '鐢熶骇鍏ュ簱鏃ユ湡', title: '鐢熶骇鍏ュ簱鏃ユ湡', width: 120 }
+ , { field: '鐢熶骇鍏ュ簱鍗曞彿', title: '鐢熶骇鍏ュ簱鍗曞彿', width: 120 }
+ , { field: '鐢熶骇鍏ュ簱娆℃暟', title: '鐢熶骇鍏ュ簱娆℃暟', width: 100 }
+ , { field: '閿�鍞嚭搴撴棩鏈�', title: '閿�鍞嚭搴撴棩鏈�', width: 120 }
+ , { field: '閿�鍞嚭搴撳崟鍙�', title: '閿�鍞嚭搴撳崟鍙�', width: 120 }
+ , { field: '閿�鍞嚭搴撴鏁�', title: '閿�鍞嚭搴撴鏁�', width: 100 }
+ , { field: '浣滃簾鏍囪', title: '浣滃簾鏍囪', width: 100 }
+ , { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 100 }
+ , { field: '澶囨敞', title: '澶囨敞', width: 120 }
+ , { field: '鍒朵綔浜�', title: '鍒朵綔浜�', width: 100 }
+ , { field: '鏃ユ湡', title: '鏃ユ湡', width: 120 }
+ , { field: '璁″垝瀹屽伐鏃ユ湡', title: '璁″垝瀹屽伐鏃ユ湡', width: 120 }
+ , { field: '鎵撳嵃娆℃暟', title: '鎵撳嵃娆℃暟', width: 100 }
+ , { field: 'HSTOCKORGID', title: 'HSTOCKORGID', width: 100, hide: true }
+ , { field: '鐢熸垚缁勭粐', title: '鐢熸垚缁勭粐', width: 120 }
+ ],
+ tableData_BarCode:[], //鏉$爜鍒楄〃table 鏁版嵁
+ RowIndex_BarCode:0, //鏉$爜鍒楄〃table 琛岀储寮�
+
+ openPrintList:true, //鎵撳嵃寮圭獥鏄剧ず鏍囪
+ printListShow:false, //鎵撳嵃妯℃澘鏁版嵁鏄剧ず鏍囪
+ selectedData_BarCode:0, //鏉$爜鍒楄〃table 閫変腑鏁版嵁闆嗗悎
+ };
+ },
+ async created() {
+ await this.loging(); //鑷姩鐧诲綍
+ this.judgeIsLoging(); //鍒ゆ柇鏄惁鐧诲綍锛屾湭鐧诲綍鍒欒烦杞洖鐧诲綍椤甸潰
+ await this.get_OrganizationList(); //椤甸潰鍒濆鍖� 鑾峰彇缁勭粐涓嬫媺鍒楄〃鏁版嵁
+ await this.initPageData(); //椤甸潰鍒濆鍖�
+ },
+ methods: {
+ //#region 鍒ゆ柇鏄惁鐧诲綍锛屾湭鐧诲綍鍒欒烦杞洖鐧诲綍椤甸潰
+ judgeIsLoging(){
+ if (sessionStorage["login"] != "login") {
+ this.$modal.msgError("鐧诲綍澶辨晥锛岃閲嶆柊鐧诲綍锛侊紒");
+ this.$router.push({ path: "/" }).catch(() => { })
+ }
+ },
+ //#endregion
+
+ //#region 椤甸潰鍒濆鍖�
+ initPageData(){
+ var params = this.get_UrlVars();
+ var OperationType = params[params[0]]; //鎿嶄綔绫诲瀷
+
+ if (OperationType == "1" || typeof(OperationType)=="undefined") { //
+
+ }
+ else if (OperationType == "4") { //涓嬫帹
+ this.setInit_PushBill();
+ }
+ else {
+ layer.alert("鏈煡鎿嶄綔绫诲瀷锛�", { icon: 5 });
+ }
+ },
+ //#endregion
+
+ //#region 鑾峰彇缁勭粐涓嬫媺鍒楄〃鏁版嵁
+ async get_OrganizationList() {
+ axios.get(this.baseURL + '/Web/GetOrganizations',{async:false}).then(response => {
+ let result = response.data
+ if (result.count == 1) {
+ var data = result.data;
+ for (var i = 0; i < data.length; i++) {
+ this.HOrganizationList.push(
+ {
+ ID:data[i].ID,
+ Name:data[i].Name,
+ }
+ )
+ }
+
+ this.initMainData.HOrganizationID = sessionStorage["OrganizationID"] * 1;
+ }else{
+ this.$modal.msgError(result.message);
+ }
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!" + error);
+ });
+ },
+ //#endregion
+
+ //#region 缁勭粐涓嬫媺鍒楄〃鍙樻洿浜嬩欢
+ onChangeMethod_HOrganization(){
+
+ },
+ //#endregion
+
+ //#region 婧愬崟鏁伴噺鏁版嵁鍙樻洿浜嬩欢
+ onChangeForHQty_SourceBill(){
+ if(this.initMainData.HMinQty>0){
+ this.initMainData.HBQty = Math.floor((this.initMainData.HQty_SourceBill / this.initMainData.HMinQty) + (this.initMainData.HQty_SourceBill%this.initMainData.HMinQty == 0?0:1));
+ }else{
+ this.initMainData.HBQty = 0;
+ }
+ if(this.initMainData.HMinQty>0){
+ this.initMainData.HEndQty = this.initMainData.HQty_SourceBill%this.initMainData.HMinQty;
+ }
+ },
+ //#endregion
+
+ //#region 鏍囧噯鍖呰鏁版暟鎹彉鏇翠簨浠�
+ onChangeForHMinQty(){
+ if(this.initMainData.HMinQty>0){
+ this.initMainData.HBQty = Math.floor((this.initMainData.HQty_SourceBill / this.initMainData.HMinQty) + (this.initMainData.HQty_SourceBill%this.initMainData.HMinQty == 0?0:1));
+ }else{
+ this.initMainData.HBQty = 0;
+ }
+ if(this.initMainData.HMinQty>0){
+ this.initMainData.HEndQty = this.initMainData.HQty_SourceBill%this.initMainData.HMinQty;
+ }
+ },
+ //#endregion
+
+ //#region 鐢熶骇鎸夐挳鐐瑰嚮浜嬩欢鏁版嵁鏍¢獙
+ AllowLoadData(sSubStr) {
+ var Result = true;
+ //鏁板�兼牸寮忔牎楠屽伐鍏�
+ var ref = /^\d+(\.\d+)?$/; //闈炶礋鏁版鍒欒〃杈惧紡
+ var ref1 = /^[1-9]\d*$/; //姝f暣鏁版鍒欒〃杈惧紡
+ var temp = "";
+ sSubStr = JSON.parse(sSubStr);
+
+ if (sSubStr[0].HDate == "") {
+ this.$modal.msgError("鏃ユ湡鏈缃紒锛�");
+ return Result = false;
+ }
+ if (sSubStr[0].HSourceInterID == "0" || sSubStr[0].HSourceEntryID == "0" || sSubStr[0].HSourceBillNo == "") {
+ this.$modal.msgError("婧愬崟淇℃伅鏈夎锛侊紒銆愪富鍐呯爜锛�" + sSubStr[0].HSourceInterID + "锛涘瓙鍐呯爜锛�" + sSubStr[0].HSourceEntryID + "锛涙簮鍗曞彿锛�" + sSubStr[0].HSourceBillNo + "锛涖��");
+ return Result = false;
+ }
+ if (sSubStr[0].HMaterID == "0") {
+ this.$modal.msgError("鐗╂枡淇℃伅鏈夎锛侊紒銆愮墿鏂橧D锛�" + sSubStr[0].HMaterID + "锛涚墿鏂欎唬鐮侊細" + sSubStr[0].HMaterNumber + "锛涚墿鏂欏悕绉帮細" + sSubStr[0].HMaterName + "锛涜鏍煎瀷鍙凤細" + sSubStr[0].HMaterModel + "锛涖��");
+ return Result = false;
+ }
+ if (sSubStr[0].HSupID == "0") {
+ this.$modal.msgError("渚涘簲鍟嗕俊鎭湁璇紒锛併�愪緵搴斿晢ID锛�" + sSubStr[0].HMaterID + "锛涗緵搴斿晢浠g爜锛�" + sSubStr[0].HMaterNumber + "锛涗緵搴斿晢鍚嶇О锛�" + sSubStr[0].HMaterName + "锛涖��");
+ return Result = false;
+ }
+
+ temp = sSubStr[0].HQty + "";
+ if (temp == "0" || temp == "") {
+ this.$modal.msgError("婧愬崟鏁伴噺涓嶈兘涓�0鎴栫┖锛侊紒");
+ return Result = false;
+ } else if (!ref.test(temp)) {
+ this.$modal.msgError("婧愬崟鏁伴噺璇疯緭鍏ュぇ浜�0鐨勬暟瀛楋紒锛�");
+ return Result = false;
+ }
+
+ temp = sSubStr[0].HMinQty + "";
+ if (temp == "0" || temp == "") {
+ this.$modal.msgError("鏍囧噯鍖呰鏁颁笉鑳戒负0鎴栫┖锛侊紒");
+ return Result = false;
+ } else if (!ref.test(temp)) {
+ this.$modal.msgError("鏍囧噯鍖呰鏁拌杈撳叆澶т簬0鐨勬暟瀛楋紒锛�");
+ return Result = false;
+ }
+
+ temp = sSubStr[0].HBQty + "";
+ if (!ref1.test(temp)) {
+ this.$modal.msgError("鍖呮暟璇疯緭鍏ュぇ浜�0鐨勬暣鏁版暟瀛楋紒锛�");
+ return Result = false;
+ }
+
+ // var HEndQty = this.initMainData.HEndQty;
+ // if (HEndQty == "") {
+ // this.$modal.msgError("灏惧寘鏁伴噺涓嶈兘涓虹┖锛侊紒");
+ // return Result = false;
+ // } else if (!ref.test(HEndQty)) {
+ // this.$modal.msgError("灏惧寘鏁伴噺璇疯緭鍏ヤ笉灏忎簬0鐨勬暟瀛楋紒锛�");
+ // return Result = false;
+ // }
+
+ return Result;
+ },
+ //#endregion
+
+ //#region 鐢熸垚鎸夐挳鐐瑰嚮浜嬩欢
+ async onClickMethod_BarCodeProduce(){
+ this.disabledFlag_BarCodeProduce = true; //绂佺敤鐢熸垚鎸夐挳
+
+ if (this.initMainData.HMaterName != null && (this.initMainData.HMaterName.indexOf("\"") != -1 || this.initMainData.HMaterName.indexOf(";") != -1)) {
+ this.initMainData.HMaterName = this.initMainData.HMaterName.replaceAll("\"", "鈥�").replaceAll(";", "锛�")
+ }
+ if (this.initMainData.HMaterModel != null && (this.initMainData.HMaterModel.indexOf("\"") != -1 || this.initMainData.HMaterModel.indexOf(";") != -1)) {
+ this.initMainData.HMaterModel = this.initMainData.HMaterModel.replaceAll("\"", "鈥�").replaceAll(";", "锛�")
+ }
+
+ //鍒ゆ柇鐢熸垚鏉$爜鏁伴噺鏄惁瓒呰繃鍙敓鎴愭潯鐮佹暟閲�
+ var temp = await this.getPushSource_POInStockBillInit(this.initMainData.HMainSourceInterID, this.initMainData.HMainSourceEntryID);
+ var dataArray = [];
+ dataArray.push(temp);
+ var HQty_SourceBill = this.initMainData.HQty_SourceBill * 1;
+ if (HQty_SourceBill > ((dataArray[0].鏁伴噺 * 1) - (dataArray[0].宸茬敓鎴愭潯鐮佹暟閲� * 1))) {
+ this.$modal.msgError("鏉$爜鐢熸垚鏁伴噺澶т簬鏈�澶у彲鐢熸垚鏁伴噺銆�" + ((dataArray[0].鏁伴噺 * 1) - (dataArray[0].宸茬敓鎴愭潯鐮佹暟閲� * 1)) + "銆�!!");
+ return false;
+ }
+
+ var sMainData_temp = [
+ {
+ "HMainID": this.initMainData.HMainSourceInterID
+ , "HSubID": this.initMainData.HMainSourceEntryID
+ , "HBillNo": this.initMainData.HMainSourceBillNo
+ , "HBillType": this.initMainData.HMainSourceBillType
+ , "HMaterID": this.initMainData.HMaterID
+ , "HMaterNumber": this.initMainData.HMaterNumber
+ , "HMaterName": this.initMainData.HMaterName
+ , "HMaterModel": this.initMainData.HMaterModel
+ , "HCusModel": ""
+ , "HCusMaterName": ""
+ , "HEmpID": 0
+ , "HEmpNumber": ""
+ , "HEmpName": ""
+ , "HGroupID": 0
+ , "HGroupNumber": ""
+ , "HGroupName": ""
+ , "HCheckEmpName": ""
+ , "HBatchNo": this.initMainData.HBatchNo
+ , "HQty": this.initMainData.HQty_SourceBill
+ , "HMinQty": this.initMainData.HMinQty
+ , "HBQty": this.initMainData.HBQty
+ , "HPackQty": 0
+ , "HCoilNO": ""
+ , "HFurnaceNO": ""
+ , "HFactory": ""
+ , "HCusID": 0
+ , "HCusNumber": ""
+ , "HCusName": ""
+ , "HSeOrderBillNo": ""
+ , "HRemark": ""
+ , "HProduceDate": this.initMainData.HDate
+ , "HExpiryDate": this.initMainData.HDate
+ , "HheatNO": ""
+ , "HAuxPropID": this.initMainData.HAuxPropID
+ , "HAuxPropNumber": this.initMainData.HAuxPropNumber
+ , "HAuxPropName": this.initMainData.HAuxPropName
+ , "HUnitID": this.initMainData.HUnitID
+ , "HUnitNumber": ""
+ , "HUnitName": this.initMainData.HUnitName
+ , "HAuxQty": 0
+ , "HExpirationDateFlag": 0
+ , "HGiveAwayFlag": 0
+ , "HDate": this.initMainData.HDate
+ , "HMTONo": ""
+ , "HBarCodeType": "鍞竴鏉$爜"
+ , "HSupID": this.initMainData.HSupID
+ , "HSupNumber": this.initMainData.HSupNumber
+ , "HSupName": this.initMainData.HSupName
+ , "HInnerBillNo": this.initMainData.HPOOrderBillNo
+ , "HReInspectionFlag": this.initMainData.HReInspectionFlag
+ , "HInspectionDate": this.initMainData.HInspectionDate
+ , "HInspectionCycle": this.initMainData.HInspectionCycle
+ , "HReInspectionDate": this.initMainData.HReInspectionDate
+ , "HPOOrderBillMTO": this.initMainData.HPOOrderBillMTO
+ }
+ ]
+
+ var sSubStr = JSON.stringify(sMainData_temp);
+ //鐗╂枡鏄庣粏淇℃伅涓嶄负绌哄垽鏂�
+ if (!this.AllowLoadData(sSubStr))//鏁版嵁楠岃瘉
+ {
+ this.disabledFlag_BarCodeProduce = false; //鐢熸垚鎸夐挳鍚敤
+ return;
+ }
+ var HOrgType = sessionStorage["Organization"]; //鑾峰彇閫夋嫨鐨勭粍缁�
+ var HSourceBillType = this.initMainData.HMainSourceBillType; //鑾峰彇閫夋嫨鐨勬簮鍗曠被鍨�
+ var CampanyName = "xxx"; //鑾峰彇閫夋嫨鐨勫伐鍘備唬鐮�
+ var UserName = sessionStorage["HUserName"]; //鑾峰彇褰撳墠鐧诲綍浜哄憳
+ var sMainSub = sSubStr + ';' + HOrgType + ';' + HSourceBillType + ';' + CampanyName + ';' + UserName;
+ this.SaveBarCodeCreate(sMainSub); //鏉$爜鐢熸垚
+ },
+ //#endregion
+
+ //#region 鎵撳嵃鎸夐挳鐐瑰嚮浜嬩欢
+ get_PrintReport() {
+ if (this.selectedData_BarCode.length == 0) {
+ this.$modal.msgError("璇烽�夋嫨鏁版嵁");
+ } else {
+ this.rowSel = [];
+ for (var i = 0; i < this.selectedData_BarCode.length; i++) {
+ this.rowSel.push(this.selectedData_BarCode[i].HItemID.toString());
+ }
+ this.printListShow = true;
+ this.openPrintList = true;
+ }
+ },
+ //#endregion
+
+ //#region 鏉$爜鍒楄〃澶嶉�夋閫夋嫨鐘舵�佸彉鏇寸洃鍚簨浠�
+ onSelectionChange_BarCode(selection){
+ this.selectedData_BarCode = selection;
+ },
+ //#endregion
+
+ //#region 鑾峰彇鍙傛暟
+ get_UrlVars() {
+ var vars = [], hash;
+ var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
+ for (var i = 0; i < hashes.length; i++) {
+ hash = hashes[i].split('=');
+ vars.push(hash[0]);
+ vars[hash[0]] = hash[1];
+ }
+ return vars;
+ },
+ //#endregion
+
+ //#region 鏍规嵁涓诲唴鐮佷笌瀛愬唴鐮佽幏鍙栨簮鍗曟敹鏂欓�氱煡鍗曟暟鎹�
+ async getPushSource_POInStockBillInit(HSourceInterID, HSourceEntryID) {
+ var res = "none";
+ var sql = "select * from h_v_IF_POInStockBillList_Source where 1=1 and HMainID = " + HSourceInterID + " and HSubID = " + HSourceEntryID;
+ var ModRightNameCheck = "";
+ return axios.get(this.baseURL + '/CommonModel/searchMethod', {
+ async:false,
+ params: {
+ "sql": sql
+ , "user": sessionStorage["HUserName"]
+ , "ModRightNameCheck": ModRightNameCheck
+ },
+ })
+ },
+ //#endregion
+
+ //#region 涓嬫帹椤甸潰鍒濆鍖�
+ async setInit_PushBill(HSourceInterID,HSourceEntryID) {
+ //鑾峰彇鍙傛暟
+ var params = this.get_UrlVars();
+ var OperationType = params[params[0]]; //鎿嶄綔绫诲瀷
+ var HSourceInterID = params[params[1]]; //婧愬崟涓籭d
+ var HSourceEntryID = params[params[2]]; //婧愬崟瀛恑d
+ var HSourceBillType = params[params[3]]; //婧愬崟绫诲瀷
+ var HSourceBillNo = params[params[4]]; //婧愬崟鍗曞彿
+
+ //鑾峰彇婧愬崟淇℃伅
+ var temp = null;
+ var res = "none"
+ try{
+ res = await this.getPushSource_POInStockBillInit(HSourceInterID, HSourceEntryID);
+ if(res.data.code=="1"){
+ if(res.data.data.length>0){
+ res = await this.getPushSource_POInStockBillInit(HSourceInterID, HSourceEntryID);
+ }else{
+ res = "none";
+ this.$modal.msgError("鏈煡璇㈠埌褰撳墠鍗曟嵁锛侊紒锛�");
+ }
+ }
+ else{
+ res = "none";
+ this.$modal.msgError(res.data.Message);
+ }
+ }catch(error){
+ res = "none";
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!" + error);
+ }
+ if(res != "none"){
+ temp = res.data.data[0];
+ }else{
+ return;
+ }
+
+ var dataArray = [];
+ dataArray.push(temp);
+
+ this.initMainData.HDate = moment().format('YYYY-MM-DD');
+ this.initMainData.HMainSourceInterID = HSourceInterID;
+ this.initMainData.HMainSourceEntryID = HSourceEntryID;
+ this.initMainData.HMainSourceBillNo = HSourceBillNo;
+ this.initMainData.HMainSourceBillType = HSourceBillType;
+ this.initMainData.HPOOrderBillNo = dataArray[0].婧愬崟鍗曞彿==null?"":dataArray[0].婧愬崟鍗曞彿;
+ this.initMainData.HMaterID = dataArray[0].HMaterID==null?0:dataArray[0].HMaterID;
+ this.initMainData.HMaterNumber = dataArray[0].鐗╂枡浠g爜==null?"":dataArray[0].鐗╂枡浠g爜;
+ this.initMainData.HMaterName = dataArray[0].鐗╂枡鍚嶇О==null?"":dataArray[0].鐗╂枡鍚嶇О;
+ this.initMainData.HMaterModel = dataArray[0].瑙勬牸鍨嬪彿==null?"":dataArray[0].瑙勬牸鍨嬪彿;
+ this.initMainData.HUnitID = dataArray[0].HUnitID==null?0:dataArray[0].HUnitID;
+ this.initMainData.HUnitName = dataArray[0].璁¢噺鍗曚綅==null?"":dataArray[0].璁¢噺鍗曚綅;
+ this.initMainData.HAuxPropID = dataArray[0].HAuxPropID==null?0:dataArray[0].HAuxPropID;
+ this.initMainData.HAuxPropNumber = dataArray[0].杈呭姪灞炴�т唬鐮�==null?"":dataArray[0].杈呭姪灞炴�т唬鐮�;
+ this.initMainData.HAuxPropName = dataArray[0].杈呭姪灞炴��==null?"":dataArray[0].杈呭姪灞炴��;
+ this.initMainData.HSupID = dataArray[0].HSupID==null?0:dataArray[0].HSupID;
+ this.initMainData.HSupNumber = dataArray[0].渚涘簲鍟嗕唬鐮�==null?"":dataArray[0].渚涘簲鍟嗕唬鐮�;
+ this.initMainData.HSupName = dataArray[0].渚涘簲鍟�==null?"":dataArray[0].渚涘簲鍟�;
+ this.initMainData.HBatchNo = dataArray[0].鎵瑰彿==null?"":dataArray[0].鎵瑰彿;
+ this.initMainData.HQty_SourceBill = ((dataArray[0].鏁伴噺 * 1) - (dataArray[0].宸茬敓鎴愭潯鐮佹暟閲� * 1))<0?0:((dataArray[0].鏁伴噺 * 1) - (dataArray[0].宸茬敓鎴愭潯鐮佹暟閲� * 1));
+ this.initMainData.HReInspectionFlag = dataArray[0].澶嶆鏍囪==1?true:false;
+ this.initMainData.HInspectionCycle = dataArray[0].澶嶆鏍囪==1?dataArray[0].澶嶆鍛ㄦ湡:0;
+ this.initMainData.HInspectionDate = dataArray[0].澶嶆鏍囪==1?moment(dataArray[0].妫�楠屾棩鏈�).format('YYYY-MM-DD'):null;
+ this.initMainData.HReInspectionDate = dataArray[0].澶嶆鏍囪==1?moment(dataArray[0].妫�楠屾棩鏈�).add(dataArray[0].澶嶆鍛ㄦ湡,"days").format('YYYY-MM-DD') :null;
+ this.initMainData.HPOOrderBillMTO = dataArray[0].閲囪喘璺熻釜鍙�;
+ this.initMainData.HMinQty = 0;
+ if(this.initMainData.HMinQty>0){
+ this.initMainData.HBQty = (this.initMainData.HQty_SourceBill / this.initMainData.HMinQty) + (this.initMainData.HQty_SourceBill%this.initMainData.HMinQty == 0?0:1);
+ }else{
+ this.initMainData.HBQty = 0;
+ }
+ if(this.initMainData.HMinQty>0){
+ this.initMainData.HEndQty = this.initMainData.HQty_SourceBill%this.initMainData.HMinQty;
+ }
+ },
+ //#endregion
+
+ //#region 鏉$爜鐢熸垚
+ SaveBarCodeCreate(sMainSub, CampanyName) {
+ axios({
+ method: 'post',
+ url: this.baseURL + "/Sc_BarCode/Sub_SaveBill_JinLong",
+ data: {
+ "msg": sMainSub, "CampanyName": CampanyName
+ },
+ }).then(response => {
+ let result = response.data
+ if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ this.tableData_BarCode = result.data;
+ console.log(this.tableData_BarCode);
+ }
+ else {
+ this.disabledFlag_BarCodeProduce = false //鐢熸垚鎸夐挳鍚敤
+ this.$modal.msgError(result.Message);
+ }
+ }).catch(error => {
+ this.disabledFlag_BarCodeProduce = false //鐢熸垚鎸夐挳鍚敤
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+ //#endregion
+
+ //#region 鑷姩鐧诲綍
+ async loging() {
+ var params = this.get_UrlVars();
+ var OperationType = params[params[0]]; //鎿嶄綔绫诲瀷
+ var HSourceInterID = params[params[1]]; //婧愬崟涓籭d
+ var HSourceEntryID = params[params[2]]; //婧愬崟瀛恑d
+ var HSourceBillType = params[params[3]]; //婧愬崟绫诲瀷
+ var HSourceBillNo = params[params[4]]; //婧愬崟鍗曞彿
+
+ //var encodedString = params[params[6]]; // 浠嶤#鑾峰彇鐨勭紪鐮佸瓧绗︿覆
+ //var decodedBytes = atob(encodedString); // 瑙g爜Base64瀛楃涓蹭负浜岃繘鍒跺瓧绗︿覆
+ //var decodedString = decodeURIComponent(escape(window.atob(encodedString))); // 灏嗕簩杩涘埗瀛楃涓茶浆鎹负UTF-8瀛楃涓�
+ //var HUserName = decodedString; //鐧诲綍鍚�
+ var HUserName = params[params[5]]; //鐧诲綍鍚�
+
+ var HPwdWord = params[params[6]]; //鐧诲綍瀵嗙爜
+ var HOrgID = params[params[7]]; //缁勭粐id
+ var HOrgName = "";
+
+ if (HOrgID == 0) {
+ //鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
+ if (sessionStorage.login != "login") {
+ this.$modal.msgError("鐧诲綍澶辨晥锛岃閲嶆柊鐧诲綍锛�!");
+ this.$router.push({ path: "/" }).catch(() => { })
+ }
+ return;
+ }
+
+ var sql_getHOrgName = "select HName from Xt_Organizations where HItemID = " + HOrgID;
+ var ModRightNameCheck = "";
+ axios.get(this.baseURL + "/CommonModel/searchMethod", {
+ params: {
+ "sql": sql_getHOrgName
+ , "user": HUserName
+ , "ModRightNameCheck": ModRightNameCheck
+ }
+ }).then(response => {
+ var data1 = response.data
+ if (data1.count == 1) {
+ if (data1.data.length > 0) {
+ HOrgName = data1.data[0]["HName"];
+ } else {
+ this.$modal.msgError("鐧诲綍澶辫触锛侊紒缁勭粐涓嶅瓨鍦紝璇烽噸鏂扮櫥褰曪紒锛�");
+ this.$router.push({ path: "/" }).catch(() => { })
+ }
+ }
+ else {
+ this.$modal.msgError(data1.code + data1.Message);
+ this.$router.push({ path: "/" }).catch(() => { })
+ }
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ this.$router.push({ path: "/" }).catch(() => { })
+ });
+
+ var sql_login = "select * from h_v_Gy_Czygl_Login where Czymc = '" + HUserName + "'";
+ axios.get(this.baseURL + "/CommonModel/searchMethod", {
+ params: {
+ "sql": sql_login
+ , "user": HUserName
+ , "ModRightNameCheck": ""
+ }
+ }).then(response => {
+ var data1 = response.data
+ if (data1.count == 1) {
+ if (data1.data.length > 0) {
+ HUserName = data1.data[0]["Czybm"];
+
+ var result = data1;
+ sessionStorage["HCloudUserName"] = result.data[0].HCloudUserName;//閲戣澏浜戣处鍙�
+ sessionStorage["HCloudUserPsd"] = result.data[0].HCloudUserPsd;
+ sessionStorage["HMaker"] = result.data[0].Czymc;
+ sessionStorage["HUserName"] = result.data[0].Czymc;
+ sessionStorage["HBillerID"] = result.data[0].HK3UserID;
+ sessionStorage["SourceFlag"] = false;
+ sessionStorage["HKeeperID"] = result.data[0].HKeeperID;
+ sessionStorage["HKeeper"] = result.data[0].HKeeper;
+ sessionStorage["HSecManagerID"] = result.data[0].HSecManagerID;
+ sessionStorage["HSecManager"] = result.data[0].HSecManager;
+ sessionStorage["HSellManID"] = result.data[0].HSellManID;
+ sessionStorage["HSellMan"] = result.data[0].HSellMan;
+ sessionStorage["HDeptID"] = result.data[0].HDeptID;
+ sessionStorage["HDept"] = result.data[0].HDept;
+ sessionStorage["HWHID"] = result.data[0].HWhID;
+ sessionStorage["HWHName"] = result.data[0].HWHName;
+ sessionStorage["HSPID"] = result.data[0].HSPID;
+ sessionStorage["HSPName"] = result.data[0].HSPName;
+ sessionStorage["HSupID"] = result.data[0].HSupID;
+ sessionStorage["HSupName"] = result.data[0].HSupName;
+ sessionStorage["Czmm"] = result.data[0].Czmm;
+ sessionStorage["Czybm"] = result.data[0].Czybm;
+ sessionStorage["HEmpID"] = result.data[0].HEmpID;
+ sessionStorage["HEmpNumber"] = result.data[0].HEmpNumber;
+ sessionStorage["HEmpName"] = result.data[0].HEmpName;
+ sessionStorage["HGroup"] = result.data[0].HGroup;
+ sessionStorage["HGroupID"] = result.data[0].HGroupID;
+ sessionStorage["HProc"] = result.data[0].HProc;
+ sessionStorage["HProcNo"] = result.data[0].HProcNo;
+ sessionStorage["HSource"] = result.data[0].HSource;
+ sessionStorage["HSourceID"] = result.data[0].HSourceID;
+ sessionStorage["HWorkCenter"] = result.data[0].HWorkCenter;
+ sessionStorage["HWorkCenterID"] = result.data[0].HWorkCenterID;
+ sessionStorage["HProcName"] = result.data[0].HProcName;
+ sessionStorage["HProcID"] = result.data[0].HProcID;
+ sessionStorage["HCheckEmpID"] = result.data[0].HCheckEmpID;
+ sessionStorage["HCheckEmpName"] = result.data[0].HCheckEmpName;
+ sessionStorage["login"] = "login";
+ sessionStorage["OrganizationID"] = HOrgID;
+ sessionStorage["Organization"] = HOrgName;
+ sessionStorage["HTranSlate"] = "1";
+ sessionStorage["HAutoLogin"] = "1";
+ } else {
+ this.$modal.msgError("鍔犺浇澶辫触锛侊紒璐﹀彿涓嶅瓨鍦紝璇疯仈绯荤鐞嗗憳缁存姢璐﹀彿淇℃伅锛侊紒");
+ this.$router.push({ path: "/" }).catch(() => { });
+ }
+ } else {
+ this.$modal.msgError("鐧诲綍澶辫触!!"+result.Message);
+ this.$router.push({ path: "/" }).catch(() => { })
+ }
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ this.$router.push({ path: "/" }).catch(() => { })
+ });
+ },
+ //#endregion
+ }
+};
+</script>
+<style>
+.input-search-btn {
+ background-color: rgb(24, 144, 255) !important;
+ color: #fff !important;
+}
+</style>
\ No newline at end of file
--
Gitblit v1.9.1