123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194 |
- <template>
- <div class="app-container">
- <div v-show="!isShowPrint">
- <!-- 筛选条件 -->
- <div class="screen-container">
- <el-form
- ref="screenForm"
- :model="screenForm"
- label-width="120px"
- size="mini"
- label-position="left"
- >
- <el-row :gutter="20">
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="产品名称" prop="goodsName">
- <el-input
- v-model="screenForm.goodsName"
- placeholder="请输入产品名称"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="物料编码" prop="goodsCode">
- <el-input
- v-model="screenForm.goodsCode"
- placeholder="请输入物料编码"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="产品编码" prop="goodsOldCode">
- <el-input
- v-model="screenForm.goodsOldCode"
- placeholder="请输入产品编码"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="规格型号" prop="model">
- <el-input
- v-model="screenForm.model"
- placeholder="请输入规格型号"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="制单日期" prop="createDate">
- <el-date-picker
- v-model="screenForm.createDate"
- type="datetimerange"
- range-separator="至"
- style="width: 100%"
- value-format="yyyy-MM-dd HH:mm:ss"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- >
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="发货日期" prop="deliverDate">
- <el-date-picker
- v-model="screenForm.deliverDate"
- type="datetimerange"
- range-separator="至"
- style="width: 100%"
- value-format="yyyy-MM-dd HH:mm:ss"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- >
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="经销商编号" prop="jxsNum">
- <el-input
- v-model="screenForm.jxsNum"
- placeholder="请输入经销商编号"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="经销商名称" prop="jxsName">
- <el-input
- v-model="screenForm.jxsName"
- placeholder="请输入经销商名称"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="发货单号" prop="orderNum">
- <el-input
- v-model="screenForm.orderNum"
- placeholder="请输入发货单号"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="订单" prop="mainOrderId">
- <el-input
- v-model="screenForm.mainOrderId"
- placeholder="请输入订单"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="存货类别" prop="type">
- <el-select
- v-model="screenForm.type"
- placeholder="选择存货类别"
- style="width: 100%"
- clearable
- >
- <el-option
- v-for="item in categoryList"
- :key="item.name"
- :label="item.name"
- :value="item.name"
- >
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="仓库" prop="correspondId">
- <el-select
- v-model="screenForm.correspondId"
- multiple
- style="width: 100%"
- placeholder="请选择仓库"
- size="mini"
- filterable
- clearable
- >
- <el-option
- v-for="(item, index) in warehouseList"
- :key="index"
- :label="item.name"
- :value="item.id"
- />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="表头业务员" prop="k3ServiceId">
- <el-select
- v-model="screenForm.k3ServiceId"
- placeholder="选择表头业务员"
- clearable
- filterable
- style="width: 100%"
- >
- <el-option
- v-for="item in salesmanList"
- :key="item.adminUserId"
- :label="item.nickName"
- :value="item.adminUserId"
- >
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="表体业务员" prop="salesMan">
- <el-select
- v-model="screenForm.salesMan"
- placeholder="选择表体业务员"
- clearable
- filterable
- style="width: 100%"
- >
- <el-option
- v-for="item in salesmanList"
- :key="item.adminUserId"
- :label="item.nickName"
- :value="item.adminUserId"
- >
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="审核时间" prop="approvaTime">
- <el-date-picker
- v-model="screenForm.approvaTime"
- type="datetimerange"
- range-separator="至"
- style="width: 100%"
- value-format="yyyy-MM-dd HH:mm:ss"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- >
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="24" :lg="6" class="tr">
- <el-form-item label="">
- <el-button @click="resetScreenForm">清空</el-button>
- <el-button type="primary" @click="submitScreenForm"
- >搜索</el-button
- >
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- </div>
- <div class="mymain-container">
- <div class="btn-group clearfix">
- <div class="fl">
- <el-button
- type="primary"
- size="mini"
- @click="toPrint"
- :disabled="tableSelection.length < 1"
- >打印发货单
- </el-button>
- <div class="num" v-if="totalNum">
- 当前列表总发货数量:{{ totalNum }}
- </div>
- </div>
- <!-- -->
- <div class="fr" style="display: flex">
- <el-button
- size="mini"
- type="primary"
- v-if="$checkBtnRole('refund', $route.meta.roles)"
- style="margin-right: 10px"
- icon="el-icon-plus"
- @click="$router.push('/supply/deliver/apply_list?isShow=true')"
- >零售退货申请</el-button
- >
- <el-button
- size="mini"
- type="primary"
- v-if="$checkBtnRole('refund', $route.meta.roles)"
- style="margin-right: 10px"
- icon="el-icon-plus"
- @click="$router.push('/supply/deliver/engin_list?isShow=true')"
- >工程退货申请</el-button
- >
- <ExportButton
- :exUrl="'invoice/exportInvoice'"
- :exParams="exParams"
- />
- </div>
- </div>
- <div class="table">
- <el-table
- ref="table"
- v-loading="listLoading"
- :data="dataList"
- element-loading-text="Loading"
- border
- fit
- highlight-current-row
- stripe
- @select="handleSelect"
- @select-all="handleSelectAll"
- show-summary
- :summary-method="$getSummaries"
- max-height="500"
- >
- <el-table-column
- align="center"
- type="selection"
- width="55"
- ></el-table-column>
- <el-table-column
- align="right"
- label="打印次数"
- sortable
- prop="printNum"
- min-width="100"
- show-overflow-tooltip
- >
- </el-table-column>
- <el-table-column
- align="left"
- label="订单类型"
- sortable
- prop="orderType"
- min-width="100"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- {{ scope.row.orderType | orderTypeFilter }}
- </template>
- </el-table-column>
- <el-table-column
- align="left"
- label="审核日期"
- sortable
- prop="approvalTime"
- min-width="160"
- show-overflow-tooltip
- >
- </el-table-column>
- <el-table-column
- align="left"
- label="发货日期"
- sortable
- prop="orderTime"
- min-width="160"
- show-overflow-tooltip
- >
- </el-table-column>
- <el-table-column
- align="left"
- label="订单日期"
- sortable
- prop="theTime"
- min-width="160"
- show-overflow-tooltip
- >
- </el-table-column>
- <el-table-column
- align="left"
- label="发货单号"
- sortable
- prop="id"
- min-width="130"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <CopyButton :copyText="scope.row.id" />
- <span>{{ scope.row.id }}</span>
- </template>
- </el-table-column>
- <el-table-column
- align="left"
- label="订单号"
- sortable
- prop="orderId"
- min-width="140"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <CopyButton
- :copyText="
- scope.row.enginOrderType == 'HOME' ||
- scope.row.enginOrderType == 'TRADE'
- ? scope.row.enginOrderNo
- : scope.row.mainOrderId
- "
- />
- <span>{{
- scope.row.enginOrderType == "HOME" ||
- scope.row.enginOrderType == "TRADE"
- ? scope.row.enginOrderNo
- : scope.row.mainOrderId
- }}</span>
- </template>
- </el-table-column>
- <el-table-column
- align="left"
- label="经销商编码"
- sortable
- prop="customerNumber"
- min-width="120"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <CopyButton :copyText="scope.row.customerNumber" />
- <span>{{ scope.row.customerNumber }}</span>
- </template>
- </el-table-column>
- <el-table-column
- align="left"
- label="经销商名称"
- sortable
- prop="customerName"
- min-width="250"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <CopyButton :copyText="scope.row.customerName" />
- <span>{{ scope.row.customerName }}</span>
- </template>
- </el-table-column>
- <el-table-column
- align="left"
- label="销售类型"
- sortable
- prop="saleTypeName"
- min-width="100"
- show-overflow-tooltip
- >
- </el-table-column>
- <el-table-column
- align="left"
- label="物料编码"
- sortable
- prop="materialCode"
- min-width="120"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <CopyButton :copyText="scope.row.materialCode" />
- <span>{{ scope.row.materialCode }}</span>
- </template>
- </el-table-column>
- <el-table-column
- align="left"
- label="产品编码"
- sortable
- prop="materialOldNumber"
- min-width="140"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <CopyButton :copyText="scope.row.materialOldNumber" />
- <span>{{ scope.row.materialOldNumber }}</span>
- </template>
- </el-table-column>
- <el-table-column
- align="left"
- label="产品名称"
- sortable
- prop="materialName"
- min-width="160"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <CopyButton :copyText="scope.row.materialName" />
- <span>{{ scope.row.materialName }}</span>
- </template>
- </el-table-column>
- <el-table-column
- align="left"
- label="规格型号"
- sortable
- prop="specification"
- min-width="350"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- <CopyButton :copyText="scope.row.specification" />
- <span>{{ scope.row.specification }}</span>
- </template>
- </el-table-column>
- <el-table-column
- align="left"
- label="仓库"
- sortable
- prop="correspondName"
- min-width="100"
- show-overflow-tooltip
- >
- </el-table-column>
- <el-table-column
- align="right"
- label="未出库数量"
- sortable
- prop="compute_wckNum"
- min-width="120"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- {{
- comRefundableQty(
- scope.row.type,
- scope.row.salesExamineStatus,
- scope.row
- )
- }}
- </template>
- </el-table-column>
- <el-table-column
- align="right"
- label="发货数量"
- sortable
- prop="refundableQty"
- min-width="120"
- show-overflow-tooltip
- >
- </el-table-column>
- <el-table-column
- align="right"
- label="发货金额"
- sortable
- prop="payAmount"
- min-width="100"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- {{ scope.row.payAmount | numToFixed }}
- </template>
- </el-table-column>
- <el-table-column
- align="right"
- label="发货返利金额"
- sortable
- prop="payRebateAmount"
- min-width="130"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- {{ scope.row.payRebateAmount | numToFixed }}
- </template>
- </el-table-column>
- <el-table-column
- align="right"
- label="发货折扣金额"
- sortable
- prop="totalDiscAmount"
- min-width="130"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- {{ scope.row.totalDiscAmount | numToFixed }}
- </template>
- </el-table-column>
- <el-table-column
- align="right"
- label="折扣额合计"
- sortable
- prop="compute_zkeAmount"
- min-width="120"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- {{
- (scope.row.totalDiscAmount + scope.row.payRebateAmount)
- | numToFixed
- }}
- </template>
- </el-table-column>
- <el-table-column
- align="right"
- label="含税单价"
- sortable
- prop="singlePayPrice"
- min-width="100"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- {{ scope.row.singlePayPrice | numToFixed }}
- </template>
- </el-table-column>
- <el-table-column
- align="right"
- label="含税总额"
- sortable
- prop="payAmount"
- min-width="100"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- {{ scope.row.payAmount | numToFixed }}
- </template>
- </el-table-column>
- <el-table-column
- align="left"
- label="表头业务员"
- sortable
- prop="k3ServiceName"
- min-width="120"
- show-overflow-tooltip
- >
- </el-table-column>
- <el-table-column
- align="left"
- label="表体业务员"
- sortable
- prop="serviceName"
- min-width="120"
- show-overflow-tooltip
- >
- </el-table-column>
- <el-table-column
- align="left"
- label="政策单号"
- sortable
- prop="policyCode"
- min-width="100"
- show-overflow-tooltip
- >
- </el-table-column>
- <el-table-column
- align="left"
- label="政策名称"
- sortable
- prop="policyTitle"
- min-width="100"
- show-overflow-tooltip
- >
- </el-table-column>
- <el-table-column
- align="left"
- label="区域"
- sortable
- prop="adminArea"
- min-width="100"
- show-overflow-tooltip
- >
- </el-table-column>
- <el-table-column
- align="left"
- label="业务区域"
- sortable
- prop="serviceArea"
- min-width="100"
- show-overflow-tooltip
- >
- </el-table-column>
- <el-table-column
- align="left"
- label="月份"
- sortable
- prop="month"
- min-width="100"
- show-overflow-tooltip
- >
- </el-table-column>
- <el-table-column
- align="left"
- label="项目编码"
- sortable
- prop="refEnginRecordNo"
- min-width="160"
- show-overflow-tooltip
- >
- </el-table-column>
- <el-table-column
- align="left"
- label="项目名称"
- sortable
- prop="refProjectName"
- min-width="160"
- show-overflow-tooltip
- >
- </el-table-column>
- <el-table-column
- align="left"
- label="存货类别"
- sortable
- prop="categoryName"
- min-width="160"
- show-overflow-tooltip
- >
- </el-table-column>
- <el-table-column
- align="left"
- label="申请发货单备注"
- sortable
- prop="remark"
- min-width="200"
- show-overflow-tooltip
- >
- </el-table-column>
- <el-table-column
- align="left"
- label="表头备注"
- sortable
- prop="headerRemark"
- min-width="200"
- show-overflow-tooltip
- >
- </el-table-column>
- <el-table-column
- align="left"
- label="表体备注"
- sortable
- prop="invoiceRemark"
- min-width="200"
- show-overflow-tooltip
- >
- </el-table-column>
- <el-table-column
- align="left"
- label="打印次数"
- sortable
- prop="printNum"
- min-width="100"
- show-overflow-tooltip
- >
- </el-table-column>
- <el-table-column
- align="left"
- label="经销商现金钱包"
- sortable
- prop="customerWalletName"
- min-width="140"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- align="left"
- label="经销商返利钱包"
- sortable
- prop="customerWalletName2"
- min-width="140"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- align="left"
- label="文件编号"
- sortable
- prop="itemFileNo"
- min-width="100"
- show-overflow-tooltip
- >
- </el-table-column>
- <el-table-column
- align="left"
- label="预约提货打印状态"
- sortable
- prop="printStatus"
- min-width="150"
- show-overflow-tooltip
- >
- <template slot-scope="scope">
- {{ scope.row.printStatus == 1 ? `打印` : ` 未打印` }}
- </template>
- </el-table-column>
- <el-table-column
- align="left"
- label="二级经销商代码"
- sortable
- prop="secondCustomerNumber"
- min-width="150"
- show-overflow-tooltip
- >
- </el-table-column>
- </el-table>
- </div>
- </div>
- <div class="pagination clearfix">
- <div class="fr">
- <el-pagination
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :current-page="currentPage"
- :page-sizes="[10, 20, 50, 100, 500, 1000, 2000]"
- :page-size="10"
- layout="total, sizes, prev, pager, next, jumper"
- :total="listTotal"
- >
- </el-pagination>
- </div>
- </div>
- </div>
- <print-preview ref="preView" />
- <el-dialog
- title="密码确认"
- :visible.sync="isShowDialog"
- :show-close="false"
- width="40%"
- :close-on-click-modal="false"
- >
- <el-form
- ref="dialogForm"
- :model="dialogForm"
- :rules="dialogFormRules"
- label-position="right"
- label-width="70px"
- >
- <el-row :gutter="20">
- <el-col :xs="24" :sm="24" :lg="24">
- <el-form-item label="密码" prop="password">
- <el-input
- v-model="dialogForm.password"
- autocomplete="off"
- placeholder="请输入密码"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="12">
- <el-form-item label="操作人" prop="createMan">
- <el-input v-model="dialogForm.createMan" readonly></el-input>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="12" style="height: 51px">
- <el-form-item label="操作日期" prop="createDate">
- <el-date-picker
- v-model="dialogForm.createDate"
- readonly
- type="date"
- value-format="yyyy-MM-dd"
- style="width: 100%"
- placeholder="选择日期"
- >
- </el-date-picker>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="cancelDialogForm">取 消</el-button>
- <el-button type="primary" @click="submitDialogForm">确 定</el-button>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- import { getSumList } from "@/api/supply/deliver";
- import print from "@/mixin/print";
- import { checkPassword, getListInvoiceNumber } from "@/api/supply/pickup";
- import { getCategoryList, getSalesmanList } from "@/api/common";
- import SumPrint from "@/views/supply/deliver/components/sum_print";
- import { getWarehouseList } from "@/api/supply/apply";
- import printPreview from "./components/design/preview.vue";
- export default {
- components: {
- SumPrint,
- printPreview,
- },
- mixins: [print],
- filters: {
- orderTypeFilter(val) {
- const MAP = {
- HOME: "家用单",
- TRADE: "商用单",
- RETAIL: "零售单",
- RETAIL_POLICY: "销售政策单",
- PERMU_HOME: "置换家用单",
- PERMU_TRADE: "置换商用单",
- PERMU_RETAIL: "置换零售单",
- PERMU_RETAIL_POLICY: "置换销售政策单",
- REQUISITION_HOME: "调拨家用单",
- REQUISITION_TRADE: "调拨商用单",
- REQUISITION_RETAIL: "调拨零售单",
- REQUISITION_RETAIL_POLICY: "调拨销售政策单",
- };
- return MAP[val];
- },
- },
- data() {
- return {
- currentPage: 1, // 当前页码
- pageSize: 10, // 每页数量
- listTotal: 0, // 列表总数
- dataList: null, // 列表数据
- listLoading: false, // 列表加载loading
- screenForm: {
- // 筛选表单数据
- goodsName: "",
- goodsCode: "",
- goodsOldCode: "",
- model: "",
- createDate: "",
- deliverDate: "",
- correspondId: [],
- jxsNum: "",
- jxsName: "",
- orderNum: "",
- type: "",
- salesMan: "",
- k3ServiceId: "",
- mainOrderId: "",
- approvaTime: "",
- },
- categoryList: [],
- salesmanList: [],
- tableSelection: [],
- queryItem: {},
- isShowPrint: false,
- totalNum: 0,
- isShowDialog: false,
- dialogForm: {
- password: "",
- createMan: "",
- createDate: "",
- },
- warehouseList: [],
- dialogFormRules: {
- password: [{ required: true, message: "请输入密码", trigger: "blur" }],
- },
- };
- },
- computed: {
- exParams() {
- return {
- materialName: this.screenForm.goodsName,
- materialNumber: this.screenForm.goodsCode,
- materialOldNumber: this.screenForm.goodsOldCode,
- specification: this.screenForm.model,
- createStartTime: this.screenForm.createDate
- ? this.screenForm.createDate[0]
- : "",
- createEndTime: this.screenForm.createDate
- ? this.screenForm.createDate[1]
- : "",
- startTime: this.screenForm.deliverDate
- ? this.screenForm.deliverDate[0]
- : "",
- endTime: this.screenForm.deliverDate
- ? this.screenForm.deliverDate[1]
- : "",
- customerNumber: this.screenForm.jxsNum,
- customerName: this.screenForm.jxsName,
- id: this.screenForm.orderNum,
- categoryName: this.screenForm.type,
- serviceId: this.screenForm.salesMan,
- k3ServiceId: this.screenForm.k3ServiceId,
- mainOrderId: this.screenForm.mainOrderId,
- approvalEndTime: this.screenForm.approvaTime
- ? this.screenForm.approvaTime[1]
- : "",
- approvalStartTime: this.screenForm.approvaTime
- ? this.screenForm.approvaTime[0]
- : "",
- correspondId: this.screenForm.correspondId.join(","),
- };
- },
- comRefundableQty() {
- return (type, status, row) => {
- if (type == 2) {
- return "";
- } else {
- if (status == "OK") {
- return 0;
- } else {
- return row.refundableQty;
- }
- }
- };
- },
- },
- watch: {
- dataList: {
- handler(newValue, oldValue) {
- if (newValue && newValue.length) {
- newValue.forEach((item, index) => {
- this.dataList[index].compute_zkeAmount =
- item.totalDiscAmount + item.payRebateAmount;
- this.dataList[index].compute_wckNum = this.comRefundableQty(
- item.type,
- item.salesExamineStatus,
- item
- );
- });
- }
- },
- immediate: true,
- deep: true,
- },
- },
- created() {
- this.getSalesmanList();
- this.getCategoryList();
- this.getList();
- this.getWarehouseList();
- },
- mounted() {
- this.initPrint();
- },
- methods: {
- // 获取业务员列表
- getSalesmanList() {
- getSalesmanList({
- pageNum: 1,
- pageSize: -1,
- isCustomer: 0,
- status: true,
- }).then((res) => {
- this.salesmanList = res.data.records;
- });
- },
- // 获取存货类别列表
- getCategoryList() {
- getCategoryList({
- pageNum: 1,
- pageSize: -1,
- }).then((res) => {
- this.categoryList = res.data.records;
- });
- },
- // 获取仓库列表
- getWarehouseList() {
- getWarehouseList({
- pageNum: 1,
- pageSize: -1,
- }).then((res) => {
- this.warehouseList = res.data.records;
- });
- },
- // 查询列表
- getList() {
- this.listLoading = true;
- let params = {
- pageNum: this.currentPage,
- pageSize: this.pageSize,
- materialName: this.screenForm.goodsName,
- materialNumber: this.screenForm.goodsCode,
- materialOldNumber: this.screenForm.goodsOldCode,
- specification: this.screenForm.model,
- createStartTime: this.screenForm.createDate
- ? this.screenForm.createDate[0]
- : "",
- createEndTime: this.screenForm.createDate
- ? this.screenForm.createDate[1]
- : "",
- startTime: this.screenForm.deliverDate
- ? this.screenForm.deliverDate[0]
- : "",
- endTime: this.screenForm.deliverDate
- ? this.screenForm.deliverDate[1]
- : "",
- customerNumber: this.screenForm.jxsNum,
- customerName: this.screenForm.jxsName,
- id: this.screenForm.orderNum,
- categoryName: this.screenForm.type,
- serviceId: this.screenForm.salesMan,
- k3ServiceId: this.screenForm.k3ServiceId,
- mainOrderId: this.screenForm.mainOrderId,
- approvalEndTime: this.screenForm.approvaTime
- ? this.screenForm.approvaTime[1]
- : "",
- approvalStartTime: this.screenForm.approvaTime
- ? this.screenForm.approvaTime[0]
- : "",
- correspondId: this.screenForm.correspondId.join(","),
- };
- getSumList(params).then((res) => {
- res.data.records.forEach((item) => {
- item.notOutNumber = item.salesStatus ? 0 : item.refundableQty;
- item.sums1 = ["refundableQty", "compute_wckNum"];
- item.sums2 = [
- "payAmount",
- "payRebateAmount",
- "discAmount",
- "totalDiscAmount",
- "singlePayPrice",
- "compute_zkeAmount",
- ];
- });
- this.dataList = res.data.records;
- this.listTotal = res.data.total;
- this.listLoading = false;
- });
- this.getListInvoiceNumber();
- },
- getListInvoiceNumber() {
- let params = {
- materialName: this.screenForm.goodsName,
- materialNumber: this.screenForm.goodsCode,
- materialOldNumber: this.screenForm.goodsOldCode,
- specification: this.screenForm.model,
- createStartTime: this.screenForm.createDate
- ? this.screenForm.createDate[0]
- : "",
- createEndTime: this.screenForm.createDate
- ? this.screenForm.createDate[1]
- : "",
- startTime: this.screenForm.deliverDate
- ? this.screenForm.deliverDate[0]
- : "",
- endTime: this.screenForm.deliverDate
- ? this.screenForm.deliverDate[1]
- : "",
- customerNumber: this.screenForm.jxsNum,
- customerName: this.screenForm.jxsName,
- id: this.screenForm.orderNum,
- categoryName: this.screenForm.type,
- serviceId: this.screenForm.salesMan,
- k3ServiceId: this.screenForm.k3ServiceId,
- mainOrderId: this.screenForm.mainOrderId,
- approvalEndTime: this.screenForm.approvaTime
- ? this.screenForm.approvaTime[1]
- : "",
- approvalStartTime: this.screenForm.approvaTime
- ? this.screenForm.approvaTime[0]
- : "",
- correspondId: this.screenForm.correspondId.join(","),
- };
- getListInvoiceNumber(params).then((res) => {
- // console.log(res,'ii');
- this.totalNum = res.data;
- });
- },
- // 提交筛选表单
- submitScreenForm() {
- this.currentPage = 1;
- this.getList();
- },
- // 重置筛选表单
- resetScreenForm() {
- this.$refs.screenForm.resetFields();
- this.currentPage = 1;
- this.getList();
- },
- // 更改每页数量
- handleSizeChange(val) {
- this.pageSize = val;
- this.currentPage = 1;
- this.getList();
- },
- // 更改当前页
- handleCurrentChange(val) {
- this.currentPage = val;
- this.getList();
- },
- handleSelect(selection, row) {
- this.$refs.table.toggleRowSelection(row);
- this.dataList.forEach((item) => {
- if (item.id === row.id) {
- this.$refs.table.toggleRowSelection(item);
- }
- });
- this.tableSelection = this.$refs.table.selection;
- },
- handleSelectAll(selection) {
- this.tableSelection = this.$refs.table.selection;
- },
- // 点击打印
- toPrint() {
- this.queryItem = this.tableSelection;
- if (!this.tableSelection[0].printNum) {
- this.queryItem = this.tableSelection;
- this.getDateil(this.tableSelection, "getDeliverDetail");
- this.$refs.preView.show(this.hiprintTemplate, this.outputData);
- } else {
- this.queryItem = this.tableSelection;
- this.dialogForm.createMan = JSON.parse(
- localStorage.getItem("supply_user")
- ).nickName;
- this.dialogForm.createDate = this.getDate();
- this.isShowDialog = true;
- }
- },
- // 关闭弹窗
- cancelDialogForm() {
- this.isShowDialog = false;
- this.$refs.dialogForm.resetFields();
- },
- // 提交 弹窗
- submitDialogForm() {
- this.$refs.dialogForm.validate((valid) => {
- if (valid) {
- let params = {
- shipId: this.queryItem[0].invoiceId,
- password: this.dialogForm.password,
- };
- checkPassword(params).then((res) => {
- this.cancelDialogForm();
- this.getDateil(this.tableSelection, "getDeliverDetail");
- this.$refs.preView.show(this.hiprintTemplate, this.outputData);
- });
- }
- });
- },
- getDate() {
- var date = new Date();
- var seperator1 = "-";
- var year = date.getFullYear();
- var month = date.getMonth() + 1;
- var strDate = date.getDate();
- if (month >= 1 && month <= 9) {
- month = "0" + month;
- }
- if (strDate >= 0 && strDate <= 9) {
- strDate = "0" + strDate;
- }
- var currentdate = year + seperator1 + month + seperator1 + strDate;
- return currentdate;
- },
- backList() {
- this.queryItem = {};
- this.isShowPrint = false;
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- .num {
- display: inline-block;
- font-size: 16px;
- margin-left: 20px;
- color: #909399;
- vertical-align: middle;
- }
- </style>
|