| New file |
| | |
| | | <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="get_BarCodeBillList">æ¡ç æ¡£æ¡</el-button> |
| | | <el-button type="primary" @click="get_BarCodeBillHSEQ">æ¡ç è¡å·æ¥è¯¢</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-dd" |
| | | 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="ç©æä»£ç "> |
| | | <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-dd" 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-dd" style="width: 100%" disabled> </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="客æ·è®¢åå·"> |
| | | <el-input v-model="initMainData.HSeOrderBillNo" disabled></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="产ååå·"> |
| | | <el-input v-model="initMainData.HCusModel" disabled></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <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 { |
| | | BillInfoProps: [], // éå
¥åæ®ä¿¡æ¯ç¼å |
| | | baseURL: process.env.VUE_APP_BASE_API, //å端æ¥å£è®¿é®åç¼ |
| | | HModName: "Gy_BarCodeBill_JinLong_AutoLogin", //模ååç§° |
| | | disabledFlag_BarCodeProduce: false, //ç¦ç¨æ è®°-çæ æé® // iframe URL |
| | | rules: { //表头form æ ¡éª |
| | | |
| | | }, |
| | | HOrganizationList: [], //ç»ç»ä¸æåè¡¨æ°æ® |
| | | initMainData: { //è¡¨å¤´æ°æ®åå§å |
| | | HDate: moment().format('YYYY-MM-DD') //æ¥æ |
| | | , HMainSourceInterID: 0 //æºå主ID |
| | | , HMainSourceEntryID: 0 //æºååID |
| | | , HMainSourceBillNo: "" //æºååå· |
| | | , HMainSourceBillType: "" //æºåç±»å |
| | | , HPOOrderBillNo: "" //éè´è®¢åå· |
| | | , HMaterID: 0 //ç©æID |
| | | , HMaterNumber: "" //ç©æä»£ç |
| | | , HMaterName: "" //ç©æåç§° |
| | | , HMaterModel: "" //è§æ ¼åå· |
| | | , HUnitID: "" //计éåä½ID |
| | | , HUnitName: "" //计éåä½åç§° |
| | | , HAuxPropID: 0 //è¾
å©å±æ§ID |
| | | , HAuxPropNumber: "" //è¾
å©å±æ§ä»£ç |
| | | , HAuxPropName: "" //è¾
å©å±æ§ |
| | | , HBatchNo: "" //æ¹å· |
| | | , HSupID: 0 //ä¾åºåID |
| | | , HSupNumber: "" //ä¾åºå代ç |
| | | , HSupName: "" //ä¾åºå |
| | | , HQty_SourceBill: 0 //æºåæ°é |
| | | , HMinQty: 0 //æ åå
è£
æ° |
| | | , HBQty: 0 //å
æ° |
| | | , HEndQty: 0 //å°¾å
æ°é |
| | | , HReInspectionFlag: false //夿£å¯ç¨ |
| | | , HInspectionDate: null //çäº§æ¥æ |
| | | , HInspectionCycle: 0 //夿£å¨æ(天) |
| | | , HReInspectionDate: null //夿£æ¥æ |
| | | , HPOOrderBillMTO: "" //éè´è·è¸ªå· |
| | | , HSeOrderBillNo: "" //客æ·è®¢åå· |
| | | , HCusModel: "" //产ååå· |
| | | , HMTONo: null //计åè·è¸ªå· |
| | | , HSourceBillSEQ: 0 //æºåè¡å· |
| | | , 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: 'ç©æä»£ç ', title: 'ç©æä»£ç ', width: 120 } |
| | | , { field: 'ç©æåç§°', title: 'ç©æåç§°', width: 120 } |
| | | , { field: 'è§æ ¼åå·', title: 'è§æ ¼åå·', width: 120 } |
| | | , { field: 'HUnitID', title: '计éåä½ID', width: 100, hide: true } |
| | | , { field: '计éåä½ä»£ç ', title: '计éåä½ä»£ç ', width: 120 } |
| | | , { field: '计éåä½', title: '计éåä½', width: 120 } |
| | | , { field: 'HAuxPropID', title: 'è¾
å©å±æ§ID', 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: 'ä¾åºåID', 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: false, //æå°å¼¹çªæ¾ç¤ºæ è®° |
| | | printListShow: false, //æå°æ¨¡æ¿æ°æ®æ¾ç¤ºæ è®° |
| | | selectedData_BarCode: 0, //æ¡ç å表table é䏿°æ®éå |
| | | |
| | | tableColumns_Mater: [], // ç©æä¿¡æ¯ è¡¨å¤´ |
| | | tableData_Mater: [], // ç©æä¿¡æ¯ è¡¨ä½ |
| | | }; |
| | | }, |
| | | async created() { |
| | | await this.loging(); //èªå¨ç»å½ |
| | | await this.judgeIsLoging(); //夿æ¯å¦ç»å½ï¼æªç»å½å跳转åç»å½é¡µé¢ |
| | | await this.get_OrganizationList(); //页é¢åå§å è·åç»ç»ä¸æåè¡¨æ°æ® |
| | | await this.initPageData(); //页é¢åå§å |
| | | }, |
| | | methods: { |
| | | //#region 夿æ¯å¦ç»å½ï¼æªç»å½å跳转åç»å½é¡µé¢ |
| | | async judgeIsLoging() { |
| | | if (sessionStorage["login"] != "login") { |
| | | this.$modal.msgError("ç»å½å¤±æï¼è¯·éæ°ç»å½ï¼ï¼"); |
| | | this.$router.push({ path: "/" }).catch(() => { }) |
| | | } |
| | | }, |
| | | //#endregion |
| | | |
| | | //#region 页é¢åå§å |
| | | async 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*$/; //æ£æ´æ°æ£åè¡¨è¾¾å¼ |
| | | 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("ç©æä¿¡æ¯æè¯¯ï¼ï¼ãç©æIDï¼" + 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 + "ï¼ä¾åºå代ç ï¼" + 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 regex = /^\d{4}-\d{2}-\d{2}$/; //æ£å表达å¼ï¼æ ¡éª yyyy-MM-dd |
| | | temp = this.initMainData.HInspectionDate; |
| | | if (!regex.test(temp)) { |
| | | this.$modal.msgError("请设置çäº§æ¥æï¼ï¼ï¼"); |
| | | 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": this.initMainData.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 |
| | | , "HSourceBillSEQ": this.initMainData.HSourceBillSEQ |
| | | , "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 |
| | | , "HSeOrderBillNo": this.initMainData.HSeOrderBillNo |
| | | , "HMTONo": this.initMainData.HMTONo |
| | | } |
| | | ] |
| | | |
| | | 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 æ¡ç æ¡£æ¡æé®ç¹å»äºä»¶ |
| | | get_BarCodeBillList() { |
| | | this.$router.push({ path: "/warehouse/barcodeMaster/Gy_BarCodeBillList_JinLong_AutoLogin" }).catch(() => { }); |
| | | }, |
| | | //#endregion |
| | | |
| | | |
| | | //#region䏿¨çææ¡ç |
| | | async get_BarCodeBillHSEQ() { |
| | | var params = this.get_UrlVars(); |
| | | var HSourceInterID = params[params[1]]; |
| | | var HSourceEntryID = params[params[2]]; |
| | | var res1 = await this.getPushSource_POInStockBillInit1(HSourceInterID, HSourceEntryID); |
| | | var temp = res1.data.data[0]; |
| | | var dataArray = [temp]; |
| | | var HSEQ |
| | | if (dataArray && dataArray.length > 0 && dataArray[0]) { |
| | | if (dataArray[0].HSEQ == '') { |
| | | HSEQ = 0; |
| | | } else { |
| | | HSEQ = dataArray[0].HSEQ; |
| | | } |
| | | } else { |
| | | HSEQ = 0; |
| | | } |
| | | this.$router.push({ |
| | | path: `/warehouse/barcodeMaster/Gy_BarCodeBillList_JinLong_AutoLogin?OperationType=4&HSourceInterID=${HSourceInterID}&HSourceEntryID=${HSourceEntryID}&HSEQ=${HSEQ}` |
| | | }).catch(() => { }); |
| | | }, |
| | | |
| | | //#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 getPushSource_POInStockBillInit1(HSourceInterID, HSourceEntryID) { |
| | | var sql = `SELECT m.*, s.* |
| | | FROM Cg_POInStockBillMain m |
| | | INNER JOIN Cg_POInStockBillSub s ON m.hinterid = s.HInterID |
| | | WHERE 1=1`; |
| | | sql += ` AND m.hinterid = ${HSourceInterID}`; |
| | | sql += ` AND s.HEntryID = ${HSourceEntryID}`; |
| | | var ModRightNameCheck = ""; |
| | | return axios.get(this.$baseUrl + '/CommonModel/searchMethod', { |
| | | params: { |
| | | "sql": sql, |
| | | "user": sessionStorage["HUserName"], |
| | | "ModRightNameCheck": ModRightNameCheck |
| | | }, |
| | | }) |
| | | }, |
| | | //#endregion |
| | | |
| | | //#endregion |
| | | |
| | | //#region 䏿¨é¡µé¢åå§å |
| | | async setInit_PushBill(HSourceInterID, HSourceEntryID) { |
| | | //è·ååæ° |
| | | var params = this.get_UrlVars(); |
| | | var OperationType = params[params[0]]; //æä½ç±»å |
| | | var HSourceInterID = params[params[1]]; //æºå主id |
| | | var HSourceEntryID = params[params[2]]; //æºååid |
| | | var HSourceBillType = params[params[3]]; //æºåç±»å |
| | | var HSourceBillNo = params[params[4]]; //æºååå· |
| | | |
| | | //è·åæºåä¿¡æ¯ |
| | | var temp = null; |
| | | var res = "none" |
| | | var res1 = "none" |
| | | try { |
| | | res1 = await this.getPushSource_POInStockBillInit1(HSourceInterID, HSourceEntryID); |
| | | if (res1.data.data.length <= 0) { |
| | | this.$modal.msgError("å½ååæ®æªåæ¥ï¼è¯·è¿åéè¶äºSRMå¹³å°éè´§åå表æ¾å°è¯¥åæ®å¨æ¥ç页é¢ç¹å»ãä¼ éWMSãæé®ï¼ï¼"); |
| | | } else { |
| | | 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].ç©æä»£ç == null ? "" : dataArray[0].ç©æä»£ç ; |
| | | 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.HSeOrderBillNo = dataArray[0].客æ·è®¢åå·; |
| | | this.initMainData.HCusModel = dataArray[0].产ååå·; |
| | | this.initMainData.HMTONo = dataArray[0].计åè·è¸ªå·; |
| | | this.initMainData.HSourceBillSEQ = 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 selectReportFormBillList() { |
| | | try { |
| | | let res = await axios.post(`${this.$baseUrl}/Sc_BarCode/SelectReportFromBillList`, |
| | | { |
| | | msg: this.BillInfoProps |
| | | } |
| | | ) |
| | | |
| | | let { data, count, Message, code } = res.data |
| | | if (count == 1) { |
| | | this.tableData_Mater = data |
| | | } else { |
| | | this.$modal.msgError(code + Message); |
| | | } |
| | | } catch (err) { |
| | | this.$modal.msgError(err); |
| | | } |
| | | }, |
| | | //#endregion |
| | | |
| | | //#region çææ¡ç æç» |
| | | async generateBarCode() { |
| | | try { |
| | | let res = await axios.post(`${this.$baseUrl}/Sc_BarCode/Sub_SaveBill`, { |
| | | msg: tableData_Mater |
| | | }) |
| | | |
| | | let { data, count, Message, code } = res.data |
| | | if (count == 1) { |
| | | this.tableData_BarCode = data |
| | | } else { |
| | | this.$modal.msgError(code + Message); |
| | | } |
| | | |
| | | } catch (err) { |
| | | this.$modal.msgError(err); |
| | | } |
| | | }, |
| | | //#endregion |
| | | |
| | | //#region èªå¨ç»å½ |
| | | async loging() { |
| | | // æ¹é䏿¨ ä½¿ç¨æ°ç»ç±»å ä¸ä¸å¯¹åº æºå主idåæºååid å¦ |
| | | // æå¥½ä¸è¦éè¿urlå»ä¸æ¨ï¼å®¹æè¶
é¿åº¦ï¼ä½¿ç¨:prop æè
windowç»å®å±æ§ æè
this.$refs.模åå.屿§ç´æ¥èµå¼çæ¹å¼ã |
| | | // [{"BillType":"1103","BillTitle":"æ¶æéç¥å","BillNo":"CGSLD250304019","BillMainID":100304,"BillSubID":100426,"SPID":0,"BatchNo":"","HAuxPropID":0}] |
| | | var params = this.get_UrlVars(); |
| | | var OperationType = params[params[0]]; //æä½ç±»å |
| | | var HSourceInterID = params[params[1]]; //æºå主id(æ¹éè·å) |
| | | var HSourceEntryID = params[params[2]]; //æºååid(æ¹éè·å) |
| | | var HSourceBillType = params[params[3]]; //æºåç±»å |
| | | var HSourceBillNo = params[params[4]]; //æºååå·(æ¹éè·å) |
| | | |
| | | //var encodedString = params[params[6]]; // ä»C#è·åçç¼ç å符串 |
| | | //var decodedBytes = atob(encodedString); // è§£ç 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 = ""; |
| | | try { |
| | | let response = await axios.get(this.$baseUrl + "/CommonModel/searchMethod", { |
| | | params: { |
| | | "sql": sql_getHOrgName |
| | | , "user": HUserName |
| | | , "ModRightNameCheck": ModRightNameCheck |
| | | } |
| | | }) |
| | | |
| | | 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(() => { }) |
| | | }; |
| | | |
| | | |
| | | // åå
¥sessionStorage éè¦æ¶é´ï¼åç»æä½éè¦çå¾
åå
¥sessionStorage宿ååæ§è¡ |
| | | var sql_login = "select * from h_v_Gy_Czygl_Login where Czymc = '" + HUserName + "'"; |
| | | try { |
| | | let res = await axios.get(this.$baseUrl + "/CommonModel/searchMethod", { |
| | | params: { |
| | | "sql": sql_login |
| | | , "user": HUserName |
| | | , "ModRightNameCheck": "" |
| | | } |
| | | }) |
| | | |
| | | |
| | | var data1 = res.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"; |
| | | |
| | | |
| | | this.selectReportFromBillList() |
| | | } 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> |