| | |
| | | <template> |
| | | <div v-loading="formLoading" v-if="formShow" style="margin: 10px;"> |
| | | <div style="margin: 10px;"> |
| | | <div style=" margin-bottom: 10px; border-bottom: 1px solid #f6f6f6;"> |
| | | <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" @click="ToolBatch">æ¹æ¬¡</el-button> |
| | | <el-button type="primary" @click="close">é åº</el-button> |
| | | <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 ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form :model="initMainData" label-width="80px"> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <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> |
| | | </el-select> |
| | | <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="å·¥å代ç " prop="HWorksNumber"> |
| | | <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> |
| | | </el-select> |
| | | <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="æ¥æ" prop="HDate"> |
| | | <el-date-picker v-model="form.HDate" type="date" placeholder="éæ©æ¥æ" value-format="yyyy-MM-ddT" |
| | | style="width: 100%"> </el-date-picker> |
| | | <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="æºåç±»å" prop="HSourceBillType"> |
| | | <el-select v-model="form.HSourceBillType" placeholder="è¯·éæ©" style="width: 100%" |
| | | @change="HSourceBillTypeChange"> |
| | | <el-option v-for="(item, index) in HSourceBillTypeList" :key="index" :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | <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="éåå·" prop="HSourceBillNo"> |
| | | <el-input v-model="form.HSourceBillNo" placeholder="请è¾å
¥éåå·" disabled> |
| | | <el-button class="input-search-btn" slot="append" icon="el-icon-search" |
| | | @click="openDataDialog(null)"></el-button> |
| | | </el-input> |
| | | <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="æ¡ç ç±»å" prop="HBarCodeType"> |
| | | <el-select v-model="form.HBarCodeType" placeholder="è¯·éæ©" style="width: 100%"> |
| | | <el-option v-for="(item, index) in HBarCodeTypeList" :key="index" :label="item" |
| | | :value="item"> |
| | | </el-option> |
| | | <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="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> |
| | | <el-button type="success" plain icon="el-icon-plus" @click="handleCopyZbRow" |
| | | size="mini">å¤å¶ä¸è¡</el-button> |
| | | </div> |
| | | <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="æºååå·" prop="HBillNo" width="120" show-overflow-tooltip> |
| | | <template slot-scope="scope">{{ scope.row.HBillNo }} </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="ç©æä»£ç " 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> |
| | | <template slot-scope="scope">{{ scope.row.HMaterName }}</template> |
| | | </el-table-column> |
| | | <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="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> |
| | | <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> |
| | | <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="çç»ä»£ç " 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> |
| | | <template slot-scope="scope">{{ scope.row.HGroupName }}</template> |
| | | </el-table-column> |
| | | <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> |
| | | <template slot-scope="scope"><el-input v-model="scope.row.HBatchNo" /></template> |
| | | </el-table-column> |
| | | <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="HPackQty" width="120" show-overflow-tooltip> |
| | | <template slot-scope="scope"><el-input v-model="scope.row.HPackQty" /></template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="é¢å·æå
å·" prop="HCoilNO" width="120" show-overflow-tooltip> |
| | | <template slot-scope="scope"><el-input v-model="scope.row.HCoilNO" /></template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="çå·" prop="HFurnaceNO" width="120" show-overflow-tooltip> |
| | | <template slot-scope="scope"><el-input v-model="scope.row.HFurnaceNO" /></template> |
| | | </el-table-column> |
| | | <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="客æ·ä»£ç " 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> |
| | | <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> |
| | | <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> |
| | | <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> |
| | | </template> |
| | | </el-table-column> |
| | | <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" |
| | | @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> |
| | | <template slot-scope="scope">{{ scope.row.HAuxPropName }}</template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="计éåä½ä»£ç " 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> |
| | | <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> |
| | | <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> |
| | | <template slot-scope="scope"> |
| | | <el-checkbox v-model="scope.row.HGiveAwayFlag"></el-checkbox> |
| | | </template> |
| | | </el-table-column> |
| | | <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="æ¡ç ä¿¡æ¯" name="tiaoma"> |
| | | <el-table :data="editTmData" style="width: 100%" height="480" width="100%" ref="tbzbTable" |
| | | @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> |
| | | </el-table> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="æ¡£æ¡å表" 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-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 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 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-tab-pane> |
| | | </el-tabs> |
| | | </el-form> |
| | | <!-- é¨é¨å¼¹çª --> |
| | | <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 axios from 'axios' //axiosè¯·æ±æ¹æ³åº |
| | | import moment from 'moment'; //moment.jsåº |
| | | import PrintList from "@/views/component/printList"; //æå° |
| | | |
| | | 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', |
| | | name: 'Gy_BarCodeBill_JinLong', |
| | | components: { HSourceReportHtml, PrintList, GyProperty, Material }, |
| | | props: { |
| | | OperationType: { type: Number, }, |
| | | linterid: { type: Number, }, |
| | | 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: '颿åºåºå', } |
| | | ], |
| | | wlxxBtList: [{ field: 'HMainID', title: 'æºå主å
ç ', width: 100, hide: true } |
| | | , { field: 'HSubID', title: 'æºååå
ç ', width: 100, hide: true } |
| | | , { field: 'HSourceBillSEQ', title: 'æºåè¡å·', width: 100, hide: true } |
| | | , { field: 'HBillNo', title: 'æºååå·', width: 200 } |
| | | , { field: 'HMaterID', title: 'ç©æID', width: 100, hide: true } |
| | | , { field: 'HMaterNumber', title: 'ç©æä»£ç ', edit: 'text', event: 'HMaterNumber', width: 200 } |
| | | , { field: 'HMaterName', title: 'ç©æåç§°', width: 200 } |
| | | , { field: 'HMaterModel', title: 'è§æ ¼åå·', width: 200 } |
| | | , { field: 'HCusModel', title: '客æ·è§æ ¼åå·', edit: 'text', width: 200 } |
| | | , { field: 'HCusMaterName', title: '客æ·ç©æåç§°', edit: 'text', width: 200 } |
| | | , { field: 'HEmpID', title: 'æä½åID', width: 100, hide: true } |
| | | , { field: 'HEmpNumber', title: 'æä½å代ç ', edit: 'text', width: 200, event: 'HEmpNumber' } |
| | | , { field: 'HEmpName', title: 'æä½å', width: 200 } |
| | | , { field: 'HGroupID', title: 'çç»ID', width: 100, hide: true } |
| | | , { field: 'HGroupNumber', title: 'çç»ä»£ç ', edit: 'text', width: 200, event: 'HGroupNumber' } |
| | | , { field: 'HGroupName', title: 'çç»åç§°', width: 200 } |
| | | , { field: 'HCheckEmpName', title: 'æ£éªå', width: 200, edit: 'text' } |
| | | , { field: 'HBatchNo', title: 'æ¹å·', edit: 'text', width: 100 } |
| | | , { field: 'HMTONo', title: '计åè·è¸ªå·', width: 100, edit: 'text' } |
| | | , { field: 'HQty', title: 'æ°é', edit: 'number', width: 100, totalRow: true } |
| | | , { field: 'HMinQty', title: 'æå°å
è£
æ°', edit: 'number', totalRow: true, width: 100 } |
| | | , { field: 'HBQty', title: 'ç®±æ°', width: 100, totalRow: true } |
| | | , { field: 'HPackQty', title: 'å¤ç®±æ°', edit: 'text', width: 100, totalRow: true } |
| | | , { field: 'HCoilNO', title: 'é¢å·æå
å·', edit: 'text', width: 100 } |
| | | , { field: 'HFurnaceNO', title: 'çå·', edit: 'text', width: 100 } |
| | | , { field: 'HFactory', title: 'åå', edit: 'text', width: 100 } |
| | | , { field: 'HCusID', title: '客æ·ID', width: 100, hide: true } |
| | | , { field: 'HCusNumber', title: '客æ·ä»£ç ', edit: 'text', event: 'HCusNumber', width: 120 } |
| | | , { field: 'HCusName', title: '客æ·åç§°', width: 120 } |
| | | , { field: 'HSeOrderBillNo', title: 'éå®è®¢åå·', width: 200 } |
| | | , { field: 'HRemark', title: '夿³¨', edit: 'text', width: 100 } |
| | | , { field: 'HProduceDate', title: 'çäº§æ¥æ', edit: 'date', event: 'HProduceDate', width: 160 } |
| | | , { field: 'HExpiryDate', title: 'ä¿è´¨æè³', edit: 'date', event: 'HExpiryDate', width: 160 } |
| | | , { field: 'HheatNO', title: 'çå¤ç', edit: 'text', width: 100 } |
| | | , { field: 'HAuxPropID', title: 'è¾
å©å±æ§ID', width: 100, hide: true } |
| | | , { field: 'HAuxPropNumber', title: 'è¾
å©å±æ§ä»£ç ', edit: 'text', event: 'HAuxPropNumber', width: 100 } |
| | | , { field: 'HAuxPropName', title: 'è¾
å©å±æ§åç§°', width: 100 } |
| | | , { field: 'HUnitID', title: '计éåä½ID', width: 100, hide: true } |
| | | , { field: 'HUnitNumber', title: '计éåä½ä»£ç ', edit: 'text', event: 'HUnitNumber', width: 100 } |
| | | , { field: 'HUnitName', title: '计éåä½', width: 100 } |
| | | , { field: 'HAuxQty', title: 'è¾
å使°é', edit: 'text', width: 100, totalRow: true } |
| | | , { field: 'HExpirationDateFlag', title: 'æ¯å¦å¯ç¨ä¿è´¨æ', width: 120, edit: 'checkbox', templet: '#switchTp3', unresize: false } |
| | | , { field: 'HGiveAwayFlag', title: 'æ¯å¦èµ å', width: 100, edit: 'checkbox', templet: '#switchTpl', unresize: false } |
| | | , { field: 'HDate', title: 'æ¡ç æ¥æ', width: 100, hide: true } |
| | | ], |
| | | tmBtList: [ |
| | | { field: 'HBarCode2', title: 'æ¡ç ç¼å·', width: 100 } |
| | | , { field: 'HMaterNumber2', title: 'ç©æä»£ç ', width: 100 } |
| | | , { field: 'HMaterName2', title: 'ç©æåç§°', width: 100 } |
| | | , { field: 'HMaterModel2', title: 'è§æ ¼åå·', width: 100 } |
| | | , { field: 'HAuxPropNumber2', title: 'è¾
å©å±æ§ä»£ç ', width: 100 } |
| | | , { field: 'HAuxPropName2', title: 'è¾
å©å±æ§', event: 'HWHCode', width: 120 } |
| | | , { field: 'HGiveAwayFlag2', title: 'æ¯å¦èµ å', width: 120, templet: '#switchTpl', unresize: false } |
| | | , { field: 'HUnitCode2', title: '计éåä½ä»£ç ', width: 120 } |
| | | , { field: 'HUnitName2', title: '计éåä½', width: 120 } |
| | | , { field: 'HQty2', title: 'æ°é', width: 120 } |
| | | , { field: 'HDate2', title: 'è¿ææ¥æ', width: 120 } |
| | | , { field: 'HCusNumber2', title: '客æ·ä»£ç ', width: 120 } |
| | | , { field: 'HCusName2', title: '客æ·', width: 120 } |
| | | , { field: 'HSourceBillNo2', title: 'æºååå·', width: 120 } |
| | | , { field: 'HSeOrderBillNo2', title: 'éå®è®¢åå·', width: 120 } |
| | | , { field: 'HRemark2', title: '夿³¨', width: 120 } |
| | | , { field: 'HMTONo2', title: '计åè·è¸ªå·', width: 120 } |
| | | , { field: 'HShowDate2', title: 'æ¥æ', width: 100 } |
| | | , { field: 'HInnerBillNo2', title: 'å
é¨éè´è®¢åå·', width: 100 } |
| | | , { field: 'HMaker2', title: 'å¶å人', width: 100 } |
| | | ], |
| | | daBtList: [ |
| | | baseURL: process.env.VUE_APP_BASE_API, //å端æ¥å£è®¿é®åç¼ |
| | | HModName: "Gy_BarCodeBill_JinLong", //模ååç§° |
| | | disabledFlag_BarCodeProduce:false, //ç¦ç¨æ è®°-çæ æé® |
| | | 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:"" //éè´è·è¸ªå· |
| | | |
| | | ,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: 'HSTOCKORGID', title: 'HSTOCKORGID', width: 100, hide: true } |
| | | , { field: 'çæç»ç»', title: 'çæç»ç»', width: 120 } |
| | | ], |
| | | HBarCodeTypeList: [], |
| | | HWorksNumberList: [], |
| | | formShow: false, |
| | | temp: undefined, |
| | | formLoading: true, |
| | | zzSelDis: false, |
| | | rowHideShow: false, |
| | | openRowHide: false, |
| | | hPriceTypeList: ['ææ¬ä»·', 'ç»ç®ä»·'], |
| | | addBtnShow: false, |
| | | zbIndex: null, |
| | | zbSelForm: {},//å表é䏿°æ® |
| | | dialogTypeNum: null,//é¨é¨å¼¹çª1ï¼ä»åºå¼¹çª2 |
| | | deptShow: false,//é¨é¨æ°æ®ç»ä»¶ |
| | | warehouseShow: false,//ä»åºæ°æ®ç»ä»¶ |
| | | materialShow: false,//ç©ææ°æ®ç»ä»¶ |
| | | gyEmployeeShow: false,//éå®åæ°æ®ç»ä»¶ |
| | | ScICMOBillShow: false, |
| | | propertyShow: false, |
| | | deptform: {},//å¼¹çªé䏿°æ® |
| | | openData: false,//æ°æ®å¼¹çª |
| | | dialogTitle: '', |
| | | organizationList: JSON.parse(sessionStorage.getItem('organizationList')),//ç»ç»å表 |
| | | subDisabled: false,//ç¼è¾é¡µé¢ä¿åæé®æ¯å¦ç¦ç¨(trueç¦ç¨ï¼falseå¯ç¨) |
| | | // OperationType: this.$route.query.OperationType,//ä¿åç±»åï¼æ°å¢1ä¿®æ¹3ï¼ |
| | | HInterID: null, |
| | | baseURL: process.env.VUE_APP_BASE_API, |
| | | checkedSysZb: [], |
| | | editWlxxData: [],//å表 |
| | | editTmData: [], |
| | | editDaData: [], |
| | | HBarInfo: [], |
| | | HFileList: [], |
| | | editBtData: [],//å表表头 |
| | | activeName: 'first', |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | | // æ¥æèå´ |
| | | dateRange: [], |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | HBillNo: '', |
| | | HInitTimeCycle: 29, |
| | | HProjectNumber: '', |
| | | HCusID: null, |
| | | HMaterNumber: '', |
| | | HMaterName: '', |
| | | ColName1: '', |
| | | ColName2: '', |
| | | ColName: '', |
| | | Comparator1: '', |
| | | Comparator2: '', |
| | | Comparator: '', |
| | | ColContent1: '', |
| | | ColContent2: '', |
| | | ColContent: '', |
| | | }, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // é䏿°ç» |
| | | ids: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // é®ç½©å± |
| | | loading: true, |
| | | btResList: [], |
| | | // 表ååæ° |
| | | form: {}, |
| | | // è¡¨åæ ¡éª |
| | | rules: { |
| | | HSupName: [ |
| | | { required: true, message: "客æ·ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | HDate: [ |
| | | { required: true, message: "æ¥æä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | HExRate: [ |
| | | { required: true, message: "æ±çä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ] |
| | | }, |
| | | tableData_BarCode:[], //æ¡ç å表table æ°æ® |
| | | RowIndex_BarCode:0, //æ¡ç å表table è¡ç´¢å¼ |
| | | |
| | | |
| | | paramsForAutoLogin:{ //èªå¨ç»å½è·åè¶
龿¥åæ° |
| | | |
| | | } |
| | | openPrintList:true, //æå°å¼¹çªæ¾ç¤ºæ è®° |
| | | printListShow:false, //æå°æ¨¡æ¿æ°æ®æ¾ç¤ºæ è®° |
| | | selectedData_BarCode:0, //æ¡ç å表table é䏿°æ®éå |
| | | }; |
| | | }, |
| | | created() { |
| | | this.get_ParamsForAutoLogin() //èªå¨ç»å½è·åè¶
龿¥åæ° |
| | | this.initDataForAutoLogin() //èªå¨ç»å½ |
| | | this.get_LoginIs() //夿æ¯å¦ç»å½æåï¼æªç»å½æåå跳转å°ç»å½é¡µé¢ |
| | | this.set_HBarCodeType() |
| | | this.getdata() |
| | | async created() { |
| | | this.judgeIsLoging(); //夿æ¯å¦ç»å½ï¼æªç»å½å跳转åç»å½é¡µé¢ |
| | | await this.get_OrganizationList(); //页é¢åå§å è·åç»ç»ä¸æåè¡¨æ°æ® |
| | | await this.initPageData(); //页é¢åå§å |
| | | }, |
| | | methods: { |
| | | 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; |
| | | //å 载档æ¡å表 |
| | | 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) { |
| | | this.openNum == 10 |
| | | } |
| | | }, |
| | | set_HBarCodeType() { |
| | | //è·åæ¡ç ç±»å代ç |
| | | axios.get(this.baseURL + '/Sc_BarCode/GetHBarCodeTypeBill').then(response => { |
| | | let result = response.data |
| | | if (result.count == 1) { |
| | | this.HBarCodeTypeList = result.list |
| | | } |
| | | }).catch(error => { |
| | | this.$modal.msgError("æ¥å£è¯·æ±å¤±è´¥!"); |
| | | }); |
| | | axios.get(this.baseURL + '/Sc_BarCode/GetHWorksNumberBill').then(response => { |
| | | let result = response.data |
| | | if (result.count == 1) { |
| | | this.HWorksNumberList = result.list |
| | | } |
| | | }).catch(error => { |
| | | this.$modal.msgError("æ¥å£è¯·æ±å¤±è´¥!"); |
| | | }); |
| | | |
| | | }, |
| | | getdata() { |
| | | this.formShow = false |
| | | this.formLoading = true |
| | | this.handleAdd() |
| | | }, |
| | | // è·ååæ°_ä¼ éçJSONæ ¼å¼åæ° |
| | | getUrlVars_JSON() { |
| | | var datajson; |
| | | var str = this.propsData; //è·å龿¥ä¸ä¼ éçåæ° |
| | | var arr = str.substring(str.lastIndexOf("=") + 1); |
| | | datajson = JSON.parse(decodeURI(arr)); |
| | | return datajson; |
| | | }, |
| | | handleRowHide() { |
| | | this.rowHideShow = true |
| | | this.openRowHide = true |
| | | }, |
| | | rowSetClose(val) { |
| | | this.rowHideShow = false |
| | | this.openRowHide = val |
| | | }, |
| | | 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) { |
| | | console.log(deptRow) |
| | | 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.editWlxxData = [] |
| | | for (var i = 0; i < deptRow.length; i++) { |
| | | this.editWlxxData.push({ |
| | | "HMaterID": deptRow[i].HItemID, |
| | | "HMaterNumber": deptRow[i].ç©æä»£ç , |
| | | "HMaterName": deptRow[i].ç©æåç§°, |
| | | "HMaterModel": deptRow[i].è§æ ¼åå·, |
| | | "HUnitID": deptRow[i].HUnitID, |
| | | "HUnitNumber": deptRow[i].计éåä½ä»£ç , |
| | | "HUnitName": deptRow[i].计éåä½, |
| | | "HAuxQty": 0, |
| | | }) |
| | | } |
| | | this.materialShow = false |
| | | 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 |
| | | this.deptform = deptRow |
| | | }, |
| | | deptClickSub() { |
| | | this.dbEmitData(this.deptform, this.dialogTypeNum) |
| | | this.deptform = {} |
| | | }, |
| | | deptClose() { |
| | | this.deptform = {} |
| | | this.openData = false |
| | | }, |
| | | //æ°å¢ç¼è¾è¡¨ååå§å |
| | | reset() { |
| | | this.form = { |
| | | HOrgID: sessionStorage["OrganizationID"] - 0, |
| | | HWorksNumber: '', |
| | | HDate: moment(new Date()).format('YYYY-MM-DD'), |
| | | HSourceBillType: '1', |
| | | HSourceBillNo: '', |
| | | HBarCodeType: 'å¯ä¸æ¡ç ', |
| | | } |
| | | this.editWlxxData = [] |
| | | this.editBtData = [] |
| | | this.ids = [] |
| | | this.subDisabled = false |
| | | this.addBtnShow = false |
| | | this.activeName = 'first' |
| | | this.resetForm("form"); |
| | | }, |
| | | //éåº |
| | | close() { |
| | | this.reset() |
| | | if (!this.OperationType && !this.copyType) { |
| | | 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] |
| | | if (latestView) { |
| | | this.$router.push(latestView.fullPath) |
| | | } else { |
| | | if (obj.name === 'Dashboard') { |
| | | this.$router.replace({ path: '/redirect' + obj.fullPath }) |
| | | } else { |
| | | this.$router.push('/') |
| | | } |
| | | } |
| | | }); |
| | | } else { |
| | | this.formShow = false |
| | | this.$emit('editClose', false) |
| | | } |
| | | |
| | | this.$router.push({ path: this.redirect || "/" }).catch(() => { }) |
| | | }, |
| | | //æ ¹æ®ç¨æ·è·å对åºèåãé¨é¨ãéå®ä¸»ç®¡ |
| | | getCzyglByUser() { |
| | | axios.get(this.baseURL + '/Xs_SeOrderBill/getCzyglByUser', { |
| | | params: { "CurUserName": sessionStorage["HUserName"] } |
| | | }).then(response => { |
| | | let dataForm = response.data.data[0] |
| | | this.form.HDeptID = dataForm.HDeptID |
| | | this.form.HDeptName = dataForm.HDeptName |
| | | this.form.HEmpID = dataForm.HEmpID |
| | | this.form.HEmpName = dataForm.HEmpName |
| | | this.form.HManagerID = dataForm.HManagerID |
| | | this.form.HManagerName = dataForm.HManagerName |
| | | }).catch(error => { |
| | | this.$modal.msgError("æ¥å£è¯·æ±å¤±è´¥!"); |
| | | }); |
| | | }, |
| | | /** æ°å¢æé®æä½ */ |
| | | handleAdd() { |
| | | this.reset() |
| | | this.handleAddSysZb() |
| | | this.$nextTick(() => { |
| | | this.formShow = true |
| | | this.formLoading = false |
| | | }) |
| | | }, |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | handleUpdate() { |
| | | this.reset() |
| | | let rowHmainid = this.linterid |
| | | axios.get(this.baseURL + "/Kf_SellOutBill/cx", { |
| | | params: { 'HInterID': rowHmainid } |
| | | }).then(response => { |
| | | if (response.data.count == 1) { |
| | | var result = response.data |
| | | var data = response.data.data[0] |
| | | this.form.BillType = data.HSourceBillType |
| | | if (this.copyType == 1) { |
| | | let date = new Date() |
| | | this.form.HDate = moment(date).format('YYYY-MM-DDTHH:mm:ss') |
| | | } else { |
| | | this.form.HBillNo = data.åæ®å· |
| | | this.form.HInterID = data.hmainid |
| | | this.form.HDate = data.æ¥æ |
| | | this.form.HMaker = data.å¶å人 |
| | | this.form.HUpDater = data.ä¿®æ¹äºº |
| | | this.form.HChecker = data.å®¡æ ¸äºº |
| | | this.form.HMakeDate = data.å¶åæ¥æ |
| | | this.form.HUpDateDate = data.ä¿®æ¹æ¥æ |
| | | this.form.HCheckDate = data.å®¡æ ¸æ¥æ |
| | | this.form.HCloseMan = data.å
³é人 |
| | | this.form.HDeleteMan = data.ä½åºäºº |
| | | this.form.HCloseDate = data.å
³éæ¥æ |
| | | this.form.HDeleteDate = data.ä½åºæ¥æ |
| | | } |
| | | this.form.HBillSubType = data.HBillSubType |
| | | this.form.HMainSourceInterID = data.HMainSourceInterID |
| | | this.form.HMainSourceEntryID = data.HMainSourceEntryID |
| | | this.form.HMainSourceBillType = data.HMainSourceBillType |
| | | this.form.HMainSourceBillNo = data.HMainSourceBillNo |
| | | this.form.HEmpName = data.ä¸å¡å |
| | | this.form.HEmpID = data.HEmpID |
| | | this.form.HDeptName = data.é¨é¨ |
| | | this.form.HDeptID = data.HDeptID |
| | | this.form.HManagerName = data.主管 |
| | | this.form.HManagerID = data.HManagerID |
| | | this.form.HSupName = data.å®¢æ· |
| | | this.form.HSupID = data.HSupID |
| | | this.form.HLinkMan = data.è系人 |
| | | this.form.HLinkPhone = data.èç³»çµè¯ |
| | | this.form.HSecManagerName = data.å货人 |
| | | this.form.HSecManagerID = data.HSecManagerID |
| | | this.form.HKeeperName = data.ä¿ç®¡å |
| | | this.form.HKeeperID = data.HKeeperID |
| | | this.form.HRemark = data.è¡¨å¤´å¤æ³¨ |
| | | this.form.HProjectNumber = data.项ç®ç¼ç |
| | | this.form.HProjectID = data.HProjectID |
| | | this.form.HProjectName = data.项ç®åç§° |
| | | this.form.HGroupName = data.çç» |
| | | this.form.HGroupID = data.HGroupID |
| | | this.form.HWHName = data.主表ä»åº |
| | | this.form.HWHID = data.HWHID_Main |
| | | this.form.HConveyCompName = data.è¿è¾å
¬å¸ |
| | | this.form.HConveyCompID = data.HConveyCompID |
| | | this.form.HConveyTypeName = data.è¿è¾æ¹å¼ |
| | | this.form.HConveyTypeID = data.HConveyTypeID |
| | | this.form.HConveyMoney = data.HConveyMoney |
| | | this.form.HCarriage = data.è¿è´¹ |
| | | this.form.HSTOCKORGID = data.HSTOCKORGID |
| | | this.form.HOWNERID = data.HOWNERID |
| | | this.form.HSCWHName = data.主表è°åºä»åº |
| | | this.form.HSCWHID = data.HSCWHID |
| | | this.form.HCheckStatusMan = data.æ ¸é人 |
| | | this.form.HExplanation = data.æè¦ |
| | | this.form.HInnerBillNo = data.å
é¨åæ®å· |
| | | this.form.HCurName = data.å¸å« |
| | | this.form.HCurID = data.HCurID |
| | | this.form.HExRate = data.æ±ç |
| | | this.form.HSellSName = data.é宿¹å¼ |
| | | this.form.HSellSID = data.HSellSID |
| | | // this.form.HCusBalance=data |
| | | // this.form.HCreditRating_Now=HConveyMoney |
| | | // this.form.HAvailableBalance=data |
| | | this.form.HPriceType = data.åä»·ç±»å |
| | | this.form.HOrgID = data.HOrgID |
| | | for (var i = 0; i < result.data.length; i++) { |
| | | this.editWlxxData.push( |
| | | { |
| | | "HMaterID": result.data[i].HMaterID |
| | | , "ç©æä»£ç ": result.data[i].ç©æä»£ç |
| | | , "ç©æåç§°": result.data[i].ç©æåç§° |
| | | , "è§æ ¼åå·": result.data[i].è§æ ¼åå· |
| | | , "HUnitID": result.data[i].HUnitID |
| | | , "计éåä½": result.data[i].计éåä½ |
| | | , "HQtyMust": result.data[i].åºåæ°é.toFixed(6) |
| | | , "HQty": result.data[i].æ°é.toFixed(6) |
| | | , "HPieceQty": result.data[i].ä»¶æ°.toFixed(0) |
| | | , "HPrice": result.data[i].åä»·.toFixed(4) |
| | | , "HTaxPrice": result.data[i].å«ç¨åä»·.toFixed(4) |
| | | , "HTaxRate": result.data[i].ç¨ç |
| | | , "HMoney": (result.data[i].æ°é * result.data[i].åä»·).toFixed(2) |
| | | , "HTaxMoney": (result.data[i].æ°é * result.data[i].å«ç¨åä»·, 2).toFixed(2) |
| | | , "HWHID": result.data[i].hwhid |
| | | , "åè´§ä»åº": result.data[i].åè´§ä»åº |
| | | , "HRemark": result.data[i].表ä½å¤æ³¨ |
| | | , "HQty_Full": result.data[i].满车éé |
| | | , "HQty_Empty": result.data[i].空车éé |
| | | , "HQty_Back": result.data[i].å车éé |
| | | , "HCostPrice": result.data[i].ææ¬åä»· |
| | | , "HCostMoney": result.data[i].ææ¬éé¢ |
| | | , "HSalePrice": result.data[i].éå®åä»· |
| | | , "HSeOrderInterID": result.data[i].HSeOrderInterID |
| | | , "HSeOrderEntryID": result.data[i].HSeOrderEntryID |
| | | , "HSeOrderBillNo": result.data[i].éå®è®¢åå· |
| | | , "HSourceInterID": result.data[i].HSourceInterID |
| | | , "HSourceEntryID": result.data[i].HSourceEntryID |
| | | , "HSourceBillNo": result.data[i].æºååå· |
| | | , "HSourceBillType": result.data[i].HSourceBillType |
| | | , "HRelationQty": result.data[i].å
³èæ°é |
| | | , "HRelationMoney": result.data[i].å
³èéé¢ |
| | | , 'HSPID': result.data[i].HSPID |
| | | , 'HSPName': result.data[i].ä»ä½ |
| | | , 'HSPGroupID': result.data[i].HSPGroupID |
| | | , "HSPGroupName": result.data[i].ä»ä½ç» |
| | | , 'HSCWHID': result.data[i].HSCWHID |
| | | , 'HSCWHName': result.data[i].è°åºä»åº |
| | | , 'HSCSPID': result.data[i].HSCSPID |
| | | , 'HSCSPName': result.data[i].è°åºä»ä½ |
| | | , 'HBatchNo': result.data[i].æ¹æ¬¡ |
| | | , 'HPOOrderInterID': result.data[i].éè´è®¢åå
ç |
| | | , 'HPOOrderEntryID': result.data[i].éè´è®¢ååå
ç |
| | | , 'HPOOrderBillNo': 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].æ¢ç®ç |
| | | , 'HEngineNum': result.data[i].å卿ºå· |
| | | , 'HUnderPanNum': result.data[i].å°çå· |
| | | , 'HLeaveFactCard': result.data[i].åºåè¯ |
| | | , 'HReqBuyQty': result.data[i].ç³è¯·éè´æ°é |
| | | , 'HReqOutQty': result.data[i].ç³è¯·åºåºæ°é |
| | | , 'HCurrentInventory': result.data[i].å½ååºå |
| | | } |
| | | ); |
| | | } |
| | | if (data.ç¶æ != 'å建' && this.copyType != 1) { |
| | | this.$modal.msgError("æ¤æ¡æ°æ®ä¸æ¯åå»ºç¶æï¼ä¸è½ä¿®æ¹"); |
| | | this.subDisabled = true |
| | | } |
| | | this.formShow = true |
| | | this.formLoading = false |
| | | |
| | | } |
| | | }).catch(error => { |
| | | this.$modal.msgError("æ¥å£è¯·æ±å¤±è´¥!"); |
| | | }); |
| | | }, |
| | | //æ ¹æ®å®¢æ·å¸¦åºè系人ãèç³»çµè¯ |
| | | getCustomerByCusID(HCusID) { |
| | | axios.get(this.baseURL + "/Xs_SeOrderBill/getCustomerByCusID", { |
| | | params: { |
| | | HCusID: HCusID |
| | | } |
| | | }).then(response => { |
| | | this.form.è系人 = response.data.data[0].HLinkMan |
| | | this.form.èç³»çµè¯ = response.data.data[0].HLinkPhone |
| | | // this.form = response.data.data[0] |
| | | |
| | | }).catch(error => { |
| | | this.$modal.msgError("æ¥å£è¯·æ±å¤±è´¥!"); |
| | | }); |
| | | }, |
| | | /** éå®åºåºå表æç»åºå· */ |
| | | wlxxzbRowSysZbIndex({ row, rowIndex }) { |
| | | row.index = rowIndex + 1; |
| | | }, |
| | | tiaomaZbIndex({ row, rowIndex }) { |
| | | row.index = rowIndex + 1; |
| | | }, |
| | | danganZbIndex({ row, rowIndex }) { |
| | | row.index = rowIndex + 1; |
| | | }, |
| | | /** ç¼è¾é¡µåè¡¨æ·»å æé®æä½ */ |
| | | handleAddSysZb(index, num) { |
| | | if (num == 1 && !index) { |
| | | this.$modal.msgError("è¯·éæ©ä¸è¡æ°æ®ç¼è¾!"); |
| | | } else { |
| | | let obj = { |
| | | HMainID: 0, |
| | | HSubID: 0, |
| | | HSourceBillSEQ: '', |
| | | HBillNo: '', |
| | | HMaterID: '', |
| | | HMaterNumber: '', |
| | | HMaterName: '', |
| | | HMaterModel: '', |
| | | HCusModel: '', |
| | | HCusMaterName: '', |
| | | HEmpID: 0, |
| | | HEmpNumber: '', |
| | | HEmpName: '', |
| | | HGroupID: 0, |
| | | HGroupNumber: '', |
| | | HGroupName: '', |
| | | HCheckEmpName: '', |
| | | HBatchNo: '', |
| | | HMTONo: '', |
| | | HQty: 0, |
| | | HMinQty: 0, |
| | | HBQty: 0, |
| | | HPackQty: '', |
| | | HCoilNO: '', |
| | | HFurnaceNO: '', |
| | | HFactory: '', |
| | | HCusID: 0, |
| | | HCusNumber: '', |
| | | HCusName: '', |
| | | HSeOrderBillNo: '', |
| | | HRemark: '', |
| | | HProduceDate: this.form.HDate, |
| | | HExpiryDate: this.form.HDate, |
| | | HheatNO: '', |
| | | HAuxPropID: 0, |
| | | HAuxPropNumber: '', |
| | | HAuxPropName: '', |
| | | HUnitID: 0, |
| | | HUnitNumber: '', |
| | | HUnitName: '', |
| | | HAuxQty: '', |
| | | HExpirationDateFlag: '', |
| | | HGiveAwayFlag: '', |
| | | HDate: this.form.HDate, |
| | | } |
| | | if (index) { |
| | | this.editWlxxData.splice(index, 0, obj); |
| | | this.$set(this.editWlxxData, index, obj) |
| | | } else { |
| | | this.editWlxxData.push(obj); |
| | | } |
| | | } |
| | | }, |
| | | handleCopyZbRow() { |
| | | if (!this.zbIndex) { |
| | | this.$modal.msgError("è¯·éæ©ä¸è¡æ°æ®") |
| | | } else { |
| | | let copyRow = JSON.parse(JSON.stringify(this.zbSelForm)) |
| | | this.editWlxxData.push(copyRow); |
| | | } |
| | | }, |
| | | /** ç¼è¾é¡µå表å é¤æé®æä½ */ |
| | | handleDeleteSysZb(row) { |
| | | this.checkedSysZb = [] |
| | | this.checkedSysZb.push(row.index) |
| | | if (this.checkedSysZb.length == 0) { |
| | | this.$modal.msgError("请å
éæ©è¦å é¤çåå订åæç»æ°æ®"); |
| | | } else { |
| | | const editWlxxData = this.editWlxxData; |
| | | const checkedSysZb = this.checkedSysZb; |
| | | this.editWlxxData = editWlxxData.filter(function (item) { |
| | | return checkedSysZb.indexOf(item.index) == -1 |
| | | }); |
| | | } |
| | | }, |
| | | /** ç¼è¾é¡µå表å¤éæ¡é䏿°æ® */ |
| | | handleTableWlxxZbEdit(selection) { |
| | | this.checkedSysZb = selection.map(item => item.index) |
| | | this.zbSelForm = selection[0] |
| | | this.zbIndex = this.checkedSysZb[0] |
| | | if (selection.length > 1) { |
| | | const del_row = selection.shift() |
| | | this.$refs.wlxxzbTable.toggleRowSelection(del_row, false) //设置è¿ä¸è¡åæ¶éä¸ |
| | | } |
| | | }, |
| | | handleTableDangan(selection) { |
| | | this.danganSelList = selection |
| | | }, |
| | | showReset() { |
| | | this.materialShow = false |
| | | this.ScICMOBillShow = false |
| | | }, |
| | | // æå¼æ°æ®åè¡¨å¼¹çª |
| | | openDataDialog(num, row) { |
| | | //num1é¨é¨ï¼2åºåºä»åºï¼3ç©æï¼4éå®å |
| | | if (row) { |
| | | this.zbIndex = row.index - 1 |
| | | } |
| | | 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 |
| | | } |
| | | |
| | | }, |
| | | |
| | | //#region èªå¨ç»å½ |
| | | //#region 夿æ¯å¦ç»å½ æªç»å½åè·³å°ç»å½é¡µ |
| | | get_LoginIs() { |
| | | //#region 夿æ¯å¦ç»å½ï¼æªç»å½å跳转åç»å½é¡µé¢ |
| | | judgeIsLoging(){ |
| | | if (sessionStorage["login"] != "login") { |
| | | this.$modal.msgError("ç»å½å¤±æï¼è¯·éæ°ç»å½ï¼ï¼"); |
| | | this.$router.push({ path: "/" }).catch(() => { }) |
| | |
| | | }, |
| | | //#endregion |
| | | |
| | | //#region èªå¨ç»å½è·åè¶
龿¥åæ° |
| | | get_ParamsForAutoLogin(){ |
| | | //#region 页é¢åå§å |
| | | initPageData(){ |
| | | var params = this.get_UrlVars(); |
| | | this.paramsForAutoLogin.OperationType = params[params[0]]; //æä½ç±»å |
| | | this.paramsForAutoLogin.HSourceInterID = params[params[1]]; //æºå主id |
| | | this.paramsForAutoLogin.HSourceEntryID = params[params[2]]; //æºååid |
| | | this.paramsForAutoLogin.HSourceBillType = params[params[3]]; //æºåç±»å |
| | | this.paramsForAutoLogin.HSourceBillNo = params[params[4]]; //æºååå· |
| | | this.paramsForAutoLogin.HUserName = params[params[5]]; //ç»å½å |
| | | this.paramsForAutoLogin.HPwdWord = params[params[6]]; //ç»å½å¯ç |
| | | this.paramsForAutoLogin.HOrgID = params[params[7]]; //ç»ç»id |
| | | 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 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; |
| | |
| | | return vars; |
| | | }, |
| | | //#endregion |
| | | |
| | | //#region èªå¨ç»å½ |
| | | initDataForAutoLogin(){ |
| | | |
| | | //#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]]; //æºå主id |
| | | var HSourceEntryID = params[params[2]]; //æºååid |
| | | var HSourceBillType = params[params[3]]; //æºåç±»å |
| | | var HSourceBillNo = params[params[4]]; //æºååå· |
| | | var HUserName = params[params[5]]; //ç»å½å |
| | | var HPwdWord = params[params[6]]; //ç»å½å¯ç |
| | | var HOrgID = params[params[7]]; //ç»ç»id |
| | | var HOrgName = ""; |
| | | |
| | | if (HOrgID == 0) { |
| | | this.$modal.msgError("è¯·éæ©ç»ç»ï¼ï¼"); |
| | | //夿æ¯å¦ç»å½ æªç»å½åè·³å°ç»å½é¡µ |
| | | if (sessionStorage["login"] != "login") { |
| | | this.$modal.msgError("ç»å½å¤±æï¼è¯·éæ°ç»å½ï¼ï¼"); |
| | | this.$router.push({ path: "/" }).catch(() => { }) |
| | | |
| | | //è·åæºåä¿¡æ¯ |
| | | 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 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 => { |
| | | let data1 = response.data |
| | | if (data1.count == 1) { |
| | | if (data1.data.length > 0) { |
| | | HOrgName = data1.data[0]["HName"]; |
| | | } else { |
| | | this.$modal.msgError("ç»ç»ä¸åå¨ï¼ï¼"); |
| | | } |
| | | } else { |
| | | this.$modal.msgError(data1.code + data1.Message); |
| | | } |
| | | }).catch(error => { |
| | | this.$modal.msgError("æ¥å£é误ï¼ï¼ï¼"); |
| | | }) |
| | | var dataArray = []; |
| | | dataArray.push(temp); |
| | | |
| | | var sql_login = "select * from h_v_Gy_Czygl_Login where Czybm = '" + "101" + "'"; |
| | | axios.get(this.baseURL + '/CommonModel/searchMethod', { |
| | | params: { |
| | | "sql": sql_login, "user": HUserName, "ModRightNameCheck": "" |
| | | }, |
| | | }).then(response => { |
| | | let 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["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("å 载失败ï¼ï¼è¯¥éè¶è´¦å·æªç»å®æ¡ç ç³»ç»è´¦å·ï¼ï¼"); |
| | | //夿æ¯å¦ç»å½ æªç»å½åè·³å°ç»å½é¡µ |
| | | if (sessionStorage["login"] != "login") { |
| | | this.$modal.msgError("ç»å½å¤±æï¼è¯·éæ°ç»å½ï¼ï¼"); |
| | | this.$router.push({ path: "/" }).catch(() => { }) |
| | | } |
| | | } |
| | | } else { |
| | | this.$modal.msgError(result.Message); |
| | | //夿æ¯å¦ç»å½ æªç»å½åè·³å°ç»å½é¡µ |
| | | if (sessionStorage["login"] != "login") { |
| | | this.$modal.msgError("ç»å½å¤±æï¼è¯·éæ°ç»å½ï¼ï¼"); |
| | | this.$router.push({ path: "/" }).catch(() => { }) |
| | | } |
| | | } |
| | | }).catch(error => { |
| | | this.$modal.msgError("æ¥å£é误ï¼ï¼ï¼"); |
| | | //夿æ¯å¦ç»å½ æªç»å½åè·³å°ç»å½é¡µ |
| | | if (sessionStorage["login"] != "login") { |
| | | this.$modal.msgError("ç»å½å¤±æï¼è¯·éæ°ç»å½ï¼ï¼"); |
| | | this.$router.push({ path: "/" }).catch(() => { }) |
| | | } |
| | | }) |
| | | 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.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 |
| | | } |
| | | }; |