From 3e049efc6eb3970bb200058e41468f0a38de1a7e Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期二, 20 一月 2026 16:14:09 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-VUEUI
---
src/views/warehouse/barcodeMaster/Gy_BarCodeBill.vue | 890 ++++++++++++++++++++++++++++++----------------------------
1 files changed, 463 insertions(+), 427 deletions(-)
diff --git a/src/views/warehouse/barcodeMaster/Gy_BarCodeBill.vue b/src/views/warehouse/barcodeMaster/Gy_BarCodeBill.vue
index 1bb21c8..c731604 100644
--- a/src/views/warehouse/barcodeMaster/Gy_BarCodeBill.vue
+++ b/src/views/warehouse/barcodeMaster/Gy_BarCodeBill.vue
@@ -1,21 +1,20 @@
<template>
<div v-loading="formLoading" v-if="formShow" style="margin: 10px;">
<div style=" margin-bottom: 10px; border-bottom: 1px solid #f6f6f6;">
- <el-button type="primary">棰勮鎵撳嵃</el-button>
- <el-button type="primary">鐢熸垚</el-button>
- <el-button type="primary">閲嶇疆</el-button>
+ <el-button type="primary" @click="get_PrintReport">棰勮鎵撳嵃</el-button>
+ <el-button type="primary" @click="ToolCreate" :disabled="disabledToolCreate">鐢熸垚</el-button>
+ <!-- <el-button type="primary">閲嶇疆</el-button>
<el-button type="primary">搴撳瓨</el-button>
- <el-button type="primary">鍚屾璧勬枡</el-button>
- <el-button type="primary">鎵规</el-button>
+ <el-button type="primary">鍚屾璧勬枡</el-button> -->
+ <el-button type="primary" @click="ToolBatch">鎵规</el-button>
<el-button type="primary" @click="close">閫� 鍑�</el-button>
</div>
- <div style="margin: 10px; font-size: 28px; font-weight: bold; text-align: center;">鍣ㄥ叿妗f缂栬緫</div>
+ <div style="margin: 10px; font-size: 28px; font-weight: bold; text-align: center;">鏉$爜鐢熸垚</div>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row>
<el-col :span="6">
- <el-form-item label="缁勭粐" prop="HOrgID">
- <el-select v-model="form.HOrgID" placeholder="璇烽�夋嫨缁勭粐" @change="organizationChange"
- style="width: 100%">
+ <el-form-item label="缁勭粐" prop="HOrgID" @change="HOrgIDChange">
+ <el-select v-model="form.HOrgID" placeholder="璇烽�夋嫨缁勭粐" style="width: 100%">
<el-option v-for="(item, index) in organizationList" :key="index" :label="item.Name"
:value="item.ID">
</el-option>
@@ -24,7 +23,7 @@
</el-col>
<el-col :span="6">
<el-form-item label="宸ュ巶浠g爜" prop="HWorksNumber">
- <el-select v-model="form.HWorksNumber" placeholder="璇烽�夋嫨缁勭粐" style="width: 100%">
+ <el-select v-model="form.HWorksNumber" placeholder="璇烽�夋嫨宸ュ巶" style="width: 100%">
<el-option v-for="(item, index) in HWorksNumberList" :key="index" :label="item"
:value="item">
</el-option>
@@ -52,7 +51,8 @@
<el-col :span="6">
<el-form-item label="閫夊崟鍙�" prop="HSourceBillNo">
<el-input v-model="form.HSourceBillNo" placeholder="璇疯緭鍏ラ�夊崟鍙�" disabled>
- <el-button slot="append" icon="el-icon-search" @click="openDataDialog(openNum)"></el-button>
+ <el-button class="input-search-btn" slot="append" icon="el-icon-search"
+ @click="openDataDialog(null)"></el-button>
</el-input>
</el-form-item>
</el-col>
@@ -66,8 +66,8 @@
</el-form-item>
</el-col>
</el-row>
- <el-tabs type="border-card">
- <el-tab-pane label="鐗╂枡淇℃伅">
+ <el-tabs type="border-card" v-model="barcodeName">
+ <el-tab-pane label="鐗╂枡淇℃伅" name="wuliao">
<div style="margin-bottom: 10px;">
<el-button type="success" plain icon="el-icon-plus" @click="handleAddSysZb()"
size="mini">澧炲姞涓�琛�</el-button>
@@ -77,38 +77,68 @@
<el-table :data="editWlxxData" style="width: 100%" height="480" width="100%" ref="wlxxzbTable"
@selection-change="handleTableWlxxZbEdit" :row-class-name="wlxxzbRowSysZbIndex" border>
<el-table-column type="selection" width="55" align="center" />
- <el-table-column align="center" label="搴忓彿" type="index" width="80" fixed show-overflow-tooltip/>
+ <el-table-column align="center" label="搴忓彿" type="index" width="80" fixed
+ show-overflow-tooltip />
<el-table-column align="center" label="婧愬崟鍗曞彿" prop="HBillNo" width="120" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.HBillNo }} </template>
</el-table-column>
- <el-table-column align="center" label="鐗╂枡浠g爜" prop="HMaterNumber" width="120" show-overflow-tooltip>
- <template slot-scope="scope"><el-input v-model="scope.row.HMaterNumber" /></template>
+ <el-table-column align="center" label="鐗╂枡浠g爜" prop="HMaterNumber" width="120"
+ show-overflow-tooltip>
+ <template slot-scope="scope">
+ <el-input v-model="scope.row.HMaterNumber"
+ @keyup.native.f7="openDataDialog(3, scope.row)"
+ @dblclick.native="openDataDialog(3, scope.row)" />
+ </template>
</el-table-column>
- <el-table-column align="center" label="鐗╂枡鍚嶇О" prop="HMaterName" width="120" show-overflow-tooltip>
+ <el-table-column align="center" label="鐗╂枡鍚嶇О" prop="HMaterName" width="120"
+ show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.HMaterName }}</template>
</el-table-column>
- <el-table-column align="center" label="瑙勬牸鍨嬪彿" prop="HMaterModel" width="120" show-overflow-tooltip>
+ <el-table-column align="center" label="瑙勬牸鍨嬪彿" prop="HMaterModel" width="120"
+ show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.HMaterModel }}</template>
</el-table-column>
- <el-table-column align="center" label="瀹㈡埛瑙勬牸鍨嬪彿" prop="HCusModel" width="120" show-overflow-tooltip>
+
+ <el-table-column align="center" label="鏁伴噺" prop="HQty" width="120" show-overflow-tooltip>
+ <template slot-scope="scope">
+ <el-input-number v-model="scope.row.HQty" :min="0" controls-position="right"
+ style="width: 100%;" @change="editMainTable(scope.row)" />
+ </template>
+ </el-table-column>
+ <el-table-column align="center" label="鏈�灏忓寘瑁呮暟" prop="HMinQty" width="120" show-overflow-tooltip>
+ <template slot-scope="scope">
+ <el-input-number v-model="scope.row.HMinQty" :min="0" controls-position="right"
+ style="width: 100%;" @change="editMainTable(scope.row)" />
+ </template>
+ </el-table-column>
+ <el-table-column align="center" label="绠辨暟" prop="HBQty" width="120" show-overflow-tooltip>
+ <template slot-scope="scope">{{ scope.row.HBQty }}</template>
+ </el-table-column>
+ <el-table-column align="center" label="瀹㈡埛瑙勬牸鍨嬪彿" prop="HCusModel" width="120"
+ show-overflow-tooltip>
<template slot-scope="scope"><el-input v-model="scope.row.HCusModel" /></template>
</el-table-column>
- <el-table-column align="center" label="瀹㈡埛鐗╂枡鍚嶇О" prop="HCusMaterName" width="120" show-overflow-tooltip>
+ <el-table-column align="center" label="瀹㈡埛鐗╂枡鍚嶇О" prop="HCusMaterName" width="120"
+ show-overflow-tooltip>
<template slot-scope="scope"> <el-input v-model="scope.row.HCusMaterName" /></template>
</el-table-column>
- <el-table-column align="center" label="鎿嶄綔鍛樹唬鐮�" prop="HEmpNumber" width="120" show-overflow-tooltip>
+ <el-table-column align="center" label="鎿嶄綔鍛樹唬鐮�" prop="HEmpNumber" width="120"
+ show-overflow-tooltip>
<template slot-scope="scope"> <el-input v-model="scope.row.HEmpNumber" /></template>
</el-table-column>
<el-table-column align="center" label="鎿嶄綔鍛�" prop="HEmpName" width="120" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.HEmpName }}</template>
</el-table-column>
- <el-table-column align="center" label="鐝粍浠g爜" prop="HGroupNumber" width="120" show-overflow-tooltip>
+ <el-table-column align="center" label="鐝粍浠g爜" prop="HGroupNumber" width="120"
+ show-overflow-tooltip>
<template slot-scope="scope"><el-input v-model="scope.row.HGroupNumber" /></template>
</el-table-column>
- <el-table-column align="center" label="鐝粍鍚嶇О" prop="HGroupName" width="120" show-overflow-tooltip>
+ <el-table-column align="center" label="鐝粍鍚嶇О" prop="HGroupName" width="120"
+ show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.HGroupName }}</template>
</el-table-column>
- <el-table-column align="center" label="妫�楠屽憳" prop="HCheckEmpName" width="120" show-overflow-tooltip>
+ <el-table-column align="center" label="妫�楠屽憳" prop="HCheckEmpName" width="120"
+ show-overflow-tooltip>
<template slot-scope="scope"><el-input v-model="scope.row.HCheckEmpName" /></template>
</el-table-column>
<el-table-column align="center" label="鎵瑰彿" prop="HBatchNo" width="120" show-overflow-tooltip>
@@ -117,21 +147,7 @@
<el-table-column align="center" label="璁″垝璺熻釜鍙�" prop="HMTONo" width="120" show-overflow-tooltip>
<template slot-scope="scope"><el-input v-model="scope.row.HMTONo" /></template>
</el-table-column>
- <el-table-column align="center" label="鏁伴噺" prop="HQty" width="120" show-overflow-tooltip>
- <template slot-scope="scope">
- <el-input-number v-model="scope.row.HQty" :min="0" controls-position="right"
- style="width: 100%;" />
- </template>
- </el-table-column>
- <el-table-column align="center" label="鏈�灏忓寘瑁呮暟" prop="HMinQty" width="120" show-overflow-tooltip>
- <template slot-scope="scope">
- <el-input-number v-model="scope.row.HMinQty" :min="0" controls-position="right"
- style="width: 100%;" />
- </template>
- </el-table-column>
- <el-table-column align="center" label="绠辨暟" prop="HBQty" width="120" show-overflow-tooltip>
- <template slot-scope="scope">{{ scope.row.HBQty }}</template>
- </el-table-column>
+
<el-table-column align="center" label="澶栫鏁�" prop="HPackQty" width="120" show-overflow-tooltip>
<template slot-scope="scope"><el-input v-model="scope.row.HPackQty" /></template>
</el-table-column>
@@ -144,25 +160,29 @@
<el-table-column align="center" label="鍘傚晢" prop="HFactory" width="120" show-overflow-tooltip>
<template slot-scope="scope"><el-input v-model="scope.row.HFactory" /></template>
</el-table-column>
- <el-table-column align="center" label="瀹㈡埛浠g爜" prop="HCusNumber" width="120" show-overflow-tooltip>
+ <el-table-column align="center" label="瀹㈡埛浠g爜" prop="HCusNumber" width="120"
+ show-overflow-tooltip>
<template slot-scope="scope"><el-input v-model="scope.row.HCusNumber" /></template>
</el-table-column>
<el-table-column align="center" label="瀹㈡埛鍚嶇О" prop="HCusName" width="120" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.HCusName }}</template>
</el-table-column>
- <el-table-column align="center" label="閿�鍞鍗曞彿" prop="HSeOrderBillNo" width="120" show-overflow-tooltip>
+ <el-table-column align="center" label="閿�鍞鍗曞彿" prop="HSeOrderBillNo" width="120"
+ show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.HSeOrderBillNo }}</template>
</el-table-column>
<el-table-column align="center" label="澶囨敞" prop="HRemark" width="120" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.HRemark }}</template>
</el-table-column>
- <el-table-column align="center" label="鐢熶骇鏃ユ湡" prop="HProduceDate" width="120" show-overflow-tooltip>
+ <el-table-column align="center" label="鐢熶骇鏃ユ湡" prop="HProduceDate" width="120"
+ show-overflow-tooltip>
<template slot-scope="scope">
<el-date-picker v-model="scope.row.HProduceDate" type="date" placeholder="閫夋嫨鏃ユ湡"
value-format="yyyy-MM-dd" style="width: 100%"> </el-date-picker>
</template>
</el-table-column>
- <el-table-column align="center" label="淇濊川鏈熻嚦" prop="HExpiryDate" width="120" show-overflow-tooltip>
+ <el-table-column align="center" label="淇濊川鏈熻嚦" prop="HExpiryDate" width="120"
+ show-overflow-tooltip>
<template slot-scope="scope">
<el-date-picker v-model="scope.row.HExpiryDate" type="date" placeholder="閫夋嫨鏃ユ湡"
value-format="yyyy-MM-dd" style="width: 100%"> </el-date-picker>
@@ -171,27 +191,37 @@
<el-table-column align="center" label="鐑鐞�" prop="HheatNO" width="120" show-overflow-tooltip>
<template slot-scope="scope"><el-input v-model="scope.row.HheatNO" /></template>
</el-table-column>
- <el-table-column align="center" label="杈呭姪灞炴�т唬鐮�" prop="HAuxPropNumber" width="120" show-overflow-tooltip>
- <template slot-scope="scope"><el-input v-model="scope.row.HAuxPropNumber" /></template>
+ <el-table-column align="center" label="杈呭姪灞炴�т唬鐮�" prop="HAuxPropNumber" width="120"
+ show-overflow-tooltip>
+ <template slot-scope="scope">
+ <el-input v-model="scope.row.HAuxPropNumber"
+ @keyup.native.f7="openDataDialog(1, scope.row)"
+ @dblclick.native="openDataDialog(1, scope.row)" />
+ </template>
</el-table-column>
- <el-table-column align="center" label="杈呭姪灞炴�у悕绉�" prop="HAuxPropName" width="120" show-overflow-tooltip>
+ <el-table-column align="center" label="杈呭姪灞炴�у悕绉�" prop="HAuxPropName" width="120"
+ show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.HAuxPropName }}</template>
</el-table-column>
- <el-table-column align="center" label="璁¢噺鍗曚綅浠g爜" prop="HUnitNumber" width="120" show-overflow-tooltip>
+ <el-table-column align="center" label="璁¢噺鍗曚綅浠g爜" prop="HUnitNumber" width="120"
+ show-overflow-tooltip>
<template slot-scope="scope"><el-input v-model="scope.row.HUnitNumber" /></template>
</el-table-column>
- <el-table-column align="center" label="璁¢噺鍗曚綅鍚嶇О" prop="HUnitName" width="120" show-overflow-tooltip>
+ <el-table-column align="center" label="璁¢噺鍗曚綅鍚嶇О" prop="HUnitName" width="120"
+ show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.HUnitName }}</template>
</el-table-column>
<el-table-column align="center" label="杈呭崟浣嶆暟閲�" prop="HAuxQty" width="120" show-overflow-tooltip>
<template slot-scope="scope"><el-input v-model="scope.row.HAuxQty" /></template>
</el-table-column>
- <el-table-column align="center" label="鏄惁鍚敤淇濊川鏈�" prop="HExpirationDateFlag" width="120" show-overflow-tooltip>
+ <el-table-column align="center" label="鏄惁鍚敤淇濊川鏈�" prop="HExpirationDateFlag" width="120"
+ show-overflow-tooltip>
<template slot-scope="scope">
<el-checkbox v-model="scope.row.HExpirationDateFlag"></el-checkbox>
</template>
</el-table-column>
- <el-table-column align="center" label="鏄惁璧犲搧" prop="HGiveAwayFlag" width="120" show-overflow-tooltip>
+ <el-table-column align="center" label="鏄惁璧犲搧" prop="HGiveAwayFlag" width="120"
+ show-overflow-tooltip>
<template slot-scope="scope">
<el-checkbox v-model="scope.row.HGiveAwayFlag"></el-checkbox>
</template>
@@ -204,121 +234,101 @@
</el-table-column>
</el-table>
</el-tab-pane>
- <el-tab-pane label="鏉$爜淇℃伅">
+ <el-tab-pane label="鏉$爜淇℃伅" name="tiaoma">
<el-table :data="editTmData" style="width: 100%" height="480" width="100%" ref="tbzbTable"
- @selection-change="handleTableWlxxZbEdit" :row-class-name="wlxxzbRowSysZbIndex" border>
- <el-table-column type="selection" width="55" align="center" />
+ @selection-change="handleTableWlxxZbEdit" :row-class-name="tiaomaZbIndex" border
+ v-if="editTmData.length > 0">
<el-table-column align="center" label="搴忓彿" type="index" width="80" fixed />
<template v-for="(item, index) in tmBtList">
<el-table-column align="center" :prop="item.field" :label="item.title" :width="item.width"
- :key="index" show-overflow-tooltip v-if="!item.hide">
- <template slot-scope="{row, column }">
- <div :style="item.style">
- <el-input v-if="item.edit == 'text'" v-model="row[column.label]" />
- <el-input-number v-else-if="item.edit == 'number'" v-model="row[column.label]"
- :min="0" controls-position="right" style="width: 100%;" />
- <el-date-picker v-else-if="item.edit == 'date'" v-model="row[column.label]"
- type="date" placeholder="閫夋嫨鏃ユ湡" value-format="yyyy-MM-ddT"
- style="width: 100%"> </el-date-picker>
- <el-checkbox v-else-if="item.edit == 'checkbox'"
- v-model="row[column.label]"></el-checkbox>
- <span v-else>{{ row[column.label] }}</span>
- </div>
- </template>
- </el-table-column>
+ :key="index" show-overflow-tooltip v-if="!item.hide" />
</template>
- <el-table-column align="center" label="鎿嶄綔" width="55" fixed="right">
- <template slot-scope="scope">
- <el-button type="danger" icon="el-icon-delete" size="mini" circle
- @click="handleDeleteSysZb(scope.row)"></el-button>
- </template>
- </el-table-column>
</el-table>
</el-tab-pane>
- <el-tab-pane label="妗f鍒楄〃"><el-table :data="editDaData" style="width: 100%" height="480" width="100%"
- ref="dazbTable" @selection-change="handleTableWlxxZbEdit" :row-class-name="wlxxzbRowSysZbIndex"
- border>
+ <el-tab-pane label="妗f鍒楄〃" name="dangan">
+ <el-table :data="editDaData" style="width: 100%" height="480" width="100%" ref="dazbTable"
+ @selection-change="handleTableDangan" :row-class-name="danganZbIndex" border
+ v-if="editDaData.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 daBtList">
<el-table-column align="center" :prop="item.field" :label="item.title" :width="item.width"
:key="index" show-overflow-tooltip v-if="!item.hide">
<template slot-scope="{row, column }">
- <div :style="item.style">
- <el-input v-if="item.edit == 'text'" v-model="row[column.label]" />
- <el-input-number v-else-if="item.edit == 'number'" v-model="row[column.label]"
- :min="0" controls-position="right" style="width: 100%;" />
- <el-date-picker v-else-if="item.edit == 'date'" v-model="row[column.label]"
- type="date" placeholder="閫夋嫨鏃ユ湡" value-format="yyyy-MM-ddT"
- style="width: 100%"> </el-date-picker>
- <el-checkbox v-else-if="item.edit == 'checkbox'"
- v-model="row[column.label]"></el-checkbox>
- <span v-else>{{ row[column.label] }}</span>
- </div>
+ <div :style="item.style"><span>{{ row[column.label] }}</span> </div>
</template>
</el-table-column>
</template>
- <el-table-column align="center" label="鎿嶄綔" width="55" fixed="right">
- <template slot-scope="scope">
- <el-button type="danger" icon="el-icon-delete" size="mini" circle
- @click="handleDeleteSysZb(scope.row)"></el-button>
- </template>
- </el-table-column>
- </el-table></el-tab-pane>
+ </el-table>
+ </el-tab-pane>
</el-tabs>
</el-form>
<!-- 閮ㄩ棬寮圭獥 -->
- <el-dialog :title="dialogTitle" :visible.sync="openData" width="1280px" append-to-body>
- <Dept @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="deptShow" />
- <Warehouse @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="warehouseShow" />
- <Material @deptEmitDb="dbEmitData" @deptEmit="emitData" v-if="materialShow" />
- <GyEmployee @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gyEmployeeShow" />
- <ScICMOBillList @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="ScICMOBillShow" />
+ <el-dialog :title="dialogTitle" :visible.sync="openData" width="1280px" append-to-body @close="closeBill">
+ <HSourceReportHtml @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName"
+ :HOrgID='this.form.HOrgID' :HSouceBillType="HSouceBillType" v-if="ScICMOBillShow" />
+ <Material @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="materialShow" />
+ <GyProperty @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="propertyShow" />
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="deptClickSub">纭� 瀹�</el-button>
<el-button @click="deptClose">鍙� 娑�</el-button>
</div>
</el-dialog>
+ <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" />
+ <!-- <div>111</div> -->
+ </el-dialog>
</div>
</template>
<script>
import axios from 'axios'
-import Dept from '@/views/component/dept'
-import Warehouse from '@/views/component/warehouse'
-import Material from '@/views/component/material'
-import RowSettings from '@/views/component/rowSettings'
-import GyEmployee from '@/views/basic/gyEmployee/gyEmployee.vue'
-import ScICMOBillList from '@/views/ICMO/ScICMOBillList.vue'
+import HSourceReportHtml from '@/views/component/HSourceReportHtml'
+import PrintList from "@/views/component/printList";
import moment from 'moment';
+import GyProperty from "@/views/basic/gyProperty/gyPropertyList.vue";
+import Material from '@/views/gyMaterial/GyMaterial.vue'
export default {
name: 'Gy_BarCodeBill',
- components: { Dept, Warehouse, Material, RowSettings, GyEmployee, ScICMOBillList },
+ components: { HSourceReportHtml, PrintList, GyProperty, Material },
props: {
OperationType: { type: Number, },
linterid: { type: Number, },
- HSouceBillType: { type: String, },
propsData: { type: String, },
copyType: { type: Number, },
},
data() {
return {
+ rowSel: [],
HModName: "Gy_BarCodeBill",
+ danganSelList: [],
+ openPrintList: false,
+ printListShow: false,
+ barcodeName: 'wuliao',
+ HOrgSel: sessionStorage["Organization"],
+ HMaterInfo: [],
+ HSouceBillType: '鐢熶骇璁㈠崟',
+ disabledToolCreate: false,
+ HMinQty2: 0,
+ BatchNoArray: [], //鐢ㄦ潵瀛樺偍鑾峰彇鍒扮殑鎵瑰彿锛屽湪鎵规鎸夐挳鍔熻兘涓敤鍒�
+ HMaterID: "",
+ HBatchNo: "",
openNum: 10,
zbDataShow: true,
HSourceBillTypeList: [
- { value: 1, label: '鐢熶骇璁㈠崟', },
- { value: 2, label: '鐢熶骇姹囨姤鍗�', },
- { value: 3, label: '閲囪喘璁㈠崟', },
- { value: 4, label: '鏀舵枡閫氱煡鍗�', },
- { value: 5, label: '濮斿璁㈠崟', },
- { value: 6, label: '鐢熶骇鍏ュ簱鍗�', },
- { value: 7, label: '閲囪喘鍏ュ簱鍗�', },
- { value: 8, label: '閿�鍞��璐у崟', },
- { value: 9, label: '鐢熶骇閫�鏂欏崟', },
- { value: 10, label: '宸ュ簭娴佽浆鍗�', },
- { value: 11, label: '閿�鍞嚭搴撳崟', },
- { value: 12, label: '棰嗘枡鍑哄簱鍗�', }
+ { value: '1', label: '鐢熶骇璁㈠崟', },
+ { value: '2', label: '鐢熶骇姹囨姤鍗�', },
+ { value: '3', label: '閲囪喘璁㈠崟', },
+ { value: '4', label: '鏀舵枡閫氱煡鍗�', },
+ { value: '5', label: '濮斿璁㈠崟', },
+ { value: '6', label: '鐢熶骇鍏ュ簱鍗�', },
+ { value: '7', label: '閲囪喘鍏ュ簱鍗�', },
+ { value: '8', label: '閿�鍞��璐у崟', },
+ { value: '9', label: '鐢熶骇閫�鏂欏崟', },
+ { value: '10', label: '宸ュ簭娴佽浆鍗�', },
+ { value: '11', label: '閿�鍞嚭搴撳崟', },
+ { value: '12', label: '棰嗘枡鍑哄簱鍗�', }
],
wlxxBtList: [{ field: 'HMainID', title: '婧愬崟涓诲唴鐮�', width: 100, hide: true }
, { field: 'HSubID', title: '婧愬崟瀛愬唴鐮�', width: 100, hide: true }
@@ -456,6 +466,7 @@
materialShow: false,//鐗╂枡鏁版嵁缁勪欢
gyEmployeeShow: false,//閿�鍞憳鏁版嵁缁勪欢
ScICMOBillShow: false,
+ propertyShow: false,
deptform: {},//寮圭獥閫変腑鏁版嵁
openData: false,//鏁版嵁寮圭獥
dialogTitle: '',
@@ -468,6 +479,8 @@
editWlxxData: [],//瀛愯〃
editTmData: [],
editDaData: [],
+ HBarInfo: [],
+ HFileList: [],
editBtData: [],//瀛愯〃琛ㄥご
activeName: 'first',
// 寮瑰嚭灞傛爣棰�
@@ -526,55 +539,160 @@
this.getdata()
},
methods: {
- editMainTable(obj) {
- console.log(obj)
- var value = obj.value //寰楀埌淇敼鍚庣殑鍊�
- , data = obj.data //寰楀埌鎵�鍦ㄨ鎵�鏈夐敭鍊�
- , field = obj.field; //寰楀埌瀛楁
- //layer.msg('[ID: ' + data.id + '] ' + field + ' 瀛楁鏇存敼涓猴細' + value);
-
- switch (field) {
- case "HQty": //鏁伴噺
- value = isNaN(value) ? 0 : value;
- var HMinQty = isNaN(data.HMinQty) ? 0 : data.HMinQty;
- if (HMinQty == 0) {
- //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
- obj.update({
- HQty: value, //鏁伴噺
- HBQty: 0, //绠辨暟=鏁伴噺/鏈�灏忓寘瑁呮暟閲�
- });
- }
- else {
- //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
- obj.update({
- HQty: value, //鏁伴噺
- HBQty: Math.ceil(value / HMinQty), //绠辨暟=鏁伴噺/鏈�灏忓寘瑁呮暟閲�
- });
- }
- break;
- case "HMinQty": //鏈�灏忓寘瑁呮暟閲�
- value = isNaN(value) ? 0 : value;
- HMinQty2 = value; //缁欐壒娆℃寜閽姛鑳戒腑鐨勬渶灏忓寘瑁呮暟璧嬪��
- var HQty = isNaN(data.HQty) ? 0 : data.HQty;
- if (HQty == 0) //闄ゆ暟涓�0
- {
- //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
- obj.update({
- HMinQty: value, //鏈�灏忓寘瑁呮暟閲�
- HBQty: 0, //绠辨暟=鏁伴噺/鏈�灏忓寘瑁呮暟閲�
- });
- }
- else {
- //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
- obj.update({
- HMinQty: value, //鏈�灏忓寘瑁呮暟閲�
- HBQty: Math.ceil(HQty / value), //绠辨暟=鏁伴噺/鏈�灏忓寘瑁呮暟閲�
- });
- }
-
- break;
- default:
+ closeBill() {
+ this.ScICMOBillShow = false
+ },
+ get_PrintReport() {
+ if (this.danganSelList.length == 0) {
+ this.$modal.msgError("璇烽�夋嫨鏁版嵁");
+ } else {
+ this.rowSel = [];
+ for (var i = 0; i < this.danganSelList.length; i++) {
+ this.rowSel.push(this.danganSelList[i].HItemID.toString());
+ }
+ this.printListShow = true;
+ this.openPrintList = true;
+ // axios.get(this.$baseUrl + "/Kf_SellOutBill/CheckSellOutBill_IsExist", {
+ // params: { HInterID: this.rowForm.hmainid },
+ // })
+ // .then((response) => {
+ // var result = response.data;
+ // if (result.count == 1) {
+ // this.printListShow = true;
+ // this.openPrintList = true;
+ // } else {
+ // this.$modal.msgError(result.code + result.Message);
+ // }
+ // })
+ // .catch((error) => {
+ // this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ // });
}
+ },
+ HOrgIDChange(val) {
+ this.organizationList.map(item => {
+ if (item.ID == val) {
+ this.HOrgSel = item.Name
+ }
+ })
+ },
+ ToolBatch() {
+ if (this.HMinQty2 == 0 && this.HMaterID) {
+ axios.get(this.$baseUrl + '/Sc_BarCode/Batch', {
+ params: {
+ "HMaterID": this.HMaterID, "HBatchNo": this.HBatchNo
+ },
+ }).then(response => {
+ let data1 = response.data
+ if (data1.count == 1) {
+ if (data1.code == 1) {
+ this.BatchNoArray[0].HBatchNo = data1.data
+ this.BatchNoArray[0].HMinQty = HMinQty2
+ console.log(this.BatchNoArray)
+ this.$modal.msgSuccess(data1.Message, sessionStorage["HTranSlate"])
+ }
+ } else {
+ this.$modal.msgError(data1.Message);
+ }
+ }).catch(error => {
+ this.$modal.msgError("璇锋偍鍦ㄨ幏鍙栨壒鍙峰悗鍦ㄨ緭鍏ユ渶灏忓寘瑁呮暟 ^_^");
+ })
+ } else {
+ this.$modal.msgError(data1.Message);
+ }
+ },
+ ToolCreate() {
+ this.disabledToolCreate = true
+ for (var i = 0; i < this.editWlxxData.length; i++) {
+ this.editWlxxData[i].HDate = moment(this.form.HDate).format('YYYY-MM-DD');
+ if (this.editWlxxData[i].HMaterName != null && (this.editWlxxData[i].HMaterName.indexOf("\"") != -1 || this.editWlxxData[i].HMaterName.indexOf(";") != -1)) {
+ this.editWlxxData[i].HMaterName = this.editWlxxData[i].HMaterName.replaceAll("\"", "鈥�").replaceAll(";", "锛�")
+ }
+ if (this.editWlxxData[i].HMaterModel != null && (this.editWlxxData[i].HMaterModel.indexOf("\"") != -1 || this.editWlxxData[i].HMaterModel.indexOf(";") != -1)) {
+ this.editWlxxData[i].HMaterModel = this.editWlxxData[i].HMaterModel.replaceAll("\"", "鈥�").replaceAll(";", "锛�")
+ }
+ if (this.editWlxxData[i].HPinfan != null && ("HPinfan" in this.editWlxxData[i])) {
+ if (this.editWlxxData[i].HPinfan.indexOf("\"") != -1 || this.editWlxxData[i].HPinfan.indexOf(";") != -1) {
+ this.editWlxxData[i].HPinfan = this.editWlxxData[i].HPinfan.replaceAll("\"", "鈥�").replaceAll(";", "锛�")
+ }
+ }
+ }
+ var sSubStr = JSON.stringify(this.editWlxxData);
+ this.HMaterInfo = this.editWlxxData
+ if (!this.AllowLoadData(sSubStr)) {//鏁版嵁楠岃瘉
+ this.disabledToolCreate = false//鐢熸垚鎸夐挳鍚敤
+ return false
+ }
+ //鑾峰彇閫夋嫨鐨勭粍缁�
+ var HOrgType = this.HOrgSel
+ console.log(HOrgType)
+ //鑾峰彇閫夋嫨鐨勫伐鍘備唬鐮�
+ var CampanyName = this.form.HWorksNumber
+ if (CampanyName == "" || CampanyName == null) {
+ CampanyName = "xxx";
+ }
+ //鑾峰彇閫夋嫨鐨勬簮鍗曠被鍨�
+ var HSourceBillType = this.form.HSourceBillType
+ //鑾峰彇閫夋嫨鐨勬潯鐮佺被鍨�
+ var HSelectBarCodeType = this.form.HBarCodeType
+ //鑾峰彇褰撳墠鐧诲綍浜哄憳
+ var UserName = sessionStorage["HUserName"];
+ //var UserName = "Admin";
+ var sMainSub = sSubStr + ';' + HOrgType + ';' + HSourceBillType + ';' + HSelectBarCodeType + ';' + CampanyName + ';' + UserName;
+ this.SaveBarCodeCreate(sMainSub);
+ },
+ AllowLoadData(sSubStr) {
+ var Result = true;
+ if (typeof (sSubStr) == "undefined" || sSubStr == "") {
+ this.$modal.msgError("娌℃湁鐗╂枡鏄庣粏璁板綍")
+ return Result = false;
+ }
+ if (typeof (sSubStr) != "undefined" && typeof (sSubStr) != "") {
+ sSubStr = JSON.parse(sSubStr);
+ sSubStr.map((item, index) => {
+ if (!item.HMaterID) {
+ this.$modal.msgError("鏄庣粏璁板綍绗�" + (index + 1) + "琛�,鐗╂枡淇℃伅涓虹┖!")
+ return Result = false;
+ }
+ if (!item.HQty) {
+ this.$modal.msgError("鏄庣粏璁板綍绗�" + (index + 1) + "琛�,鏁伴噺涓虹┖!")
+ return Result = false;
+ }
+ })
+ }
+ else {
+ return Result = true;
+ }
+ return Result;
+ },
+ SaveBarCodeCreate(sMainSub, CampanyName) {
+ axios({
+ method: 'post',
+ url: this.$baseUrl + "/Sc_BarCode/Sub_SaveBill",
+ data: {
+ "msg": sMainSub, "CampanyName": CampanyName
+ },
+ }).then(response => {
+ let result = response.data
+ if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ this.editTmData = result.list // 璋冪敤table.reload 閲嶆柊娓叉煋鏄剧ず鍔犺浇杩藉姞浜嗘暟鎹殑琛ㄦ牸
+ this.HBarInfo = result.list;
+ //鍔犺浇妗f鍒楄〃
+ this.editDaData = result.data
+ this.HFileList = result.data;
+ this.barcodeName = 'dangan'
+ }
+ else {
+ this.disabledToolCreate = false//鐢熸垚鎸夐挳鍚敤
+ this.$modal.msgError(result.Message, sessionStorage["HTranSlate"])
+ }
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+
+ },
+ editMainTable(row) {
+ row.HBQty = Math.ceil(row.HQty / row.HMinQty)
},
HSourceBillTypeChange(val) {
if (val == 1) {
@@ -583,8 +701,7 @@
},
set_HBarCodeType() {
//鑾峰彇鏉$爜绫诲瀷浠g爜
- axios.get(this.baseURL + '/Sc_BarCode/GetHBarCodeTypeBill').then(response => {
- console.log(response)
+ axios.get(this.$baseUrl + '/Sc_BarCode/GetHBarCodeTypeBill').then(response => {
let result = response.data
if (result.count == 1) {
this.HBarCodeTypeList = result.list
@@ -592,8 +709,7 @@
}).catch(error => {
this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
});
- axios.get(this.baseURL + '/Sc_BarCode/GetHWorksNumberBill').then(response => {
- console.log(response)
+ axios.get(this.$baseUrl + '/Sc_BarCode/GetHWorksNumberBill').then(response => {
let result = response.data
if (result.count == 1) {
this.HWorksNumberList = result.list
@@ -604,124 +720,9 @@
},
getdata() {
- console.log(this.copyType, this.OperationType)
this.formShow = false
this.formLoading = true
- if (this.OperationType == 4) {
- this.zzSelDis = true
- this.handleAdd()
- var data = this.getUrlVars_JSON();
- var dataArray = [];
- for (var i = 0; i < data.length; i++) {
- // this.getPushSourceBillInit(data[i].hmainid, data[i].hsubid);
- axios.get(this.baseURL + '/Xs_SeOrderBill/loadXs_SeOrderBill_Push', {
- params: {
- "HInterID": data[i].hmainid
- , "HSubID": data[i].hsubid
- },
- }).then(response => {
- let result = response.data
- if (result.code == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
- this.temp = result.data[0];
- } else {
- this.temp = result.data;
- }
- if (this.temp) {
- dataArray.push(this.temp);
- this.form.HDeptID = dataArray[0].HDeptID
- this.form.HDeptName = dataArray[0].閮ㄩ棬
- this.form.HEmpID = dataArray[0].HEmpID
- this.form.HEmpName = dataArray[0].涓氬姟鍛�
- this.form.HManagerID = dataArray[0].HManagerID
- this.form.HManagerName = dataArray[0].涓荤
- this.form.HMainSourceInterID = "0"
- this.form.HMainSourceEntryID = "0"
- this.form.HMainSourceBillNo = ""
- this.form.HMainSourceBillType = dataArray[0].HBillType
- this.form.HSupID = dataArray[0].HCusID
- this.form.HSupName = dataArray[0].瀹㈡埛
- this.form.HLinkMan = dataArray[0].鑱旂郴浜�
- this.form.HLinkPhone = dataArray[0].鑱旂郴鐢佃瘽
- this.form.HSellSID = dataArray[0].HSellSID
- this.form.HSellSName = dataArray[0].閿�鍞柟寮�
- this.form.HCurID = dataArray[0].HCurID
- this.form.HCurName = dataArray[0].甯佸埆
- this.form.HExRate = dataArray[0].姹囩巼
- for (var i = 0; i < dataArray.length; i++) {
- this.editWlxxData.push(
- {
- "HMaterID": dataArray[i].HMaterID
- , "鐗╂枡浠g爜": dataArray[i].鐗╂枡浠g爜
- , "鐗╂枡鍚嶇О": dataArray[i].鐗╂枡鍚嶇О
- , "瑙勬牸鍨嬪彿": dataArray[i].瑙勬牸鍨嬪彿
- , "HUnitID": dataArray[i].HUnitID
- , "璁¢噺鍗曚綅": dataArray[i].璁¢噺鍗曚綅
- , "HQtyMust": dataArray[i].鏁伴噺.toFixed(6)
- , "HQty": dataArray[i].鏁伴噺.toFixed(6)
- , "HPieceQty": "0"
- , "HPrice": dataArray[i].鍗曚环.toFixed(4)
- , "HTaxPrice": dataArray[i].瀹為檯鍚◣鍗曚环.toFixed(4)
- , "HTaxRate": dataArray[i].绋庣巼
- , "HMoney": dataArray[i].閲戦.toFixed(2)
- , "HTaxMoney": dataArray[i].浠风◣鍚堣.toFixed(2)
- , "HWHID": dataArray[i].HWHID
- , "鍙戣揣浠撳簱": dataArray[i].HWHName
- , "HRemark": ""
- , "HQty_Full": "0"
- , "HQty_Empty": "0"
- , "HQty_Back": "0"
- , "HCostPrice": "0"
- , "HCostMoney": "0"
- , "HSalePrice": "0"
- , "HSeOrderInterID": dataArray[i].hmainid
- , "HSeOrderEntryID": dataArray[i].hsubid
- , "HSeOrderBillNo": dataArray[i].鍗曟嵁鍙�
- , "HSourceInterID": dataArray[i].hmainid
- , "HSourceEntryID": dataArray[i].hsubid
- , "HSourceBillNo": dataArray[i].鍗曟嵁鍙�
- , "HSourceBillType": dataArray[i].HBillType
- , "HRelationQty": "0"
- , "HRelationMoney": "0"
- , 'HSPID': "0"
- , 'HSPName': ""
- , 'HSPGroupID': "0"
- , "HSPGroupName": ""
- , 'HSCWHID': "0"
- , 'HSCWHName': ""
- , 'HSCSPID': "0"
- , 'HSCSPName': ""
- , 'HBatchNo': ""
- , 'HPOOrderInterID': "0"
- , 'HPOOrderEntryID': "0"
- , 'HPOOrderBillNo': ""
- , 'HPropertyID': "0"
- , 'HPropertyName': ""
- , 'HSecUnitID': "0"
- , 'HSecUnitName': ""
- , 'HSecUnitRate': "0"
- , 'HEngineNum': ""
- , 'HUnderPanNum': ""
- , 'HLeaveFactCard': ""
- , 'HReqBuyQty': "0"
- , 'HReqOutQty': "0"
- , 'HCurrentInventory': "0"
- }
- );
- }
- }
- this.$nextTick(() => {
- this.formShow = true
- this.formLoading = false
- })
- }).catch(error => {
- this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
- });
- }
- } else if ((this.OperationType == 1 && this.copyType != 1) || (!this.OperationType && !this.copyType)) {
- this.handleAdd()
- } else if (this.OperationType == 3 || this.copyType == 1) {
- this.handleUpdate()
- }
+ this.handleAdd()
},
// 鑾峰彇鍙傛暟_浼犻�掔殑JSON鏍煎紡鍙傛暟
getUrlVars_JSON() {
@@ -731,24 +732,6 @@
datajson = JSON.parse(decodeURI(arr));
return datajson;
},
- //鏍规嵁涓诲唴鐮佷笌瀛愬唴鐮佽幏鍙栨簮鍗曢攢鍞鍗曟暟鎹�
- getPushSourceBillInit(HSourceInterID, HSourceEntryID) {
- axios.get(this.baseURL + '/Xs_SeOrderBill/loadXs_SeOrderBill_Push', {
- params: {
- "HInterID": HSourceInterID
- , "HSubID": HSourceEntryID
- },
- }).then(response => {
- let result = response.data
- if (result.code == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
- this.temp = result.data[0];
- } else {
- this.temp = result.data;
- }
- }).catch(error => {
- this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
- });
- },
handleRowHide() {
this.rowHideShow = true
this.openRowHide = true
@@ -757,70 +740,147 @@
this.rowHideShow = false
this.openRowHide = val
},
-
- organizationChange(val) {
- // let options=undefined
- // this.form=this.organizationList.find(option => option.ID === val)?.Name || '';
+ getSupType() {
+ var type = this.form.HSourceBillType
+ switch (type) {
+ case '1':
+ return "鐢熶骇璁㈠崟";
+ break;
+ case '2':
+ return "鐢熶骇姹囨姤鍗�";
+ break;
+ case '3':
+ return "閲囪喘璁㈠崟";
+ break;
+ case '4':
+ return "鏀舵枡閫氱煡鍗�";
+ break;
+ case '5':
+ return "濮斿璁㈠崟";
+ break;
+ case '6':
+ return "鐢熶骇鍏ュ簱鍗�";
+ break;
+ case '7':
+ return "閲囪喘鍏ュ簱鍗�";
+ break;
+ case '8':
+ return "閿�鍞��璐у崟";
+ break;
+ case '9':
+ return "鐢熶骇閫�鏂欏崟";
+ break;
+ case '10':
+ return "宸ュ簭娴佽浆鍗�";
+ break;
+ case '11':
+ return '閿�鍞嚭搴撳崟';
+ break;
+ case '12':
+ return '棰嗘枡鍑哄簱鍗�';
+ break;
+ }
},
- //閮ㄩ棬寮圭獥璧嬪��
+ isAllEqual(array) {
+ return array.every(item => item === array[0])
+ },
+ //寮圭獥璧嬪��
dbEmitData(deptRow, num) {
- // num=1閮ㄩ棬 num=2鍑哄簱浠撳簱
console.log(deptRow)
- if (deptRow.length > 0) {
- if (num == 1) {
- this.form.HDeptName = deptRow.閮ㄩ棬鍚嶇О
- this.form.HDeptID = deptRow.HItemID
- this.form.HManagerName = deptRow.璐熻矗浜�
- this.deptShow = false
- this.openData = false
- } else if (num == 2) {
- this.editData[this.zbIndex].HWHID = deptRow.HItemID;
- this.editData[this.zbIndex].鍙戣揣浠撳簱 = deptRow.浠撳簱鍚嶇О;
- this.warehouseShow = false
- this.openData = false
+ if (num) {
+ if (num == 'gyProperty') {
+ this.editWlxxData[this.zbIndex].HAuxPropID = deptRow.HItemID;
+ this.editWlxxData[this.zbIndex]["HAuxPropName"] = deptRow["杈呭姪灞炴�у悕绉�"];
+ this.editWlxxData[this.zbIndex]["HAuxPropNumber"] = deptRow["杈呭姪灞炴�т唬鐮�"];
+ this.propertyShow = false;
+ this.openData = false;
+
} else if (num == 3) {
- this.editData[this.zbIndex].HMaterID = deptRow.HItemID;
- this.editData[this.zbIndex].鐗╂枡浠g爜 = deptRow.鐗╂枡浠g爜;
- this.editData[this.zbIndex].鐗╂枡鍚嶇О = deptRow.鐗╂枡鍚嶇О;
- this.editData[this.zbIndex].HUnitID = deptRow.HUnitID;
- this.editData[this.zbIndex].瑙勬牸鍨嬪彿 = deptRow.瑙勬牸鍨嬪彿
- this.editData[this.zbIndex].璁¢噺鍗曚綅 = deptRow.璁¢噺鍗曚綅鍚嶇О
- this.editData[this.zbIndex].HTaxPrice = deptRow.鍚◣鎴愭湰浠�
- this.editData[this.zbIndex].HTaxRate = deptRow.榛樿绋庣巼
+ this.editWlxxData = []
+ for (var i = 0; i < deptRow.length; i++) {
+ this.editWlxxData.push({
+ "HMaterID": deptRow[i].HItemID,
+ "HMaterNumber": deptRow[i].鐗╂枡浠g爜,
+ "HMaterName": deptRow[i].鐗╂枡鍚嶇О,
+ "HMaterModel": deptRow[i].瑙勬牸鍨嬪彿,
+ "HUnitID": deptRow[i].HUnitID,
+ "HUnitNumber": deptRow[i].璁¢噺鍗曚綅浠g爜,
+ "HUnitName": deptRow[i].璁¢噺鍗曚綅,
+ "HAuxQty": 0,
+ })
+ }
this.materialShow = false
this.openData = false
- } else if (num == 4) {
- this.form.HEmpName = deptRow.鑱屽憳鍚嶇О
- this.form.HEmpID = deptRow.HItemID
- this.gyEmployeeShow = false
- this.openData = false
- } else if (num == 10) {
- this.zbDataShow = false
- let data = deptRow
- this.editWlxxData = deptRow
- // for (var i = 0; i < data.length; i++) {
- // this.editWlxxData.push({
- // "HMaterID": data[i].HMaterID, "HMaterCode": "", "HMaterNumber": data[i].鐗╂枡浠g爜, "HMaterName": data[i].鐗╂枡鍚嶇О
- // , "HMaterModel": data[i].瑙勬牸鍨嬪彿, "HMaterSpec": "", "HBatchNo": data[i].鎵规, "HUnitID": data[i].HUnitID
- // , "HUnitNumber": data[i].璁¢噺鍗曚綅浠g爜, "HUnitName": data[i].璁¢噺鍗曚綅, "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0
- // , "HQtyMust": 0, "HQty": data[i].鏁伴噺, "HBQty": 1, "HMinQty": data[i].鏁伴噺, "HPackQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0
- // , "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"]
- // , "HRemark": "", "HCoilNO": "", "HFurnaceNO": "", "HFactory": "", "HAuxQty": 0, "HheatNO": "", "HProduceDate": moment(new Date()).format('YYYY-MM-DD')
- // , "HExpiryDate": moment(new Date()).format('YYYY-MM-DD'), "HExpirationDateFlag": data[i].HISKFPERIOD == false ? 0 : 1
- // , "HEmpID": sessionStorage["HEmpID"], "HEmpNumber": sessionStorage["HEmpNumber"], "HEmpName": sessionStorage["HEmpName"]
- // , "HGroupID": 0, "HGroupNumber": "", "HGroupName": "", "HMTONo": data[i].璁″垝璺熻釜鍙�, "HCusModel": "", "HCusMaterName": ""
- // , "HCheckEmpName": ""
- // })
- // }
- console.log(this.editWlxxData)
- this.ScICMOBillShow = false
- this.zbDataShow = true
- this.openData = false
+ }
+ return
+ }
+
+ if (deptRow.length > 0) {
+ this.zbDataShow = false
+ this.editWlxxData = []
+ var list = []
+ var BillSelect = []
+ for (var i = 0; i < deptRow.length; i++) {
+ if (!deptRow[i].閮ㄩ棬) {
+ list.push(deptRow[i].閮ㄩ棬)
+ }
+ BillSelect.push({
+ BillType: deptRow[i].HBillType,
+ BillTitle: this.getSupType(),
+ BillNo: deptRow[i].鍗曟嵁鍙�,
+ BillMainID: deptRow[i].HMainID,
+ BillSubID: deptRow[i].HSubID,
+ SPID: 0,
+ BatchNo: "",
+ HAuxPropID: 0
+ });
+ }
+ if (this.isAllEqual(list)) { //涓嶅厑璁搁�夋嫨涓嶅悓閮ㄩ棬
+ //鑾峰彇閫変腑鏁版嵁
+ var GrdSelectData = JSON.stringify(BillSelect);
+ //鑾峰彇閫夋嫨鐨勬簮鍗曠被鍨�
+ var HSourceBillType = this.getSupType();
+ //鑾峰彇閫夋嫨鐨勬潯鐮佺被鍨�
+ var HBarCodeType = this.form.HBarCodeType;
+ //鑾峰彇褰撳墠鐧诲綍浜哄憳
+ var UserName = sessionStorage["HUserName"];
+ var Str = GrdSelectData + ";" + HSourceBillType + ";" + HBarCodeType + ";" + UserName;
+ //閫氳繃閫夋嫨鐨勬簮鍗曚富瀛愬唴鐮佹煡鎵捐缁嗕俊鎭�
+ axios({
+ method: 'post',
+ url: this.$baseUrl + "/Sc_BarCode/SelectReportFromBillList",
+ data: {
+ "msg": Str
+ },
+ }).then(response => {
+ let result = response.data
+ this.HMaterID = result.list[0].HMaterID;
+ this.HBatchNo = result.list[0].HBatchNo;
+ if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ for (let i = 0; i < result.list.length; i++) {
+ result.list[i].HQty = result.list[i].HQty.toString().match(/^\d+(?:\.\d{0,6})?/)[0] //淇濈暀灏忔暟鐐瑰悗鍏綅灏忔暟
+ if (result.list[i].HMinQty != 0) {
+ result.list[i].HBQty = Math.ceil(result.list[i].HQty / result.list[i].HMinQty)
+ }
+ result.list[i].HEmpID = sessionStorage["HEmpID"]
+ result.list[i].HEmpNumber = sessionStorage["HEmpNumber"]
+ result.list[i].HEmpName = sessionStorage["HEmpName"]
+ }
+ this.BatchNoArray = result.list; //鑾峰彇鎵瑰彿锛岀敤鏉ョ粰鎵规鎸夐挳鍔熻兘涓殑鎵瑰彿璧嬪��
+ this.editWlxxData = result.list
+ this.ScICMOBillShow = false
+ this.zbDataShow = true
+ this.openData = false
+ }
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ })
+ } else {
+ this.$modal.msgError("涓嶅厑璁搁�夋嫨涓嶅悓鐨勯儴闂ㄦ暟鎹�!", sessionStorage["HTranSlate"]);
}
} else {
this.$modal.msgError("璇烽�夋嫨鏁版嵁!");
}
-
},
emitData(deptRow, num) {
this.dialogTypeNum = num
@@ -834,33 +894,28 @@
this.deptform = {}
this.openData = false
},
-
//鏂板缂栬緫琛ㄥ崟鍒濆鍖�
reset() {
this.form = {
HOrgID: sessionStorage["OrganizationID"] - 0,
HWorksNumber: '',
HDate: moment(new Date()).format('YYYY-MM-DD'),
- HSourceBillType: 1,
+ HSourceBillType: '1',
HSourceBillNo: '',
- HBarCodeType: '',
+ HBarCodeType: '鍞竴鏉$爜',
}
this.editWlxxData = []
this.editBtData = []
this.ids = []
this.subDisabled = false
this.addBtnShow = false
- // this.$refs.tableData.clearSelection()
this.activeName = 'first'
this.resetForm("form");
},
//閫�鍑�
close() {
this.reset()
- console.log(1111)
- console.log(this.$route.path)
if (!this.OperationType && !this.copyType) {
- console.log(this.$route.path)
const obj = { fullPath: this.$route.path, path: this.$route.path, name: this.$route.name, };
this.$tab.closePage(obj).then(res => {
const latestView = res.visitedViews.slice(-1)[0]
@@ -881,7 +936,7 @@
},
//鏍规嵁鐢ㄦ埛鑾峰彇瀵瑰簲鑱屽憳銆侀儴闂ㄣ�侀攢鍞富绠�
getCzyglByUser() {
- axios.get(this.baseURL + '/Xs_SeOrderBill/getCzyglByUser', {
+ axios.get(this.$baseUrl + '/Xs_SeOrderBill/getCzyglByUser', {
params: { "CurUserName": sessionStorage["HUserName"] }
}).then(response => {
let dataForm = response.data.data[0]
@@ -904,40 +959,11 @@
this.formLoading = false
})
},
- //鑾峰彇瀵瑰簲鐨勬潯鐮佹槑缁�
- getBarCodeNoteBySellOutBill(rowHmainid) {
- axios.get(this.baseURL + '/Kf_SellOutBill/BarCodeNote', {
- params: { "HInterID": rowHmainid }
- }).then(response => {
- if (response.data.count == 1) {
- if (response.data.data[2].length > 0) {
- this.$modal.msgError("褰撳墠鍗曟嵁鐢辨壂鐮佺敓鎴愶紝涓嶅彲浠ョ紪杈戯紒");
- this.subDisabled = true
- }
- } else { }
- }).catch(error => {
- this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
- });
- },
- //#region 鏍规嵁瀹㈡埛鑾峰彇瀹㈡埛浣欓
- getCustomerBalance(HCusID) {
- axios.get(this.baseURL + '/Xs_CusRatingChangeBill/getCustomerBalance', {
- params: { "HCusID": HCusID, 'CurUserName': sessionStorage["HUserName"] }
- }).then(response => {
- var data = response.data.data[0];
- this.form.HCusBalance = data.HCusBalance
- this.form.HCreditRating_Now = data.HCreditRating_Now
- this.form.HAvailableBalance = data.HAvailableBalance
- }).catch(error => {
- this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
- });
- },
/** 淇敼鎸夐挳鎿嶄綔 */
handleUpdate() {
this.reset()
let rowHmainid = this.linterid
- console.log(this.linterid)
- axios.get(this.baseURL + "/Kf_SellOutBill/cx", {
+ axios.get(this.$baseUrl + "/Kf_SellOutBill/cx", {
params: { 'HInterID': rowHmainid }
}).then(response => {
if (response.data.count == 1) {
@@ -1012,8 +1038,6 @@
// this.form.HAvailableBalance=data
this.form.HPriceType = data.鍗曚环绫诲瀷
this.form.HOrgID = data.HOrgID
- this.getCustomerByCusID(response.data.data[0].HSupID)//鏍规嵁瀹㈡埛鑾峰彇鑱旂郴浜猴紝鑱旂郴浜虹數璇�
- this.getBarCodeNoteBySellOutBill(rowHmainid)//鑾峰彇瀵瑰簲鐨勬潯鐮佹槑缁嗘槸鍚﹀彲缂栬緫
for (var i = 0; i < result.data.length; i++) {
this.editWlxxData.push(
{
@@ -1061,8 +1085,9 @@
, 'HPOOrderInterID': result.data[i].閲囪喘璁㈠崟鍐呯爜
, 'HPOOrderEntryID': result.data[i].閲囪喘璁㈠崟瀛愬唴鐮�
, 'HPOOrderBillNo': result.data[i].閲囪喘璁㈠崟鍙�
- , 'HPropertyID': result.data[i].HPropertyID
- , 'HPropertyName': result.data[i].杈呭姪灞炴��
+ , 'HAuxPropID': result.data[i].HPropertyID
+ , 'HAuxPropName': result.data[i].杈呭姪灞炴��
+ , 'HAuxPropNumber': result.data[i].杈呭姪灞炴�т唬鐮�
, 'HSecUnitID': result.data[i].HSecUnitID
, 'HSecUnitName': result.data[i].杈呭姪璁¢噺鍗曚綅
, 'HSecUnitRate': result.data[i].鎹㈢畻鐜�
@@ -1089,7 +1114,7 @@
},
//鏍规嵁瀹㈡埛甯﹀嚭鑱旂郴浜恒�佽仈绯荤數璇�
getCustomerByCusID(HCusID) {
- axios.get(this.baseURL + "/Xs_SeOrderBill/getCustomerByCusID", {
+ axios.get(this.$baseUrl + "/Xs_SeOrderBill/getCustomerByCusID", {
params: {
HCusID: HCusID
}
@@ -1104,6 +1129,12 @@
},
/** 閿�鍞嚭搴撳瓙琛ㄦ槑缁嗗簭鍙� */
wlxxzbRowSysZbIndex({ row, rowIndex }) {
+ row.index = rowIndex + 1;
+ },
+ tiaomaZbIndex({ row, rowIndex }) {
+ row.index = rowIndex + 1;
+ },
+ danganZbIndex({ row, rowIndex }) {
row.index = rowIndex + 1;
},
/** 缂栬緫椤靛瓙琛ㄦ坊鍔犳寜閽搷浣� */
@@ -1197,11 +1228,11 @@
this.$refs.wlxxzbTable.toggleRowSelection(del_row, false) //璁剧疆杩欎竴琛屽彇娑堥�変腑
}
},
+ handleTableDangan(selection) {
+ this.danganSelList = selection
+ },
showReset() {
- this.deptShow = false
- this.warehouseShow = false
this.materialShow = false
- this.gyEmployeeShow = false
this.ScICMOBillShow = false
},
// 鎵撳紑鏁版嵁鍒楄〃寮圭獥
@@ -1210,29 +1241,34 @@
if (row) {
this.zbIndex = row.index - 1
}
- this.showReset()
- if (num == 1) {
- this.dialogTitle = '閮ㄩ棬鍒楄〃'
- this.deptShow = true
- this.openData = true
- } else if (num == 2) {
- this.dialogTitle = '鍑哄簱浠撳簱鍒楄〃'
- this.warehouseShow = true
- this.openData = true
- } else if (num == 3) {
- this.dialogTitle = '鐗╂枡鍒楄〃'
- this.materialShow = true
- this.openData = true
- } else if (num == 4) {
- this.dialogTitle = '閿�鍞憳鍒楄〃'
- this.gyEmployeeShow = true
- this.openData = true
- } else if (num == 10) {
- this.dialogTitle = '鐢熶骇璁㈠崟鍒楄〃'
+ if (num) {
+ switch (num) {
+ case 1:
+ this.dialogTitle = '杈呭姪灞炴�у垪琛�'
+ this.propertyShow = true
+ this.openData = true
+ ; break;
+ case 3:
+ this.dialogTitle = '鐗╂枡鍒楄〃'
+ this.materialShow = true
+ this.openData = true
+ break;
+ }
+ } else {
+ this.showReset()
+ this.HSouceBillType = this.getSupType()
+ this.dialogTitle = this.getSupType() + '鍒楄〃'
this.ScICMOBillShow = true
this.openData = true
}
+
},
}
};
-</script>
\ No newline at end of file
+</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