1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669 |
- <template>
- <el-dialog
- v-dialog-drag
- title="快速出库"
- :visible.sync="visible"
- width="85%"
- :append-to-body="true"
- :close-on-click-modal="false"
- :before-close="closeDialog"
- >
- <el-form :model="form" :rules="rules" label-width="80px" ref="form">
- <el-row>
- <el-col :xs="12" :sm="6">
- <el-form-item label="提单号" prop="fMblno">
- <el-input
- v-model="form.fMblno"
- placeholder="请输入提单号"
- clearable
- @change="changeMblno"
- style="width: 100%"
- />
- </el-form-item>
- </el-col>
- <el-col :xs="12" :sm="6">
- <el-form-item label="客户名称" prop="fCorpid">
- <el-select
- v-model="form.fCorpid"
- clearable
- filterable
- placeholder="请输入关键词"
- @change="changeCorp"
- style="width: 100%"
- :disabled="detailList.length > 0"
- >
- <el-option
- v-for="(item, index) in fMblnoOptions"
- :key="index.fId"
- :label="item.fName"
- :value="item.fId"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :xs="12" :sm="6">
- <el-form-item label="出库日期" prop="fBsdate">
- <el-date-picker
- type="date"
- v-model="form.fBsdate"
- value-format="timestamp"
- format="yyyy-MM-dd"
- placeholder="请选择计划日期"
- style="width: 100%"
- ></el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :xs="12" :sm="6">
- <el-form-item label="出库时间" prop="fBstime">
- <el-time-picker
- v-model="form.fBstime"
- :picker-options="{
- selectableRange: '00:00:00 - 23:59:59',
- }"
- :clearable="true"
- value-format="timestamp"
- placeholder="任意时间点"
- style="width: 100%"
- ></el-time-picker>
- </el-form-item>
- </el-col>
- <el-col :xs="12" :sm="6">
- <el-form-item label="仓库" prop="fWarehouseid">
- <el-select
- v-model="form.fWarehouseid"
- filterable
- placeholder="请选择"
- @change="changefWarehouseid"
- style="width: 100%"
- :disabled="detailList.length > 0"
- >
- <el-option
- v-for="(item, index) in warehouseOptions"
- :key="index.fId"
- :label="item.fName"
- :value="item.fId"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :xs="12" :sm="6">
- <el-form-item label="品名" prop="fGoodsid">
- <el-select
- filterable
- v-model="form.fGoodsid"
- placeholder="请选择品名"
- @change="goodsChange"
- style="width: 100%"
- clearable
- >
- <el-option
- v-for="(item, index) in goodsOptions"
- :key="index.fId"
- :label="item.fName"
- :value="item.fId"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :xs="12" :sm="6">
- <el-form-item label="品名属性" prop="fGoodsType">
- <el-select
- filterable
- v-model="form.fGoodsType"
- placeholder="请选择商品属性"
- style="width: 100%"
- >
- <el-option
- v-for="(item, index) in fStorageTypeOptions"
- :key="index.dictValue"
- :label="item.dictLabel"
- :value="item.dictValue"
- />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :xs="12" :sm="6">
- <el-form-item label="属性内容">
- <el-input
- v-model="form.fMarks"
- placeholder="请填写属性描述"
- clearable
- style="width: 100%"
- />
- </el-form-item>
- </el-col>
- <el-col :xs="12" :sm="6">
- <el-form-item label="车号">
- <el-input
- placeholder="请输入车号"
- v-model="form.fTruckno"
- style="width: 100%"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="12" :sm="6">
- <el-form-item label="司机">
- <el-input
- placeholder="请输入司机姓名"
- v-model="form.fDriverName"
- style="width: 100%"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="12" :sm="6">
- <el-form-item label="电话">
- <el-input
- placeholder="请输入司机电话"
- v-model="form.fDriverTel"
- style="width: 100%"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="12" :sm="6">
- <el-form-item label="证件号">
- <el-input
- placeholder="请输入证件号"
- v-model="form.fDriverIdCar"
- style="width: 100%"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="备注">
- <el-input
- type="textarea"
- :autosize="{ minRows: 2, maxRows: 4}"
- placeholder="请输入备注"
- v-model="form.remark"
- style="width: 100%"
- >
- </el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <div style="margin: 10px 0">
- <!-- 列设置-->
- <el-dialog title="提示" :visible.sync="showSetting" width="700px" v-dialogDrag append-to-body>
- <template slot="title">
- <div class="avue-crud__dialog__header">
- <span class="el-dialog__title">
- <span
- style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px"></span>
- </span>
- </div>
- </template>
- <div>配置排序列数据(拖动调整顺序)</div>
- <div style="margin-left: 17px">
- <el-checkbox
- v-model="allCheck"
- label="全选"
- @change="allChecked"
- ></el-checkbox>
- </div>
- <div style="padding: 4px; display: flex; justify-content: center">
- <draggable
- v-model="setRowList"
- group="site"
- animation="300"
- @start="onStart"
- @end="onEnd"
- handle=".indraggable"
- >
- <transition-group>
- <div
- v-for="item in setRowList"
- :key="item.surface"
- class="listStyle"
- >
- <div style="width: 500px" class="indraggable">
- <div class="progress" :style="{ width: item.width + 'px' }">
- <el-checkbox
- :label="item.name"
- v-model="item.checked"
- :true-label="0"
- :false-label="1"
- >{{ item.name }}
- </el-checkbox>
- </div>
- </div>
- <el-input-number
- v-model.number="item.width"
- controls-position="right"
- :min="1"
- :max="500"
- size="mini"
- ></el-input-number>
- </div>
- </transition-group>
- </draggable>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="showSetting = false">取 消</el-button>
- <el-button @click="delRow" type="danger">重 置</el-button>
- <el-button type="primary" @click="save()">确 定</el-button>
- </span>
- </el-dialog>
- <el-tabs v-model="activeName">
- <el-tab-pane label="出库明细" name="outStockList">
- <div style="margin: 10px 10px">
- <el-button
- size="small"
- style="float:left;"
- type="primary"
- @click="addList"
- :disabled="disabled"
- >
- 检索
- </el-button>
- <el-button
- size="small"
- style="float:left;"
- type="danger"
- :disabled="selection.length == 0"
- @click="batchDelete"
- >
- 批量删除
- </el-button>
- <el-button
- icon="el-icon-setting"
- size="mini"
- circle
- @click="showSetting = !showSetting"
- style="float: right"
- ></el-button>
- </div>
- <el-table
- :data="detailList"
- tooltip-effect="dark"
- stripe
- ref="detailTable"
- @selection-change="handleSelection"
- show-summary
- :summary-method="getSummaries"
- >
- <el-table-column type="selection" width="50" align="center" fixed/>
- <el-table-column
- label="序号"
- type="index"
- width="50"
- fixed
- align="center"
- />
- <el-table-column
- v-for="(item, index) in getRowList"
- :key="index"
- :label="item.name"
- :width="item.width"
- :prop="item.label"
- align="center"
- :fixed="item.fixed"
- :show-overflow-tooltip="true"
- sortable
- >
- <template slot-scope="scope">
- <span v-if="item.label == 'fGoodsid'">
- {{ scope.row.fGoodsids }}
- </span>
- <!-- <span v-else-if="item.label == 'fCntrno'">-->
- <!-- <el-input-->
- <!-- v-model="scope.row.fCntrno"-->
- <!-- placeholder="请输入箱号"-->
- <!-- clearable-->
- <!-- ></el-input>-->
- <!-- </span>-->
- <span v-else-if="item.label == 'fSealno'">
- <el-input
- v-model="scope.row.fSealno"
- placeholder="请输入封号"
- clearable
- ></el-input>
- </span>
- <span v-else-if="item.label == 'fNowCarton'">
- <el-input
- v-model="scope.row.fNowCarton"
- placeholder="请输入现箱号"
- clearable
- ></el-input>
- </span>
- <span v-else-if="item.label == 'fBusinessType'">
- <el-select
- v-model="scope.row.fBusinessType"
- filterable
- disabled
- placeholder="请选择商品属性"
- >
- <el-option
- v-for="(item, index) in fStorageTypeOptions"
- :key="index.dictValue"
- :label="item.dictLabel"
- :value="item.dictValue"
- />
- </el-select>
- </span>
- <span v-else-if="item.label == 'fQty'">
- <el-input
- v-input-limit="0"
- @change="qtyChange(scope.row)"
- v-model="scope.row.fQty"
- placeholder="出库件数"
- />
- </span>
- <span v-else-if="item.label == 'fGrossweight'">
- <el-input
- v-input-limit="2"
- v-model="scope.row.fGrossweight"
- @change="changeOutStock(scope.row)"
- placeholder="出库毛重"
- />
- </span>
- <span v-else-if="item.label == 'fNetweight'">
- <el-input
- v-input-limit="2"
- v-model="scope.row.fNetweight"
- @change="changeOutStock(scope.row)"
- placeholder="出库净重"
- />
- </span>
- <span v-else-if="item.label == 'remark'">
- <el-input
- v-model="scope.row.remark"
- placeholder="备注"
- />
- </span>
- <span v-else>{{ scope.row[item.label] }}</span>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- label="操作"
- width="160px"
- fixed="right"
- >
- <template slot-scope="scope">
- <el-button
- type="text"
- @click.native.prevent="wDeleteRow(scope.$index, detailList)"
- size="small"
- >移除
- </el-button
- >
- </template>
- </el-table-column>
- </el-table>
- </el-tab-pane>
- <el-tab-pane label="收款信息" name="DrList">
- <div style="margin: 10px 10px">
- <el-button
- size="small"
- style="float:left;"
- type="primary"
- @click="addDrList"
- >
- 新行
- </el-button>
- </div>
- <el-table
- ref="DrTable"
- :data="DrList"
- tooltip-effect="dark"
- stripe
- >
- <el-table-column label="序号" type="index" width="50" fixed></el-table-column>
- <el-table-column
- prop="fCorpid"
- header-align="center"
- align="center"
- width="300px"
- label="客户名称"
- >
- <template slot-scope="scope">
- <el-select
- v-model="scope.row.fCorpid"
- filterable
- clearable
- placeholder="客户名称"
- >
- <el-option
- v-for="(item, index) in fMblnoOptions"
- :key="index.fId"
- :label="item.fName"
- :value="item.fId"
- ></el-option>
- </el-select>
- </template>
- </el-table-column>
- <el-table-column
- prop="fFeeid"
- header-align="center"
- align="center"
- width="240px"
- label="费用名称"
- >
- <template slot-scope="scope">
- <el-select
- v-model="scope.row.fFeeid"
- clearable
- filterable
- placeholder="费用名称"
- >
- <el-option
- v-for="(item, index) in fDNameOptions"
- :key="index.fId"
- :label="item.fName"
- :value="item.fId"
- ></el-option>
- </el-select>
- </template>
- </el-table-column>
- <el-table-column
- prop="fFeeUnitid"
- header-align="center"
- align="center"
- width="180px"
- label="计价单位"
- >
- <template slot-scope="scope">
- <el-select
- v-model="scope.row.fFeeUnitid"
- placeholder="请选择计价单位"
- clearable
- @change="changeFeeUnit(scope.row)"
- >
- <el-option
- v-for="(item, index) in fFeetUnitOptions"
- :key="index.dictValue"
- :label="item.dictLabel"
- :value="item.dictValue"
- />
- </el-select>
- </template>
- </el-table-column>
- <el-table-column
- prop="fQty"
- header-align="center"
- align="center"
- width="130px"
- label="数量"
- >
- <template slot-scope="scope">
- <el-input
- oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
- v-model="scope.row.fQty"
- placeholder="数量"
- @change="changeContractAmt(scope.row)"
- show-word-limit
- />
- </template>
- </el-table-column>
- <el-table-column
- prop="fUnitprice"
- header-align="center"
- align="center"
- width="130px"
- label="单价"
- >
- <template slot-scope="scope">
- <el-input
- oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
- v-model="scope.row.fUnitprice"
- placeholder="单价"
- @change="changeContractAmt(scope.row)"
- show-word-limit
- />
- </template>
- </el-table-column>
- <el-table-column
- prop="fAmount"
- header-align="center"
- align="center"
- width="130px"
- label="金额"
- >
- <template slot-scope="scope">
- <el-input
- oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
- v-model="scope.row.fAmount"
- placeholder="金额"
- show-word-limit
- />
- </template>
- </el-table-column>
- <el-table-column
- prop="fMblno"
- header-align="center"
- align="center"
- width="130px"
- label="提单号"
- >
- <template slot-scope="scope">
- <el-input
- v-model="scope.row.fMblno"
- placeholder="提单号"
- show-word-limit
- />
- </template>
- </el-table-column>
- <el-table-column
- prop="fProductName"
- header-align="center"
- align="center"
- width="140px"
- label="品名"
- >
- <template slot-scope="scope">
- <el-input
- v-model="scope.row.fProductName"
- placeholder="品名"
- show-word-limit
- />
- </template>
- </el-table-column>
- <el-table-column
- prop="fMarks"
- header-align="center"
- align="center"
- width="130px"
- label="品牌"
- >
- <template slot-scope="scope">
- <el-input
- v-model="scope.row.fMarks"
- placeholder="品牌"
- show-word-limit
- />
- </template>
- </el-table-column>
- <el-table-column
- prop="fSrcTypeId"
- header-align="center"
- align="center"
- width="130px"
- label="来源"
- >
- <template slot-scope="scope">
- <span v-if="scope.row.fSrcTypeId === 0">录入</span>
- <span v-if="scope.row.fSrcTypeId == 1">协议</span>
- <span v-if="scope.row.fSrcTypeId == 10">变更</span>
- </template>
- </el-table-column>
- <el-table-column
- prop="remark"
- header-align="center"
- align="center"
- width="150px"
- label="备注"
- >
- <template slot-scope="scope">
- <el-input
- v-model="scope.row.remark"
- placeholder="备注"
- show-word-limit
- />
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- label="操作"
- width="200px"
- fixed="right"
- >
- <template slot-scope="scope">
- <el-button
- @click.native.prevent="deleteDrRow(scope.$index, DrList)"
- size="small"
- >移除
- </el-button>
- <el-button
- size="small"
- @click="listCheck(scope.row)"
- v-if="scope.row.fBillstatus < 6"
- >请核</el-button>
- <el-button
- size="small"
- @click="revokeListCheck(scope.row)"
- v-if="scope.row.fBillstatus == 6"
- >撤销请核</el-button>
- </template>
- </el-table-column>
- </el-table>
- </el-tab-pane>
- </el-tabs>
- </div>
- </el-form>
- <!-- 打印-->
- <el-dialog
- append-to-body
- :close-on-click-modal="false"
- :modal="false"
- :visible.sync="printVisible"
- >
- <div id="print_ckd">
- <div style="text-align: center;font-size: 24px;margin-bottom: 5px;">出库单</div>
- <div style="text-align: center;font-size: 24px;margin-bottom: 5px;">{{ company }}</div>
- <div class="print_table" style="display: flex">
- <table border="0" cellspacing="0" cellpadding="0" style="width: 100%; line-height: 30px">
- <tr>
- <td>客户名</td>
- <td v-for="item in fMblnoOptions" v-if="item.fId == form.fCorpid">{{ item.fName }}</td>
- <td>日期</td>
- <td>{{ form.fBsdate | fBsdateFormat }}</td>
- <td>流水号</td>
- <td colspan="2">{{ detailList.length > 0 ? detailList[0].fSerialNumber : '' }}</td>
- </tr>
- <tr>
- <td>车号</td>
- <td colspan="1">{{ form.fTruckno }}</td>
- <td colspan="1">提单号</td>
- <td colspan="4">{{ form.fMblno }}</td>
- </tr>
- <tr>
- <td>货名</td>
- <td>箱号</td>
- <td>铅封号</td>
- <td>件数</td>
- <td>规格</td>
- <td>区位</td>
- <td>备注</td>
- </tr>
- <tr v-for="(item, index) in detailList" :key="index">
- <td v-for="row in goodsOptions" v-if="row.fId == item.fGoodsid">{{ row.fName }}</td>
- <td>{{ item.fCntrno }}</td>
- <td>{{ item.fSealno }}</td>
- <td>{{ item.fQty }}</td>
- <td>{{ item.fMarks }}</td>
- <td>{{ item.fWarehouseInformation }}</td>
- <td>{{ item.remark }}</td>
- </tr>
- <tr>
- <td>备注</td>
- <td colspan="4">{{ form.remark }}</td>
- <td>总件数</td>
- <td>{{ allfQty }}</td>
- </tr>
- </table>
- </div>
- <div style="display: flex; justify-content: space-between; font-size: 12px;margin-top: 8px">
- <div>操作:</div>
- <div>理货:</div>
- <div>叉车:</div>
- <div>司机:</div>
- <div style="width: 150px">电话:</div>
- </div>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button
- type="primary"
- @click="
- addprint('ckd');
- printVisible = false;
- "
- >打印
- </el-button>
- <el-button @click="printVisible = false">取消</el-button>
- </span>
- </el-dialog>
- <span slot="footer" class="dialog-footer">
- <el-button type="success" @click="handleSave">暂存</el-button>
- <el-button type="warning" @click="openPrint" :disabled="detailList.length == 0">打印</el-button>
- <el-button type="primary" @click="handleConfirm" :disabled="detailList.length == 0">确认出库</el-button>
- <el-button @click="closeDialog">取消</el-button>
- </span>
- </el-dialog>
- </template>
- <script>
- import Cookies from "js-cookie";
- import draggable from "vuedraggable";
- import {listCorps} from "@/api/basicdata/corps";
- import {
- treeselect,
- listWarehousesss,
- } from "@/api/basicdata/warehouse";
- import {listGoods} from "@/api/basicdata/goods";
- import {queryUserVal} from "@/api/system/user";
- import {listWhgenleg} from "@/api/reportManagement/whgenleg";
- import {addSet, resetModule, select} from '@/api/system/set';
- import {changeSelect, fastOutStock, saveOutstock} from "@/api/warehouseBusiness/fastOutStock";
- import print from "print-js";
- import {listFees, getFees} from "@/api/basicdata/fees";
- import {feesCheck,revokefeeCheck} from "@/api/warehouseBusiness/warehouseOutStock";
- export default {
- name: "fastOutStock",
- props: {},
- components: {
- draggable,
- },
- data() {
- return {
- loading: false,
- activeName: 'outStockList',
- disabled: false,
- visible: false,
- printVisible: false,
- company: '',
- form: {},
- detailList: [],
- fMblnoOptions: [],
- // 仓库
- warehouseOptions: [],
- // 品名
- goodsOptions: [],
- // 品名属性
- fStorageTypeOptions: [],
- fWarehouseidOptions: [],
- rules: {
- fCorpid: [{required: true, message: " ", trigger: "blur"}],
- fBsdate: [{required: true, message: " ", trigger: "blur"}],
- fWarehouseid: [{required: true, message: " ", trigger: "blur"}],
- fTruckno: [{required: true, message: " ", trigger: "blur"}],
- },
- selection: [],
- allfQty: 0,
- DrList: [],
- fFeetUnitOptions: [],
- fDNameOptions: [],
- // 设置列开关
- showSetting: false,
- setRowList: [],
- getRowList: [],
- tableDate: [
- {
- surface: "1",
- label: "fMblno",
- name: "提单号",
- checked: 0,
- width: 100,
- },
- {
- surface: "2",
- label: "fCntrno",
- name: "箱号",
- checked: 0,
- width: 100,
- },
- {
- surface: "3",
- label: "fSealno",
- name: "封号",
- checked: 0,
- width: 100,
- },
- {
- surface: "4",
- label: "fGoodsid",
- name: "品名",
- checked: 0,
- width: 150,
- },
- {
- surface: "5",
- label: "fBusinessType",
- name: "货物属性",
- checked: 0,
- width: 100,
- },
- {
- surface: "6",
- label: "fMarks",
- name: "属性详情",
- checked: 0,
- width: 100,
- },
- {
- surface: "7",
- label: "fWarehouseInformation",
- name: "库区",
- checked: 0,
- width: 150,
- },
- {
- surface: "8",
- label: "fPlanqty",
- name: "结余库存",
- checked: 0,
- width: 100,
- },
- {
- surface: "9",
- label: "fPlangrossweight",
- name: "结余毛重(kg)",
- checked: 0,
- width: 120,
- },
- {
- surface: "10",
- label: "fPlannetweight",
- name: "结余净重(kg)",
- checked: 0,
- width: 120,
- },
- {
- surface: "11",
- label: "fQty",
- name: "件数",
- checked: 0,
- width: 100,
- },
- {
- surface: "12",
- label: "fGrossweight",
- name: "毛重(kg)",
- checked: 0,
- width: 120,
- },
- {
- surface: "13",
- label: "fNetweight",
- name: "净重(kg)",
- checked: 0,
- width: 120,
- },
- {
- surface: "14",
- label: "fNowCarton",
- name: "现箱号",
- checked: 0,
- width: 120,
- },
- {
- surface: "14",
- label: "remark",
- name: "备注",
- checked: 0,
- width: 100,
- },
- ],
- // 库位的地址
- stockaddr: '',
- balance: 0,
- //自定义列宽
- allCheck: false,
- drag: false,
- }
- },
- created() {
- this.setRowList = this.tableDate;
- this.getRowList = this.tableDate;
- listCorps({type: 1}).then((response) => {
- this.fMblnoOptions = response.rows;
- });
- listWarehousesss({fStatus: 0, delFlag: 0}).then((response) => {
- this.warehouseOptions = response.rows;
- });
- listGoods({fStatus: 0, delFlag: 0}).then((response) => {
- this.goodsOptions = response.rows;
- });
- listFees({fDc: "D"}).then((response) => {
- this.fDNameOptions = response.rows;
- });
- this.getDicts("storage_type").then((response) => {
- this.fStorageTypeOptions = response.data;
- localStorage.setItem("fStorageTypeList", JSON.stringify(response.data));
- });
- this.getDicts("data_unitfees").then((response) => {
- this.fFeetUnitOptions = response.data;
- });
- this.getRow()
- },
- filters: {
- fBsdateFormat(row) {
- if (row) {
- const dateMat = new Date(row);
- const year = dateMat.getFullYear();
- const month = dateMat.getMonth() + 1;
- const day = dateMat.getDate();
- const timeFormat = year + "-" + month + "-" + day;
- return timeFormat;
- }
- },
- },
- methods: {
- // 打开
- init() {
- this.queryUser();
- this.company = Cookies.get("companyName")
- this.visible = true;
- },
- // 关闭弹窗
- closeDialog() {
- this.visible = false;
- this.form = {}
- this.detailList = []
- this.$refs.form.clearValidate();
- this.$emit("closeDialog")
- },
- //获取登陆人
- queryUser() {
- queryUserVal().then((response) => {
- if (response.user !== null) {
- this.userVal = response.user;
- this.$set(this.form, "fDeptid", this.userVal.deptId);
- this.$set(this.form, "createBy", this.userVal.userName);
- this.$set(this.form, "fStorekeeper", this.userVal.nickName);
- this.$set(this.form, "fIfdamage", "1");
- this.$set(this.form, "fIfweigh", "1");
- this.$set(this.form, "fTrademodeid", "1");
- this.$set(this.form, "createTime", Date.parse(new Date()));
- this.$set(this.form, "fBstime", Date.parse(new Date()));
- this.$set(this.form, "fFeetUnit", "2");
- this.$set(this.form, "fFeetunit", 2);
- this.$set(this.form, "fBusinessType", "5");
- }
- if (response.dept !== null) {
- this.deptOptions = [];
- this.deptOptions.push(response.dept);
- }
- });
- },
- handleSelection(list) {
- this.selection = list
- },
- // 打开打印窗口
- openPrint() {
- this.balance = 0;
- for (let item in this.detailList) {
- for (let item in this.detailList) {
- if (!this.detailList[item].fId) {
- return this.$message.error('数据未保存,请先暂存')
- }
- }
- // if (!this.detailList[item].fCntrno) {
- // return this.$message.error('第' + (Number(item) + 1) + '行箱号不能为空')
- // }
- if (this.detailList[item].fPlanqty < this.detailList[item].fQty) {
- return this.$message.error("第" + (Number(item) + 1) + "行出库件数超出结余件数!");
- }
- this.balance = this.detailList[item].fPlanqty
- console.log(this.detailList[item])
- for (let item1 in this.detailList) {
- if (this.detailList[item].fSrcid == this.detailList[item1].fSrcid) {
- this.balance = Number(this.balance) - Number(this.detailList[item].fQty)
- if (this.balance < 0) {
- return this.$message.error("第" + (Number(item1) + 1) + "行出库件数超出结余件数!");
- }
- }
- }
- }
- this.warehouseOptions.map((e) => {
- if (e.fId == this.form.fWarehouseid) {
- this.stockaddr = e.fAddr;
- }
- });
- this.allfQty = 0;
- this.detailList.forEach(item => {
- this.allfQty += Number(item.fQty)
- })
- this.printVisible = true;
- },
- handleConfirm() {
- this.$refs["form"].validate(vaild => {
- if (vaild) {
- if (!this.form.fTruckno) return this.$message.error('车号不能为空')
- for (let item in this.detailList) {
- if (!this.detailList[item].fId) {
- return this.$message.error('数据未保存,请先暂存')
- }
- }
- let fPlanqty = 0;
- let fPlannetweight = 0;
- let fPlangrossweight = 0;
- this.detailList.forEach(item => {
- this.$set(item, 'fBsdate', this.form.fBsdate)
- this.$set(item, 'fOriginalbillno', item.fMblno)
- this.$set(item, 'fIsPass', 'T')
- this.$set(item, 'fStltypeid', '1')
- this.$set(item, 'fTruckno', this.form.fTruckno)
- fPlanqty += Number(item.fQty)
- fPlannetweight += Number(item.fNetweight)
- fPlangrossweight += Number(item.fGrossweight)
- delete item.deleteId
- })
- this.$set(this.form, 'fStltypeid', '1')
- this.$set(this.form, 'fPlanqty', fPlanqty)
- this.$set(this.form, 'fPlannetweight', fPlannetweight)
- this.$set(this.form, 'fPlangrossweight', fPlangrossweight)
- this.$set(this.form, 'fQty', fPlanqty)
- this.$set(this.form, 'fNetweight', fPlannetweight)
- this.$set(this.form, 'fGrossweight', fPlangrossweight)
- this.$set(this.form, 'fChargedate', this.form.fBsdate)
- let fProductName = []
- this.detailList.map((e) => {
- this.goodsOptions.map((item) => {
- if (e.fGoodsid == item.fId) {
- fProductName.push(item.fName);
- }
- });
- });
- fProductName = [...new Set(fProductName)];
- // this.form.fProductName = fProductName.join(",");
- this.$set(this.form, 'fProductName', fProductName.join(","))
- let fMarks = []
- this.detailList.map((e) => {
- fMarks.push(e.fMarks);
- });
- fMarks = [...new Set(fMarks)];
- // this.form.fMarks = fMarks.join(",");
- this.$set(this.form, 'fMarks', fMarks.join(","))
- let data = {warehousebillsitemsList: this.detailList,warehousebillsfeesList: this.DrList}
- data = Object.assign({}, data, this.form)
- this.loading = true
- fastOutStock(data).then(res => {
- this.$message.success('出库成功')
- this.closeDialog()
- this.loading = false
- })
- }
- })
- },
- // 暂存
- handleSave() {
- if (!this.form.fTruckno) return this.$message.error('车号不能为空')
- let fPlanqty = 0;
- let fPlannetweight = 0;
- let fPlangrossweight = 0;
- this.detailList.forEach(item => {
- this.$set(item, 'fBsdate', this.form.fBsdate)
- this.$set(item, 'fOriginalbillno', item.fMblno)
- this.$set(item, 'fIsPass', 'T')
- this.$set(item, 'fStltypeid', '1')
- this.$set(item, 'fTruckno', this.form.fTruckno)
- fPlanqty += Number(item.fQty)
- fPlannetweight += Number(item.fNetweight)
- fPlangrossweight += Number(item.fGrossweight)
- delete item.deleteId
- })
- this.$set(this.form, 'fStltypeid', '1')
- this.$set(this.form, 'fPlanqty', fPlanqty)
- this.$set(this.form, 'fPlannetweight', fPlannetweight)
- this.$set(this.form, 'fPlangrossweight', fPlangrossweight)
- this.$set(this.form, 'fQty', fPlanqty)
- this.$set(this.form, 'fNetweight', fPlannetweight)
- this.$set(this.form, 'fGrossweight', fPlangrossweight)
- this.$set(this.form, 'fChargedate', this.form.fBsdate)
- let fProductName = []
- this.detailList.map((e) => {
- this.goodsOptions.map((item) => {
- if (e.fGoodsid == item.fId) {
- fProductName.push(item.fName);
- }
- });
- });
- fProductName = [...new Set(fProductName)];
- this.$set(this.form, 'fProductName', fProductName.join(","))
- let fMarks = []
- this.detailList.map((e) => {
- fMarks.push(e.fMarks);
- });
- fMarks = [...new Set(fMarks)];
- this.$set(this.form, 'fMarks', fMarks.join(","))
- this.DrList.forEach(item => {
- this.$set(item, 'fFeeunitid', Number(item.fFeeUnitid))
- })
- let data = {warehousebillsitemsList: this.detailList,warehousebillsfeesList: this.DrList}
- data = Object.assign({}, data, this.form)
- this.loading = true
- saveOutstock(data).then(res => {
- this.form = res.data
- this.detailList = res.data.warehousebillsitemsList
- this.DrList = res.data.warehousebillsfeesList
- delete this.form.warehousebillsitemsList
- delete this.form.warehousebillsfeesList
- this.form.fBsdate = this.form.bsDate
- this.form.fBstime = this.form.bsTime
- this.detailList.forEach(item => {
- item.fBusinessType = String(item.fBusinessType)
- })
- this.$message.success('暂存成功')
- this.loading = false
- })
- },
- addList() {
- this.$refs["form"].validate(valid => {
- if (valid) {
- this.getDetailsList()
- }
- })
- },
- // 查询库存总账
- getDetailsList() {
- // this.detailList = []
- this.disabled = true
- let queryParams = {
- fMblno: this.form.fMblno,
- fCorpid: this.form.fCorpid,
- fWarehouseid: this.form.fWarehouseid,
- fTrademodeid: this.form.fTrademodeid
- }
- listWhgenleg(queryParams).then((response) => {
- response.rows.map((e) => {
- e.fQtyblc2 = e.fQtyblc;
- e.fGrossweightblc2 = e.fGrossweightblc;
- e.fNetweightblc2 = e.fNetweightblc;
- });
- // this.detailList = response.rows;
- let arr = [];
- response.rows.map(e => {
- let index = this.detailList.findIndex(item => {
- return item.fSrcid === e.fId
- })
- if (index == -1) {
- arr.push({
- fId: null,
- fBsdate: this.form.fBsdate,
- fMblno: e.fMblno,
- fGoodsid: e.fGoodsid,
- fCntrtype: null,
- fPlanqty: e.fQtyblc,
- fPlannetweight: e.fNetweightblc,
- fPlangrossweight: e.fGrossweightblc,
- fWarehouseLocationids: e.fWarehouseLocationids,
- fGoodsids: e.fGoodsids,
- fBillingway: e.fBillingway,
- fChargedate: e.fChargedate,
- fMarks: e.fMarks,
- fOriginalbilldate: e.fOriginalbilldate,
- fOriginalbillno: e.fOriginalbillno,
- fPackagespecs: e.fPackagespecs,
- fGrossweight: e.fGrossweightblc2,
- fNetweight: e.fNetweightblc2,
- fQty: e.fQtyblc2,
- fCntqty: 1,
- fBillstatus: 10,
- fWarehouselocid: e.fWarehouseLocationid,
- fWarehouselocids: e.fWarehouseLocationids,
- fCntrno: e.fCntrno,
- fGoodsval: null,
- fTruckno: response.rows.fTruckno,
- remark: null,
- fIsPass: "T",
- fDriverName: response.rows.fDriverName,
- fDriverTel: response.rows.fDriverTel,
- fDriverIdCar: response.rows.fDriverIdCar,
- fBusinessType: e.fBusinessType ? e.fBusinessType.toString() : null,
- fWarehouseInformation: e.fWarehouseids,
- fSrcid: e.fId,
- fSrcBsdate: e.fBsdate,
- deleteId: e.fId,
- })
- }
- })
- this.detailList = this.detailList.concat(arr)
- console.log(this.detailList)
- this.disabled = false
- });
- },
- // 新增应收明细
- addDrList() {
- this.$refs["form"].validate((valid) => {
- if (valid) {
- this.DrList.push({
- fCorpid: this.form.fCorpid,
- fMblno: this.form.fMblno,
- fFeeid: null,
- fFeeUnitid: null,
- fQty: null,
- fUnitprice: null,
- fAmount: null,
- fProductName: this.form.fProductName,
- fMarks: this.form.fMarks,
- fCurrency: "RMB",
- fExrate: "1",
- fTaxrate: null,
- fCxrate: null,
- fRate: null,
- fStltypeid: '1',
- fSrcTypeId: 0,
- fBusinessType: '0',
- remarks: null,
- fDc: 'D',
- })
- }
- })
- },
- changeFeeUnit() {},
- // 修改毛重净重
- changeOutStock(row) {
- this.$refs['detailTable'].clearSelection()
- let fNetweight = 0;
- let fGrossweight = 0;
- if (row.fNetweight) {
- fNetweight = row.fNetweight;
- }
- if (row.fGrossweight) {
- fGrossweight = row.fGrossweight;
- }
- if (row.fPlannetweight < fNetweight) {
- this.$message({message: "出库净重超出结余净重", type: "warning"});
- return false;
- }
- if (row.fPlangrossweight < fGrossweight) {
- this.$message({message: "出库毛重超出结余毛重", type: "warning"});
- return false;
- }
- },
- // 出库件数的计算
- qtyChange(row) {
- if (row.fPlanqty < row.fQty) {
- this.$message.error("出库件数超出结余件数!");
- this.$set(row, "fQty", 0);
- this.$set(row, "fNetweight", 0);
- this.$set(row, "fGrossweight", 0);
- return false;
- }
- if (row.fQtyblc2 > row.fQtyblc) {
- this.$message.error("出库件数超出结余件数!");
- this.$set(row, "fQtyblc2", 0);
- this.$set(row, "fGrossweightblc2", 0);
- this.$set(row, "fNetweightblc2", 0);
- return false;
- }
- this.$set(
- row,
- "fNetweight",
- parseFloat(
- (Number(row.fPlannetweight) / Number(row.fPlanqty)) * Number(row.fQty)
- ).toFixed(2)
- );
- this.$set(
- row,
- "fGrossweight",
- parseFloat(
- (Number(row.fPlangrossweight) / Number(row.fPlanqty)) *
- Number(row.fQty)
- ).toFixed(2)
- );
- this.$set(
- row,
- "fNetweightblc2",
- parseFloat(
- (Number(row.fNetweightblc) / Number(row.fQtyblc)) *
- Number(row.fQtyblc2)
- ).toFixed(2)
- );
- this.$set(
- row,
- "fGrossweightblc2",
- parseFloat(
- (Number(row.fGrossweightblc) / Number(row.fQtyblc)) *
- Number(row.fQtyblc2)
- ).toFixed(2)
- );
- },
- // 明细删除
- wDeleteRow(index, rows) {
- rows.splice(index, 1);
- },
- // 批量删除
- batchDelete() {
- this.$confirm('是否确认删除选中数据', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- this.selection.forEach(item => {
- console.log(item.deleteId)
- let index = this.detailList.findIndex(item1 => {
- return item1.deleteId == item.deleteId
- })
- this.detailList.splice(index, 1)
- })
- this.$message({
- type: 'success',
- message: '删除成功!'
- });
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消删除'
- });
- });
- },
- changeMblno() {
- if (this.detailList.length == 0) {
- this.$set(this.form, "fCorpid", '')
- this.$set(this.form, "fWarehouseid", '')
- this.$set(this.form, "fGoodsid", '')
- if (this.form.fMblno) {
- let data = {
- type: 'mblno',
- fMblno: this.form.fMblno
- }
- changeSelect(data).then(res => {
- this.fMblnoOptions = res.data.corpsList
- this.warehouseOptions = res.data.warehouseList
- this.goodsOptions = res.data.whgenlegVOList
- if (this.fMblnoOptions.length > 0) {
- this.form.fCorpid = this.fMblnoOptions[0].fId
- let data1 = {
- type: 'corp',
- fMblno: this.form.fMblno,
- corpId: this.form.fCorpid
- }
- changeSelect(data1).then(res => {
- this.warehouseOptions = res.data.warehouseList
- this.goodsOptions = res.data.whgenlegVOList
- if (this.warehouseOptions.length > 0) {
- this.form.fWarehouseid = this.warehouseOptions[0].fId
- let data2 = {
- type: 'warehouse',
- fMblno: this.form.fMblno,
- corpId: this.form.fCorpid,
- warehouseId: this.form.fWarehouseid
- }
- changeSelect(data2).then(res => {
- this.goodsOptions = res.data.goodsVOList
- if (this.goodsOptions.length > 0) {
- this.form.fGoodsid = this.goodsOptions[0].fId
- }
- })
- }
- })
- }
- })
- } else {
- listCorps({type: 1}).then((response) => {
- this.fMblnoOptions = response.rows
- })
- listWarehousesss({fStatus: 0, delFlag: 0}).then((response) => {
- this.warehouseOptions = response.rows;
- })
- listGoods({fStatus: 0, delFlag: 0}).then((response) => {
- this.goodsOptions = response.rows;
- });
- }
- }
- },
- changeCorp() {
- if (this.form.fMblno && this.form.fCorpid) {
- this.$set(this.form, "fWarehouseid", '')
- this.$set(this.form, "fGoodsid", '')
- let data = {
- type: 'corp',
- fMblno: this.form.fMblno,
- corpId: this.form.fCorpid
- }
- changeSelect(data).then(res => {
- this.warehouseOptions = res.data.warehouseList
- this.goodsOptions = res.data.whgenlegVOList
- if (this.warehouseOptions.length > 0) {
- this.form.fWarehouseid = this.warehouseOptions[0].fId
- let data1 = {
- type: 'warehouse',
- fMblno: this.form.fMblno,
- corpId: this.form.fCorpid,
- warehouseId: this.form.fWarehouseid
- }
- changeSelect(data1).then(res => {
- this.goodsOptions = res.data.goodsVOList
- if (this.goodsOptions.length > 0) {
- this.form.fGoodsid = this.goodsOptions[0].fId
- }
- })
- }
- })
- } else if (this.form.fMblno && !this.form.fCorpid) {
- this.$set(this.form, "fWarehouseid", '')
- this.$set(this.form, "fGoodsid", '')
- this.warehouseOptions = []
- this.goodsOptions = []
- }
- },
- changefWarehouseid() {
- if (this.form.fMblno && this.form.fCorpid && this.form.fWarehouseid) {
- this.$set(this.form, "fGoodsid", '')
- let data = {
- type: 'warehouse',
- fMblno: this.form.fMblno,
- corpId: this.form.fCorpid,
- warehouseId: this.form.fWarehouseid
- }
- changeSelect(data).then(res => {
- this.goodsOptions = res.data.goodsVOList
- if (this.goodsOptions.length > 0) {
- this.form.fGoodsid = this.goodsOptions[0].fId
- }
- })
- } else if (this.form.fMblno && !this.form.fWarehouseid) {
- this.$set(this.form, "fGoodsid", '')
- this.goodsOptions = []
- }
- treeselect(this.form.fWarehouseid).then((response) => {
- this.fWarehouseidOptions = response.data;
- });
- },
- goodsChange(data) {
- },
- addprint(status) {
- const style =
- "@page { } " +
- "@media print { .print-div{ padding:8px;background-color:#cccccc;} .print-title{display:flex;justify-content: center;font-size:24px} .print_form{font-size:12px} .print_table table {border-right: 1px solid #000;border-bottom: 1px solid #000;font-size:12px} .print_table table td {border-left: 1px solid #000;border-top: 1px solid #000;padding:2px;vertical-align:middle;text-align: center;}";
- if (status == 'ckd') {
- print({
- printable: "print_ckd",
- type: "html",
- style: style, // 亦可使用引入的外部css;
- scanStyles: false,
- });
- }
- },
- // 合计
- getSummaries(param) {
- const {columns, data} = param;
- const sums = [];
- var values = [];
- columns.forEach((column, index) => {
- if (index === 0) {
- sums[index] = "";
- return;
- }
- if (column.property === "fGrossweight") {
- values = data.map((item) => Number(item["fGrossweight"]));
- }
- if (column.property === "fNetweight") {
- values = data.map((item) => Number(item["fNetweight"]));
- }
- if (column.property === "fQty") {
- values = data.map((item) => Number(item["fQty"]));
- }
- if (column.property === "fCntqty") {
- values = data.map((item) => Number(item["fCntqty"]));
- }
- if (
- column.property === "fGrossweight" ||
- column.property === "fNetweight" ||
- column.property === "fQty" ||
- column.property === "fCntqty"
- ) {
- sums[index] = values.reduce((prev, curr) => {
- const value = Number(curr);
- if (!isNaN(value)) {
- if (column.property === "fGrossweight") {
- this.fGrossweight = prev + curr;
- }
- if (column.property === "fNetweight") {
- this.fNetweight = prev + curr;
- }
- if (column.property === "fQty") {
- this.fQty = prev + curr;
- this.sumMum = prev + curr;
- }
- if (column.property === "fCntqty") {
- this.fCntqty = prev + curr;
- }
- return prev + curr;
- } else {
- return prev;
- }
- }, 0);
- if (column.property === "fGrossweight") {
- sums[index] = (sums[index] / 1000).toFixed(4) + "吨";
- } else if (column.property === "fNetweight") {
- sums[index] = (sums[index] / 1000).toFixed(4) + "吨";
- } else {
- // sums[index] = sums[index].toFixed(2);
- sums[index] = sums[index]
- }
- }
- });
- this.sums = sums;
- return sums;
- },
- // 数量计算
- changeContractAmt(row) {
- let fQty = 0;
- let fUnitprice = 0;
- if (row.fUnitprice) {
- fUnitprice = row.fUnitprice;
- }
- if (row.fQty) {
- fQty = row.fQty;
- }
- this.$set(row, "fAmount", Number(fUnitprice) * Number(fQty)).toFixed(2);
- },
- // 收费明细删除
- deleteDrRow(index, rows) {
- rows.splice(index, 1);
- },
- // 费用明细请核
- listCheck(row) {
- feesCheck(row.fId).then(res => {
- this.$message.success('请核成功')
- res.data.fFeeUnitid = res.data.fFeeunitid.toString();
- if (res.data.fDc == 'D') {
- let index = this.DrList.findIndex(item => item.fId == res.data.fId)
- this.DrList.splice(index, 1, res.data)
- } else {
- // let index = this.warehouseCrList.findIndex(item => item.fId == res.data.fId)
- // this.warehouseCrList.splice(index, 1, res.data)
- }
- })
- },
- // 费用明细撤销请核
- revokeListCheck(row) {
- revokefeeCheck(row.fId).then(res => {
- res.data.fFeeUnitid = res.data.fFeeunitid.toString();
- this.$message.success('操作成功')
- if (res.data.fDc == 'D') {
- let index = this.DrList.findIndex(item => item.fId == res.data.fId)
- this.DrList.splice(index, 1, res.data)
- } else {
- // let index = this.warehouseCrList.findIndex(item => item.fId == res.data.fId)
- // this.warehouseCrList.splice(index, 1, res.data)
- }
- })
- },
- //列设置全选
- allChecked() {
- if (this.allCheck == true) {
- this.setRowList.map((e) => {
- return (e.checked = 0);
- });
- } else {
- this.setRowList.map((e) => {
- return (e.checked = 1);
- });
- }
- },
- //开始拖拽事件
- onStart() {
- this.drag = true;
- },
- //拖拽结束事件
- onEnd() {
- this.drag = false;
- },
- //重置列表
- delRow() {
- this.data = {
- tableName: "快速出库明细",
- userId: Cookies.get("userName"),
- };
- resetModule(this.data).then((res) => {
- if (res.code == 200) {
- this.showSetting = false;
- this.setRowList = this.tableDate;
- console.log(this.setRowList)
- this.getRowList = this.tableDate;
- }
- });
- },
- //保存列设置
- save() {
- this.showSetting = false;
- this.data = {
- tableName: "快速出库明细",
- userId: Cookies.get("userName"),
- sysTableSetList: this.setRowList,
- };
- addSet(this.data).then((res) => {
- this.getRowList = this.setRowList.filter((e) => e.checked == 0);
- });
- },
- //查询列数据
- getRow() {
- let that = this;
- this.data = {
- tableName: "快速出库明细",
- userId: Cookies.get("userName"),
- };
- select(this.data).then((res) => {
- if (res.data.length != 0) {
- this.getRowList = res.data.filter((e) => e.checked == 0);
- this.setRowList = res.data;
- this.setRowList = this.setRowList.reduce((res, item) => {
- res.push({
- surface: item.surface,
- label: item.label,
- name: item.name,
- checked: item.checked,
- width: item.width,
- fixed: item.fixed,
- });
- return res;
- }, []);
- }
- });
- },
- },
- }
- </script>
- <style scoped lang="scss">
- .print-div {
- color: #000;
- }
- .print_table {
- table {
- border-right: 1px solid #000;
- border-bottom: 1px solid #000;
- font-size: 12px;
- margin-bottom: 5px;
- }
- table td {
- border-left: 1px solid #000;
- border-top: 1px solid #000;
- vertical-align: middle;
- padding: 2px;
- text-align: center;
- }
- }
- .print_form {
- font-size: 12px;
- }
- /deep/ .el-tabs .el-tabs__content {
- overflow-x: visible !important;
- }
- </style>
|