<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" @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>
|
</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" @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>
|
</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>
|
</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>
|
</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>
|
</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>
|
</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-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" /></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-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"><span>{{ row[column.label] }}</span> </div>
|
</template>
|
</el-table-column>
|
</template>
|
</el-table>
|
</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" />
|
|
<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 HSourceReportHtml from '@/views/component/HSourceReportHtml'
|
import PrintList from "@/views/component/printList";
|
import moment from 'moment';
|
import GyProperty from "@/views/basic/gyProperty/gyPropertyList.vue";
|
|
export default {
|
name: 'Gy_BarCodeBill',
|
components: { HSourceReportHtml, PrintList, GyProperty },
|
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: [
|
{ field: 'HItemID', title: 'HItemID', width: 100, hide: true }
|
, { field: 'hmainid', title: 'hmainid', width: 100, hide: true }
|
, { field: 'hsubid', title: 'hsubid', width: 100, hide: true }
|
, { field: 'HinterID', title: 'HinterID', width: 100, hide: true }
|
, { field: '条码类型', title: '条码类型', width: 100 }
|
, { field: '条码编号', title: '条码编号', width: 120 }
|
, { field: 'HMaterID', title: '物料ID', width: 100, hide: true }
|
, { field: '物料代码', title: '物料代码', width: 120 }
|
, { field: '物料名称', title: '物料名称', width: 120 }
|
, { field: '规格型号', title: '规格型号', width: 120 }
|
, { field: 'HUnitID', title: '计量单位ID', width: 100, hide: true }
|
, { field: '计量单位代码', title: '计量单位代码', width: 120 }
|
, { field: '计量单位', title: '计量单位', width: 120 }
|
, { field: 'HAuxPropID', title: '辅助属性ID', width: 100, hide: true }
|
, { field: '辅助属性代码', title: '辅助属性代码', width: 120 }
|
, { field: '辅助属性', title: '辅助属性', width: 120 }
|
, { field: '批号', title: '批号', width: 120 }
|
, { field: '数量', title: '数量', width: 100 }
|
, { field: '源单单号', title: '源单单号', width: 120 }
|
, { field: '计划跟踪号', title: '计划跟踪号', width: 120 }
|
, { field: '是否赠品', title: '是否赠品', width: 100 }
|
, { field: 'DeptID', title: '车间ID', width: 100, hide: true }
|
, { field: '车间', title: '车间', width: 120 }
|
, { field: 'HSupID', title: '供应商ID', width: 100, hide: true }
|
, { field: '供应商代码', title: '供应商代码', width: 120 }
|
, { field: '供应商', title: '供应商', width: 120 }
|
, { field: '客户条码编号', title: '客户条码编号', width: 120 }
|
, { field: '客户型号', title: '客户型号', width: 120 }
|
, { field: '往来单位', title: '往来单位', width: 120 }
|
, { field: '销售订单号', title: '销售订单号', width: 120 }
|
, { field: '销售订单行号', title: '销售订单行号', width: 120 }
|
, { field: '托号', title: '托号', width: 120 }
|
, { field: '总托数', title: '总托数', width: 100 }
|
, { field: '条码日期', title: '条码日期', width: 120 }
|
, { field: '生产入库日期', title: '生产入库日期', width: 120 }
|
, { field: '生产入库单号', title: '生产入库单号', width: 120 }
|
, { field: '生产入库次数', title: '生产入库次数', width: 100 }
|
, { field: '销售出库日期', title: '销售出库日期', width: 120 }
|
, { field: '销售出库单号', title: '销售出库单号', width: 120 }
|
, { field: '销售出库次数', title: '销售出库次数', width: 100 }
|
, { field: '作废标记', title: '作废标记', width: 100 }
|
, { field: '作废人', title: '作废人', width: 100 }
|
, { field: '备注', title: '备注', width: 120 }
|
, { field: '制作人', title: '制作人', width: 100 }
|
, { field: '日期', title: '日期', width: 120 }
|
, { field: '计划完工日期', title: '计划完工日期', width: 120 }
|
, { field: '打印次数', title: '打印次数', width: 100 }
|
, { field: 'HSTOCKORGID', title: 'HSTOCKORGID', width: 100, hide: true }
|
, { field: '生成组织', title: '生成组织', width: 120 }
|
],
|
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" }
|
]
|
}
|
};
|
},
|
created() {
|
this.set_HBarCodeType()
|
this.getdata()
|
},
|
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) {
|
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;
|
}
|
|
return
|
}
|
console.log(deptRow)
|
if (deptRow.length > 0) {
|
this.zbDataShow = false
|
this.editWlxxData = []
|
var list = []
|
var BillSelect = []
|
for (var i = 0; i < deptRow.length; i++) {
|
if (deptRow[i].部门 != "" && deptRow[i].部门 != null) {
|
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)
|
}
|
},
|
//根据用户获取对应职员、部门、销售主管
|
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.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;
|
}
|
}else {
|
this.showReset()
|
this.HSouceBillType = this.getSupType()
|
this.dialogTitle = this.getSupType() + '列表'
|
this.ScICMOBillShow = true
|
this.openData = true
|
}
|
|
},
|
}
|
};
|
</script>
|
<style>
|
.input-search-btn {
|
background-color: rgb(24, 144, 255) !important;
|
color: #fff !important;
|
}
|
</style>
|