123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587 |
- // 检斤记录
- <template>
- <div class="container">
- <el-row class="toptitle">
- <el-col :span="12">
- <h2 class="bg-left title">检斤记录</h2>
- </el-col>
- <el-col :span="12" class="bg-right">
- <el-button type="primary" size="small" @click="returnsales()">
- <img width="6" height="10" style="vertical-align: bottom; margin-right: 3px"
- src="../../../public/img/lujing.png" alt="" />返回
- </el-button>
- </el-col>
- </el-row>
- <div class="center">
- <el-row>
- <el-col :span="6">
- <el-button :type="warehousingType == 1?'primary':''" size="small" @click="changeType(1)"
- class="btn_css btn_topcss">贸易入库</el-button>
- <el-button :type="warehousingType == 3?'primary':''" size="small" @click="changeType(3)"
- class="btn_css btn_topcss">收购入库</el-button>
- </el-col>
- <el-col :span="18" class="bg-right">
- <div style="display:flex">
- <el-select style='margin-right:5px;width:40%' v-model="warehouseName" placeholder="请选择仓库名" @change="warehouseNameChange">
- <el-option v-for="item in warehouseList" :key="item.id" :label="item.warehouseName"
- :value="item.warehouseName"></el-option>
- </el-select>
- <el-date-picker v-model="value2" type="daterange" align="right" unlink-panels range-separator="至"
- start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
- </el-date-picker>
- <el-input :placeholder="warehousingType == 1 ? '可按业务编号、合同编号/移库编号、车牌号查找':'可按业务编号、车牌号、客户名查找'" clearable
- v-model="searchKeyWord" class="search_css"></el-input>
- <!-- <el-input placeholder="可按业务编号、车牌号、客户名查找" clearable v-model="searchKeyWord"></el-input> -->
- <el-button type="primary" size="small" @click="lookup">查找</el-button>
- </div>
- </el-col>
- </el-row>
- <el-button :type="choice == ''?'primary':''" size="small" @click="screen()" class="btn_css">全部</el-button>
- <el-button :type="choice == 2?'primary':''" size="small" @click="screen(2)" class="btn_css">已称毛重</el-button>
- <el-button :type="choice == 3?'primary':''" size="small" @click="screen(3)" class="btn_css">已称皮重</el-button>
- <el-button size="small" @click="print('',1)">批量打印</el-button>
- <el-upload style="margin-top: -35px; margin-left:430px" class="upload-demo inline-block margin-right-10" action=""
- :on-change="importClick" :show-file-list="false"
- accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
- :auto-upload="false">
- <ws-button type="primary">导入(移库)</ws-button>
- </el-upload>
- <el-table class="forData" :data="weighingRecordList" style="width: 100%; margin-top: 20px" height="780"
- @selection-change="handleSelectionChange">
- <el-table-column key="0" type="selection" width="55"></el-table-column>
- <el-table-column key="1" type="index" label="序号" width="80">
- <template scope="scope">
- <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
- <span v-else>{{ scope.$index + 1 }}</span>
- </template>
- </el-table-column>
- <el-table-column key="inOutTaskNo" prop="inOutTaskNo" label="任务编号" width="170"></el-table-column>
- <el-table-column key="2" prop="number" label="业务编号" width="170"></el-table-column>
- <el-table-column key="3" prop="contractNo" label="合同编号/移库编号" v-if="warehousingType == 1" width="130">
- <template scope="scope">
- <span v-if="scope.row.contractNo">{{scope.row.contractNo}}</span>
- <span v-else>{{scope.row.moveTaskNo}}</span>
- </template>
- </el-table-column>
- <!--//moveTaskNo -->
- <el-table-column key="4" prop="customer" label="客户" v-if="warehousingType == 3"></el-table-column>
- <el-table-column key="5" prop="carNumber" label="车牌号"></el-table-column>
- <el-table-column key="6" prop="goodsName" label="货名"></el-table-column>
- <el-table-column key="7" prop="grossWeight" label="毛重(公斤)" width="100"></el-table-column>
- <el-table-column key="8" prop="tare" label="皮重(公斤)" width="100"></el-table-column>
- <el-table-column key="9" prop="buckleMiscellaneous" label="扣重(公斤)" width="100"></el-table-column>
- <el-table-column key="10" prop="netWeight" label="净重(公斤)" width="100"></el-table-column>
- <el-table-column key="11" prop="secretaryWeigher" label="司称员"></el-table-column>
- <el-table-column key="12" prop="grossDate" label="检斤时间"></el-table-column>
- <el-table-column key="13" prop="status" label="状态"></el-table-column>
- <el-table-column key="14" label="操作" min-width="400">
- <template scope="scope">
- <!-- <el-button size="small" @click="print(scope.row)">打印</el-button> -->
- <el-button @click="print(scope.row,2)" v-if="scope.row.status == '已称皮重' || scope.row.status == '已称毛重'" v-hasPermission="`acquisitionManagement.acquisitionWeight.print`">打印</el-button>
- <el-button @click="backInfo(scope.row)" v-if="scope.row.status == '已称皮重'">退回</el-button>
- <el-button v-hasPermission="`warehouseManagement.warehouse.warehouseInfo.huan`" class="putstorage" @click="exchange(scope.row)" v-if="scope.row.status == '已称毛重'|| scope.row.status == '已质检'">换仓</el-button>
- <el-button v-hasPermission="`warehouseManagement.warehouse.warehouseInfo.huan`" class="putstorage" @click="exchangeNo(scope.row)" v-if="scope.row.status == '已称毛重'|| scope.row.status == '已质检'">换任务号</el-button>
- <el-button v-hasPermission="`warehouseManagement.warehouse.warehouseInfo.huan`" class="putstorage" @click="exchangeName(scope.row)" v-if="(scope.row.status == '已称毛重'|| scope.row.status == '已质检') && warehousingType == 3">换客户</el-button>
- <el-button @click="deleteInfo(scope.row)" v-if="scope.row.status == '已称毛重'|| scope.row.status == '已质检'">删除</el-button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <div style="text-align: center; padding: 10px">
- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
- :page-size="deptCircularPage.pageSize" layout="total, sizes, prev, pager, next, jumper"
- :total="deptBudgetTotal">
- </el-pagination>
- </div>
- <div class="mask" v-show="isShowPrintType"></div>
- <div class="print-type" v-show="isShowPrintType">
- <div class="print-type-content">
- <div class="print-type-title">请选择打印纸张类型</div>
- <div class="print-type-checkbox">
- <!-- <el-radio-group v-model="radio">
- <el-radio label="A4" class="label-width" @change="selectType">A4</el-radio>
- <el-radio label="A5" class="label-width" @change="selectType">A5</el-radio>
- </el-radio-group> -->
- </div>
- <div class="shdw-style" v-if="checked||(!ddchecked&&!checked)">
- <div>收货单位:</div>
- <!-- <div>{{companyName}}</div> -->
- <el-select v-model="companyName" placeholder="请选择" style="width: 75%;">
- <el-option v-for="item in companyNameOptions" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </div>
- <div class="shdw-style" v-if="checked && serviceManagementType==3 || (!ddchecked && !checked && serviceManagementType==3)">
- <div>发货单位:</div>
- <!-- <div>{{companyName}}</div> -->
- <el-select v-model="customer" placeholder="请选择" style="width: 75%;">
- <el-option v-for="item in customerOptions" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </div>
- <div v-if="warehouseName=='鲅鱼圈金信库'&&printType==2||
- warehouseName=='白城内陆港'&&printType==2||
- warehouseName=='杜尔伯特家禾库'&&printType==2||
- warehouseName=='洮南兴旺库2023.10-2024.9'&&printType==2||
- warehouseName=='洮南新友谊兴旺库'&&printType==2||
- warehouseName=='甘南宏旗库'&&printType==2||
- warehouseName=='洮南向阳乡金昊'&&printType==2||
- warehouseName=='山东园丰库'&&printType==2">
- <div class="print-type-ew">
- <el-checkbox v-model="checked" @change="changeEw">打印额外票据</el-checkbox>
- <el-checkbox v-model="ddchecked" @change="changeEwDD">单独打印额外票据</el-checkbox>
- </div>
- <div class="ew-print" v-if="printSeparately">
- <div class="row">
- <div>额外客户姓名:</div>
- <!-- <div>{{companyName}}</div> -->
- <el-select v-model="ewCustomer" placeholder="请选择" style="width: 75%;">
- <el-option v-for="item in ewCustomerOptions" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </div>
- <div class="row">
- <div>额外收货单位:</div>
- <!-- <div>{{companyNameEW}}</div> -->
- <el-select v-model="companyNameEW" placeholder="请选择" style="width: 75%;">
- <el-option v-for="item in companyNameEWOptions" :key="item.value" :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- </div>
- </div>
- </div>
- <div v-if="warehouseName=='鲅鱼圈金信库'&&printType==2">
- <div class="print-type-ew">
- <el-checkbox v-model="outchecked" @change="changeOut">是否打印出库</el-checkbox>
- </div>
- <div class="ew-print" v-if="printout">
- <div class="row">
- <div>出库发货单位:</div>
- <!-- <div>{{companyName}}</div> -->
- <el-select v-model="inshipments" placeholder="请选择" style="width: 75%;">
- <el-option v-for="item in ewCustomerOptions" :key="item.value" :label="item.label" :value="item.value">
- </el-option>
- </el-select>
- </div>
- <div class="row">
- <div>出库收货单位:</div>
- <!-- <div>{{companyNameEW}}</div> -->
- <el-select v-model="outshipments" placeholder="请选择" style="width: 75%;">
- <el-option v-for="item in companyNameEWOptions" :key="item.value" :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- </div>
- <div class="row">
- <div>出库仓位号:</div>
- <!-- <div>{{companyNameEW}}</div> -->
- <el-select v-model="outbinNumber" placeholder="请选择仓位号" style="width: 75%;">
- <el-option v-for="item in binNumberList1" :key="item.id" :label="item.binNumber"
- :value="item.binNumber">
- </el-option>
- </el-select>
- </div>
- </div>
- </div>
- </div>
- <div class="bottom-btn">
- <el-button @click="typePrintClick">确定</el-button>
- <el-button @click="typePrintCannelClick">取消</el-button>
- </div>
- </div>
- <el-dialog width="70%" class="table-content" center :visible.sync="isShowPrint" title="粮食检斤单">
- <weightCheckPrint :tableData="dialogData"></weightCheckPrint>
- <div style="text-align:center">
- <el-button type="primary" @click="isShowPrint = false">关闭</el-button>
- <el-button type="primary" @click="printSmall">打印小票</el-button>
- <el-button type="primary" @click="printBig">打印单据</el-button>
- </div>
- </el-dialog>
- <el-dialog
- title="提示"
- :visible.sync="dialogVisible"
- width="30%"
- :before-close="handleClose">
- <div style="text-align:center">
- <el-select filterable clearable v-model="binNumber" placeholder="请选择仓位" class="typeselect"
- @change="binNumberChange">
- <el-option v-for="item in binnumberList" :key="item.binNumber" :label="item.binNumber"
- :value="item.binNumber" />
- </el-select>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogVisible = false">取 消</el-button>
- <el-button type="primary" @click="dialogVisibleconfirm">确 定</el-button>
- </span>
- </el-dialog>
- <el-dialog
- title="提示"
- :visible.sync="dialogVisible1"
- width="30%"
- :before-close="handleClose1">
- <div style="text-align:center">
- <el-form ref="form" label-width="110px">
- <el-form-item label="任务编号">
- <el-select filterable clearable v-model="inOutTaskNo" placeholder="请选择任务号" class="typeselect"
- @change="taskNoChange">
- <el-option v-for="item in taskNolist" :key="item.inOutTaskNo" :label="item.inOutTaskNo"
- :value="item.inOutTaskNo" />
- </el-select>
- </el-form-item>
- <el-form-item label="合同编号">
- <el-input v-model="contractNo" placeholder="合同编号" :disabled="disabled" maxlength="15">
- </el-input>
- </el-form-item>
- </el-form>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogVisible1 = false">取 消</el-button>
- <el-button type="primary" @click="dialogVisibleconfirm1">确 定</el-button>
- </span>
- </el-dialog>
- <el-dialog
- title="提示"
- :visible.sync="dialogVisible2"
- width="30%"
- :before-close="handleClose2">
- <div style="text-align:center">
- <el-form ref="form" label-width="110px">
- <el-form-item label="客户名">
- <el-select filterable clearable v-model="customerNumberCard" placeholder="请选择客户" class="typeselect"
- @change="customerChange">
- <el-option v-for="item in customerlist" :key="item.customerNumberCard" :label="item.customerName"
- :value="item.customerNumberCard" />
- </el-select>
- </el-form-item>
- <el-form-item label="手机号">
- <el-input v-model="customerPhone" placeholder="手机号" :disabled="disabled" maxlength="15">
- </el-input>
- </el-form-item>
- <el-form-item label="身份证号码">
- <el-input v-model="customerNumberCard" placeholder="身份证号码" :disabled="disabled" maxlength="20">
- </el-input>
- </el-form-item>
- </el-form>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogVisible2 = false">取 消</el-button>
- <el-button type="primary" @click="dialogVisibleconfirm2">确 定</el-button>
- </span>
- </el-dialog>
- </div>
- </template>
- <script>
- import {
- selectWarehouseSelf,
- getweighingList,
- getPrint,
- returnInfo,
- changeNo,
- changeTaskNo,
- changeCustomer,
- getcustomer,
- importWordYk,
- getweighingDelete,
- getbinNumber
- } from '@/model/houseSelfCollect/index'
- import {
- getReceiptTaskNo,
- } from '@/model/warehouse/index'
- import {
- getcomp
- } from '@/model/indexRx'
- import weightCheckPrint from './component/weightCheckPrint.vue'
- export default {
- components: {
- weightCheckPrint
- },
- data() {
- return {
- weighingRecordList: [],
- warehouseId: '',
- warehouseName: '',
- // goodsNameList: [],
- // goodsNameAllList: [],
- // binNoList: [],
- // binNumberId: '', //仓位Id
- // warehouseType: '',
- compId: '',
- outbinNumber:'',
- printType:0,
- binNumberList1:[],
- UserInfo:JSON.parse(localStorage.getItem('ws_login_getTenantInfoByUser')),
- pickerOptions: {
- shortcuts: [{
- text: '本周',
- onClick(picker) {
- const end = new Date()
- const start = new Date()
- var thisDay = start.getDay()
- var thisDate = start.getDate()
- if (thisDay != 0) {
- start.setDate(thisDate - thisDay)
- }
- picker.$emit('pick', [start, end])
- },
- },
- {
- text: '本月',
- onClick(picker) {
- const end = new Date()
- const start = new Date()
- start.setDate(1)
- picker.$emit('pick', [start, end])
- },
- },
- {
- text: '本季度',
- onClick(picker) {
- var oDate = new Date()
- var thisYear = oDate.getFullYear()
- var thisMonth = oDate.getMonth() + 1
- var n = Math.ceil(thisMonth / 3) // 季度
- var Month = n * 3 - 1
- var start = new Date(thisYear, Month - 2, 1)
- var end = new Date()
- picker.$emit('pick', [start, end])
- },
- },
- ],
- },
- //分页
- currentPage: 1,
- pageSize: 10,
- value2:[],
- deptCircularPage: {},
- deptBudgetTotal: 0,
- warehouseList: [], //仓库
- searchKeyWord: '',
- choice: '',
- warehousingType: 1,
- isShowPrint: false,
- dialogData: {},
- title: '',
- disabled: true,
- taskflag:2,
- modification: [],
- ewCustomerOptions: [{
- value: '天津建源供应链管理有限公司',
- label: '天津建源供应链管理有限公司'
- },{
- value: '黑龙江中天昊元贸易有限公司',
- label: '黑龙江中天昊元贸易有限公司'
- }, {
- value: '黑龙江利润元粮食贸易有限公司',
- label: '黑龙江利润元粮食贸易有限公司'
- }, {
- value: '黑龙江众利合粮食贸易有限公司',
- label: '黑龙江众利合粮食贸易有限公司'
- }, {
- value: '黑龙江鑫满仓粮食贸易有限公司',
- label: '黑龙江鑫满仓粮食贸易有限公司'
- },{
- value: '厦门建发物产有限公司',
- label: '厦门建发物产有限公司'
- },{
- value: '黑龙江谷香粮食贸易有限公司',
- label: '黑龙江谷香粮食贸易有限公司'
- },{
- value: '黑龙江秋收有限公司',
- label: '黑龙江秋收有限公司'
- }, {
- value: '黑龙江欣洋粮食贸易有限公司',
- label: '黑龙江欣洋粮食贸易有限公司'
- }, {
- value: '黑龙江益储益运粮食贸易有限公司',
- label: '黑龙江益储益运粮食贸易有限公司'
- }, {
- value: '黑龙江启兴粮食贸易有限公司',
- label: '黑龙江启兴粮食贸易有限公司'
- }, {
- value: '吉林中翰兴粮食贸易有限公司',
- label: '吉林中翰兴粮食贸易有限公司'
- }, {
- value: '黑龙江中天绿粮供应链服务有限公司',
- label: '黑龙江中天绿粮供应链服务有限公司'
- }],
- companyNameOptions: [{
- value: '黑龙江中天昊元贸易有限公司',
- label: '黑龙江中天昊元贸易有限公司'
- }, {
- value: '黑龙江利润元粮食贸易有限公司',
- label: '黑龙江利润元粮食贸易有限公司'
- }, {
- value: '黑龙江众利合粮食贸易有限公司',
- label: '黑龙江众利合粮食贸易有限公司'
- }, {
- value: '黑龙江鑫满仓粮食贸易有限公司',
- label: '黑龙江鑫满仓粮食贸易有限公司'
- },{
- value: '黑龙江谷香粮食贸易有限公司',
- label: '黑龙江谷香粮食贸易有限公司'
- },{
- value: '黑龙江秋收有限公司',
- label: '黑龙江秋收有限公司'
- }, {
- value: '黑龙江欣洋粮食贸易有限公司',
- label: '黑龙江欣洋粮食贸易有限公司'
- }, {
- value: '黑龙江益储益运粮食贸易有限公司',
- label: '黑龙江益储益运粮食贸易有限公司'
- }, {
- value: '黑龙江启兴粮食贸易有限公司',
- label: '黑龙江启兴粮食贸易有限公司'
- }, {
- value: '吉林中翰兴粮食贸易有限公司',
- label: '吉林中翰兴粮食贸易有限公司'
- }, {
- value: '黑龙江中天绿粮供应链服务有限公司',
- label: '黑龙江中天绿粮供应链服务有限公司'
- }],
- companyNameEWOptions: [{
- value: '天津建源供应链管理有限公司',
- label: '天津建源供应链管理有限公司'
- },{
- value: '厦门建发物产有限公司',
- label: '厦门建发物产有限公司'
- }],
- companyName: '黑龙江中天昊元贸易有限公司',
- companyNameEW: '厦门建发物产有限公司',
- ewCustomer: '黑龙江利润元粮食贸易有限公司',
- inshipments:'黑龙江中天昊元贸易有限公司',
- outshipments:'黑龙江中天昊元贸易有限公司',
- ewradio: '',
- ddchecked: false,
- checked: false,
- outchecked:false,
- customerOptions:[],
- customer:'',
- isShowPrintType: false,
- dialogDataList: [],
- jjSelectPrintList: [],
- outPrintList: [],
- printSeparately: false,
- printout:false,
- onePrint: false,
- startDate:'',
- endDate:'',
- dialogVisible:false,
- dialogVisible1:false,
- dialogVisible2:false,
- binNumber:'',
- binnumberList:[],
- taskNolist:[],
- customerlist:[],
- cangweiNum:'',
- contractNum:'',
- inOutTaskNo:'',
- customerName:'',
- contractNo:'',
- customerPhone:'',
- customerNumberCard:'',
- positionId:'',
- warehouseInOutDetail:{},
- serviceManagementType:1,
- }
- },
- activated() {
- //仓库
- console.log(localStorage.getItem('compNameoptions'))
- getcomp({userMobilePhone:JSON.parse(localStorage.getItem('ws_login_getTenantInfoByUser')).loginInfo.userMobilePhone}).toPromise().then((res)=>{
- this.compNameoptions=res
- if (this.compNameoptions.length>0) {
- var company=this.compNameoptions
-
- var extra=company.filter((item)=>{
- return item!='黑龙江中天昊元贸易有限公司'
- &&item!='黑龙江利润元粮食贸易有限公司'
- &&item!= '黑龙江众利合粮食贸易有限公司'
- &&item!='黑龙江鑫满仓粮食贸易有限公司'
- &&item!='黑龙江谷香粮食贸易有限公司'
- &&item!='黑龙江秋收有限公司'
- &&item!= '黑龙江欣洋粮食贸易有限公司'
- &&item!='黑龙江益储益运粮食贸易有限公司'
- &&item!='黑龙江启兴粮食贸易有限公司'
- })
- if(extra.length>0){
- this.companyNameOptions=[
- {
- value: '黑龙江中天昊元贸易有限公司',
- label: '黑龙江中天昊元贸易有限公司'
- }, {
- value: '黑龙江利润元粮食贸易有限公司',
- label: '黑龙江利润元粮食贸易有限公司'
- }, {
- value: '黑龙江众利合粮食贸易有限公司',
- label: '黑龙江众利合粮食贸易有限公司'
- }, {
- value: '黑龙江鑫满仓粮食贸易有限公司',
- label: '黑龙江鑫满仓粮食贸易有限公司'
- },{
- value: '黑龙江欣洋粮食贸易有限公司',
- label: '黑龙江欣洋粮食贸易有限公司'
- },{
- value: '黑龙江谷香粮食贸易有限公司',
- label: '黑龙江谷香粮食贸易有限公司'
- },{
- value: '黑龙江秋收有限公司',
- label: '黑龙江秋收有限公司'
- }, {
- value: '黑龙江益储益运粮食贸易有限公司',
- label: '黑龙江益储益运粮食贸易有限公司'
- }, {
- value: '黑龙江启兴粮食贸易有限公司',
- label: '黑龙江启兴粮食贸易有限公司'
- }, {
- value: '吉林中翰兴粮食贸易有限公司',
- label: '吉林中翰兴粮食贸易有限公司'
- }, {
- value: '黑龙江中天绿粮供应链服务有限公司',
- label: '黑龙江中天绿粮供应链服务有限公司'
- }]
- this.ewCustomerOptions= [
- {
- value: '天津建源供应链管理有限公司',
- label: '天津建源供应链管理有限公司'
- },{
- value: '黑龙江中天昊元贸易有限公司',
- label: '黑龙江中天昊元贸易有限公司'
- }, {
- value: '黑龙江利润元粮食贸易有限公司',
- label: '黑龙江利润元粮食贸易有限公司'
- }, {
- value: '黑龙江众利合粮食贸易有限公司',
- label: '黑龙江众利合粮食贸易有限公司'
- }, {
- value: '黑龙江鑫满仓粮食贸易有限公司',
- label: '黑龙江鑫满仓粮食贸易有限公司'
- },{
- value: '黑龙江欣洋粮食贸易有限公司',
- label: '黑龙江欣洋粮食贸易有限公司'
- },{
- value: '黑龙江谷香粮食贸易有限公司',
- label: '黑龙江谷香粮食贸易有限公司'
- },{
- value: '黑龙江秋收有限公司',
- label: '黑龙江秋收有限公司'
- }, {
- value: '黑龙江益储益运粮食贸易有限公司',
- label: '黑龙江益储益运粮食贸易有限公司'
- }, {
- value: '黑龙江启兴粮食贸易有限公司',
- label: '黑龙江启兴粮食贸易有限公司'
- }, {
- value: '吉林中翰兴粮食贸易有限公司',
- label: '吉林中翰兴粮食贸易有限公司'
- }, {
- value: '黑龙江中天绿粮供应链服务有限公司',
- label: '黑龙江中天绿粮供应链服务有限公司'
- }]
- this.companyNameEWOptions=[
- {
- value: '天津建源供应链管理有限公司',
- label: '天津建源供应链管理有限公司'
- },{
- value: '黑龙江中天昊元贸易有限公司',
- label: '黑龙江中天昊元贸易有限公司'
- }, {
- value: '黑龙江利润元粮食贸易有限公司',
- label: '黑龙江利润元粮食贸易有限公司'
- }, {
- value: '黑龙江众利合粮食贸易有限公司',
- label: '黑龙江众利合粮食贸易有限公司'
- }, {
- value: '黑龙江鑫满仓粮食贸易有限公司',
- label: '黑龙江鑫满仓粮食贸易有限公司'
- },{
- value: '黑龙江欣洋粮食贸易有限公司',
- label: '黑龙江欣洋粮食贸易有限公司'
- },{
- value: '黑龙江谷香粮食贸易有限公司',
- label: '黑龙江谷香粮食贸易有限公司'
- },{
- value: '黑龙江秋收有限公司',
- label: '黑龙江秋收有限公司'
- }, {
- value: '黑龙江益储益运粮食贸易有限公司',
- label: '黑龙江益储益运粮食贸易有限公司'
- }, {
- value: '黑龙江启兴粮食贸易有限公司',
- label: '黑龙江启兴粮食贸易有限公司'
- }, {
- value: '黑龙江中天绿粮供应链服务有限公司',
- label: '黑龙江中天绿粮供应链服务有限公司'
- }]
- if(localStorage.getItem('print_company_name')){
- this.companyName=localStorage.getItem('print_company_name')
- }else{
- this.companyName=extra[0]
- }
- if(localStorage.getItem('print_company_name_ew')){
- this.companyNameEW=localStorage.getItem('print_company_name_ew')
- }else{
- this.companyNameEW=extra[0]
- }
- if(localStorage.getItem('print_customer_name_ew')){
- this.ewCustomer=localStorage.getItem('print_customer_name_ew')
- }else{
- this.ewCustomer=extra[0]
- }
- for (let i = 0; i < extra.length; i++) {
- this.ewCustomerOptions.push({value: extra[i],label:extra[i]})
- this.companyNameOptions.push({value: extra[i],label:extra[i]})
- this.companyNameEWOptions.push({value: extra[i],label:extra[i]})
- }
- }
- }
- })
- selectWarehouseSelf({
- compId: localStorage.getItem('ws-pf_compId'),
- })
- .toPromise()
- .then((response) => {
- this.warehouseList = response
- })
- this.compId = localStorage.getItem('ws-pf_compId')
- this.warehousingType = this.$route.query.inWarehouseType
- this.warehouseName = this.$route.query.warehouseName //仓库名
- this.warehouseId = this.$route.query.warehouseId
- this.getList()
- },
- methods: {
- importClick(file, fileList) {
- this.fileTemp = file.raw
- let fileName = file.raw.name
- let fileType = fileName.substring(fileName.lastIndexOf('.') + 1)
- // 判断上传文件格式
- if (this.fileTemp) {
- if (fileType == 'xlsx' || fileType == 'xls') {
- this.importf(this.fileTemp)
- } else {
- this.$message({
- type: 'warning',
- message: '附件格式错误,请删除后重新上传!',
- })
- }
- } else {
- this.$message({
- type: 'warning',
- message: '请上传附件!',
- })
- }
- },
- importf(obj) {
- this.excelFreightspace = []
- // this.dialogVisible = true;
- let _this = this;
- let inputDOM = this.$refs.inputer; // 通过DOM取文件数据
- this.file = event.currentTarget.files[0];
- var rABS = false; //是否将文件读取为二进制字符串
- var f = this.file;
- var reader = new FileReader();
- //if (!FileReader.prototype.readAsBinaryString) {
- FileReader.prototype.readAsBinaryString = function(f) {
- var binary = '';
- var rABS = false; //是否将文件读取为二进制字符串
- var pt = this;
- var wb; //读取完成的数据
- var outdata;
- var reader = new FileReader();
- reader.onload = function(e) {
- var bytes = new Uint8Array(reader.result);
- var length = bytes.byteLength;
- for (var i = 0; i < length; i++) {
- binary += String.fromCharCode(bytes[i]);
- }
- var XLSX = require('xlsx');
- if (rABS) {
- wb = XLSX.read(btoa(fixdata(binary)), { //手动转化
- type: 'base64',
- cellDates: true
- });
- } else {
- wb = XLSX.read(binary, {
- type: 'binary'
- });
- }
- // outdata就是你想要的东西 excel导入的数据
- outdata = XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]]);
- // excel 数据再处理
- let arr = []
- outdata.map(v => {
- // let jsonString = JSON.stringify(v).replace(/\*/g, '').replace(/\s/ig,'');
- let jsonString = JSON.stringify(v).replace(/\//g, '').replace(/\s/ig, '');
- v = JSON.parse(jsonString);
- let obj = {}
- //xxx代表列名
- obj.number = v.业务编号
- obj.inOutTaskNo = v.移库任务编号
- obj.outType = v.运输方式
- obj.carNumber = v.车牌号
- obj.grossWeight = v.毛重
- obj.tare = v.皮重
- obj.netWeight = v.净重
- obj.grossDate = _this.formatDate(v.入库日期, '-')
- _this.excelFreightspace.push(obj)
- })
- if (_this.excelFreightspace) {
- importWordYk({
- warehouseName: _this.warehouseName,
- weighingManagementList: _this.excelFreightspace
- }).toPromise()
- .then((response) => {
- if (response == 'ok') {
- this.$notify({
- title: '成功',
- message: '导入成功',
- type: 'success'
- });
- _this.getList()
- }
- })
- }
- }
- reader.readAsArrayBuffer(f);
- }
- if (rABS) {
- reader.readAsArrayBuffer(f);
- } else {
- reader.readAsBinaryString(f);
- }
- },
- formatDate(numb, format) {
- const old = numb - 1;
- const t = Math.round((old - Math.floor(old)) * 24 * 60 * 60);
- const time = new Date(1900, 0, old, 0, 0, t)
- const year = time.getFullYear();
- const month = time.getMonth() + 1;
- const date = time.getDate();
- return year + format + (month < 10 ? '0' + month : month) + format + (date < 10 ? '0' + date : date) +
- ' 00:00:00'
- },
- binNumberChange(e){
- this.binNumber = e
- for(let i = 0 ; i < this.binnumberList.length ; i++){
- if(this.binNumber == this.binnumberList[i].binNumber){
- this.positionId = this.binnumberList[i].id
- }
- }
- },
- taskNoChange(e){
- this.inOutTaskNo = e
- for(let i = 0 ; i < this.taskNolist.length ; i++){
- if(this.inOutTaskNo == this.taskNolist[i].inOutTaskNo){
- if(this.taskNolist[i].contractNo){
- this.contractNo = this.taskNolist[i].contractNo
- }
- else{
- this.contractNo = this.taskNolist[i].moveTaskNo
- }
- }
- }
- },
- customerChange(e){
- for(let i = 0 ; i < this.customerlist.length ; i++){
- if(this.customerNumberCard == this.customerlist[i].customerNumberCard){
- this.customerPhone = this.customerlist[i].customerPhone
- this.customerName = this.customerlist[i].customerName
- }
- }
- },
- handleClose(){
- this.dialogVisible = false
- },
- handleClose1(){
- this.inOutTaskNo=''
- this.dialogVisible1 = false
- },
- handleClose2(){
- this.customerName=''
- this.customerPhone=''
- this.customerNumberCard=''
- this.dialogVisible2 = false
- },
- dialogVisibleconfirm(){
- if(this.binNumber == this.cangweiNum){
- this.$message.error('已是该仓位无需修改')
- return
- }
- this.$confirm(`确定修改仓位?`, {
- cancelButtonText: '取消',
- confirmButtonText: '确定',
- type: 'warning',
- })
- .then(() => {
- // let _obj = JSON.parse(this.warehouseInOutDetail)
- // _obj.binNumber = this.binNumber
- changeNo({id:this.id,changePositionId:this.positionId,changeBinNumer:this.binNumber}).toPromise()
- .then((response) => {
- this.$notify.success({
- title: '成功',
- message: '修改仓位成功',
- })
- this.getList()
- this.dialogVisible=false
- })
- })
- .catch(() => {
- return false
- })
- },
- dialogVisibleconfirm1(){
- // if(this.contractNo == this.contractNum){
- // this.$message.error('已是该任务号无需修改')
- // return
- // }
- this.$confirm(`确定修改任务号?`, {
- cancelButtonText: '取消',
- confirmButtonText: '确定',
- type: 'warning',
- })
- .then(() => {
- changeTaskNo({id:this.id,inOutTaskNo:this.inOutTaskNo,contractNo:this.contractNo}).toPromise()
- .then((response) => {
- this.$notify.success({
- title: '成功',
- message: '修改任务号成功',
- })
- this.getList()
- this.inOutTaskNo=''
- this.dialogVisible1=false
- })
- })
- .catch(() => {
- return false
- })
- },
- dialogVisibleconfirm2(){
- this.$confirm(`确定修改客户?`, {
- cancelButtonText: '取消',
- confirmButtonText: '确定',
- type: 'warning',
- })
- .then(() => {
- changeCustomer({id:this.id,customer:this.customerName,customerPhone:this.customerPhone,customerNumberCard:this.customerNumberCard}).toPromise()
- .then((response) => {
- this.$notify.success({
- title: '成功',
- message: '修改客户成功',
- })
- this.getList()
- this.customerName=''
- this.customerPhone=''
- this.customerNumberCard=''
- this.dialogVisible2=false
- })
- })
- .catch(() => {
- return false
- })
- },
- exchange(row){
- for(let i = 0 ; i < this.warehouseList.length; i++ ){
- if(this.warehouseName == this.warehouseList[i].warehouseName){
- this.binnumberList = this.warehouseList[i].positionInfos
- }
- }
- this.id = row.id
- this.binNumber = row.binNumber
- this.cangweiNum = row.binNumber
- this.dialogVisible = true
- },
- exchangeNo(row){
- if (row.serviceManagementType == 1) {
- this.taskflag=2
- } else {
- this.taskflag=3
- }
- getReceiptTaskNo({
- flag: this.taskflag,
- warehouseName: this.warehouseName,
- })
- .toPromise()
- .then((response) => {
- this.taskNolist = response
- })
- this.id = row.id
- this.contractNo = row.contractNo
- this.contractNum = row.contractNo
- this.dialogVisible1 = true
- },
- exchangeName(row){
- getcustomer({
- warehouseId: this.warehouseId,
- goodsName: row.goodsName
- })
- .toPromise()
- .then((response) => {
- this.customerlist = response
- })
- this.id = row.id
- this.dialogVisible2 = true
- },
- backInfo(row){
- this.$confirm('确定要退回该信息?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning',
- })
- .then(() => {
- returnInfo(row)
- .toPromise()
- .then((response) => {
- this.$notify.success({
- title: '成功',
- message: '退回成功!',
- })
- this.getList()
- })
- .catch((response) => {
- // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
- })
- })
- },
- deleteInfo(row){
- //删除
- this.$confirm('确定删除检斤信息?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning',
- })
- .then(() => {
- getweighingDelete({
- id: row.id,
- })
- .toPromise()
- .then((response) => {
- this.$notify.success({
- title: '成功',
- message: '删除成功',
- })
- this.getList()
- })
- .catch((response) => {
- // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
- })
- })
- .catch(() => {
- return false
- })
- },
- typePrintCannelClick() {
- this.onePrint = false //单个打印标识
- this.dialogDataList = [] //打个打印取消时数组至空
- this.isShowPrintType = false
- },
- handleSelectionChange(val) {
- this.modification = val;
- },
- // batchPrint(){
- // if(this.modification.length == 0){
- // this.$message.error("请选择批量打印的条目!")
- // return
- // }
- // // this.isShowPrintType = true
- // },
- changeEw(e) {
- this.ddchecked = false
- if (e) {
- this.printSeparately = true
- } else {
- this.printSeparately = false
- }
- },
- changeEwDD(e) {
- this.checked = false
- if (e) {
- this.printSeparately = true
- } else {
- this.printSeparately = false
- }
- },
- changeOut(e) {
- if (e) {
- this.printout = true
- } else {
- this.printout = false
- }
- },
- dateFormat(fmt, date) {
- let ret
- const opt = {
- 'Y+': date.getFullYear().toString(), // 年
- 'm+': (date.getMonth() + 1).toString(), // 月
- 'd+': date.getDate().toString(), // 日
- 'H+': date.getHours().toString(), // 时
- // "M+": date.getMinutes().toString(), // 分
- // "S+": date.getSeconds().toString() // 秒
- // 有其他格式化字符需求可以继续添加,必须转化成字符串
- }
- for (let k in opt) {
- ret = new RegExp('(' + k + ')').exec(fmt)
- if (ret) {
- fmt = fmt.replace(
- ret[1],
- ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
- )
- }
- }
- return fmt
- },
- lookup() {
- if (this.value2&&this.value2.length>0) {
- this.startDate = this.dateFormat('YYYY-mm-dd', this.value2[0])
- this.endDate = this.dateFormat('YYYY-mm-dd', this.value2[1])
- } else {
- this.startDate = ''
- this.endDate = ''
- }
- this.currentPage = 1
- this.getList()
- },
- changeType(val) {
- this.warehousingType = val
- this.getList()
- },
- screen(num) {
- this.choice = num
- this.getList()
- },
- returnsales() {
- this.$router.go(-1)
- },
- async typePrintClick(type) {
- localStorage.setItem('print_company_name',this.companyName)
- localStorage.setItem('print_company_name_ew',this.companyNameEW)
- localStorage.setItem('print_customer_name_ew',this.ewCustomer)
- localStorage.setItem('print_out',this.outchecked)
- if (this.onePrint) { //判断是否是单个打印
- getPrint({
- id: this.idPrint
- })
- .toPromise()
- .then((response) => {
- // 判断是否打印出库
- this.dialogDataList = [] //点击确认时先清空要打印的数组
- this.dialogData = response
- if (response.compName == '黑龙江秋收有限公司') {
- this.dialogData.compName = '黑龙江中天昊元贸易有限公司'
- }else{
- this.dialogData.compName = this.companyName
- }
- this.dialogData.customer=this.customer
- if (this.checked) {
- if(this.dialogData&&!this.dialogData.customer&&this.dialogData.contractManagement){
- this.dialogData.customer = this.dialogData.contractManagement.seller
- }
- this.dialogDataList.push(this.dialogData)
- var _datas = JSON.stringify(this.dialogData)
- _datas = JSON.parse(_datas)
- _datas.compName = this.companyNameEW;
- _datas.customer = this.ewCustomer
- this.dialogDataList.push(_datas)
- } else if (this.ddchecked) {
- _datas = this.dialogData
- _datas.compName = this.companyNameEW;
- _datas.customer = this.ewCustomer
- this.dialogDataList.push(_datas)
- }else {
- this.dialogData.compName = this.companyName
- if(this.dialogData&&this.dialogData.contractManagement&& this.warehousingType != 3&&this.dialogData.inOutType=='退库'){
- this.dialogData.customer = this.dialogData.contractManagement.buyer
- }
- else if(this.dialogData&&this.dialogData.contractManagement&& this.warehousingType != 3&&this.dialogData.inOutType!='退库'){
- this.dialogData.customer = this.dialogData.contractManagement.seller
- }
-
- this.dialogDataList.push(this.dialogData)
-
- }
- if(this.outchecked){
- if(!this.checked&&!this.ddchecked){
- this.dialogDataList=[]
- var _data = JSON.parse(JSON.stringify(this.dialogData))
- this.$set(_data,'printtype','out')
- _data.compName = this.outshipments;
- _data.customer = this.inshipments
- _data.binNumber = this.outbinNumber
- this.dialogDataList.push(_data)
- }else{
- var _data = JSON.parse(JSON.stringify(this.dialogData))
- this.$set(_data,'printtype','out')
- _data.compName = this.outshipments;
- _data.customer = this.inshipments
- _data.binNumber = this.outbinNumber
- this.dialogDataList.push(_data)
- }
- }
- this.printBig('', this.radio)
- })
- .catch((response) => {
- // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
- })
- } else {
- // if (this.isExcelPrint) {
- // this.printBig(2, this.radio)
- // this.isExcelPrint = false
- // } else {
- this.jjSelectPrintList = []
- let index1 = 0;
- for (let i = 0; i < this.modification.length; i++) {
- await getPrint({
- id: this.modification[i].id
- })
- .toPromise()
- .then((response) => {
- index1++;
- response.compName = this.companyName
- if (response.compName == '黑龙江秋收有限公司') {
- response.compName = '黑龙江中天昊元贸易有限公司'
- }
- response.customer=this.customer
- this.jjSelectPrintList.push(response)
- if (index1 == this.modification.length) {
- this.printBig(1, this.radio)
- }
- })
- .catch((response) => {})
- }
- // }
- }
- },
- makeEWjjSelectPrintList() {
- let _selectPrint_EWjjSelectPrintList = JSON.parse(JSON.stringify(this.jjSelectPrintList));
- for (let i = 0; i < _selectPrint_EWjjSelectPrintList.length; i++) {
- let _data = _selectPrint_EWjjSelectPrintList[i];
- _data.compName = this.companyNameEW;
- _data.customer = this.ewCustomer
- }
- localStorage.setItem('selectPrint_EWjjSelectPrintList', JSON.stringify(_selectPrint_EWjjSelectPrintList))
- },
- check(name, type) {
- if (type == 1) {
- for (var _tmp = 0; _tmp < this.ewCustomerOptions.length; _tmp++) {
- if (this.ewCustomerOptions[_tmp].label == name) {
- return false
- }
- }
- return true
- } else if (type == 2) {
- for (var _tmp = 0; _tmp < this.companyNameEWOptions.length; _tmp++) {
- if (this.companyNameEWOptions[_tmp].label == name) {
- return false
- }
- }
- return true
- } else if (type == 3) {
- for (var _tmp = 0; _tmp < this.companyNameOptions.length; _tmp++) {
- console.log(name)
- if (this.companyNameOptions[_tmp].label == name) {
- return false
- }
- }
- return true
- }
- },
- async print(row, type, pageType) {
- this.printType=type
- //打印
- if (type == 1) { //
- if (this.modification.length == 0) {
- this.$message.error('请选择批量打印的条目!')
- return
- }
- for (let _num = 0; _num < this.modification.length; _num++) {
- this.serviceManagementType=this.modification[_num].serviceManagementType
- if(this.modification[_num].serviceManagementType == 3){
- this.customerOptions=[{label:this.modification[_num].customer,value:this.modification[_num].customer}]
- this.customerOptions.push({label:this.modification[_num].seller,value:this.modification[_num].seller})
- this.customer=this.modification[_num].customer
- }
- if (this.modification[_num].serviceManagementType == 1&&(this.warehouseName == '鲅鱼圈金信库'|| this.warehouseName == '杜尔伯特家禾库'|| this.warehouseName == '洮南兴旺库2023.10-2024.9'||this.warehouseName=='洮南新友谊兴旺库'||this.warehouseName=='甘南宏旗库' || this.warehouseName == '白城内陆港' || this.warehouseName == '洮南向阳乡金昊'||this.warehouseName=='山东园丰库'||this.warehouseName=='佳屹农仓储库')){
- if (this.modification[_num].seller && this.modification[_num].buyer) {
- let cang = {}
- cang.value = this.modification[_num].seller
- cang.label = this.modification[_num].seller
- let cang1 = {}
- cang1.value = this.modification[_num].buyer
- cang1.label = this.modification[_num].buyer
- // if (this.check(this.modification[_num].seller, 1)) {
- // this.ewCustomerOptions.push(cang)
- // }
-
-
- if(this.warehouseName=='佳屹农仓储库'){
- if (this.check(this.modification[_num].buyer, 3)) {
- this.companyNameOptions.push(cang1)
- this.companyName=this.modification[_num].buyer
- }
-
- }else{
- if (this.check(this.modification[_num].buyer, 2)) {
- this.ewCustomerOptions.push(cang1)
- }
- }
-
- if (this.check(this.modification[_num].seller, 1)) {
- this.companyNameEWOptions.push(cang)
- }
- }
- }
- }
-
- this.isShowPrintType = true
-
- } else {
- this.serviceManagementType=row.serviceManagementType
- if(row.serviceManagementType == 3){
- this.customerOptions=[{label:row.customer,value:row.customer}]
- this.customerOptions.push({label:row.seller,value:row.seller})
- this.customer=row.customer
- console.log(this.customerOptions,this.customer,222222)
- }
- if (row.serviceManagementType == 1&&(this.warehouseName == '鲅鱼圈金信库' || this.warehouseName == '杜尔伯特家禾库' || this.warehouseName == '洮南兴旺库2023.10-2024.9'||this.warehouseName=='洮南新友谊兴旺库'||this.warehouseName=='甘南宏旗库' || this.warehouseName == '白城内陆港' || this.warehouseName == '洮南向阳乡金昊'||this.warehouseName=='山东园丰库'||this.warehouseName=='佳屹农仓储库')) {
- if (row.seller && row.buyer) {
- let cang = {}
- cang.value = row.seller
- cang.label = row.seller
- // if (this.check(row.seller, 1)) {
- // this.ewCustomerOptions.push(cang)
- // }
- let cang1 = {}
- cang1.value = row.buyer
- cang1.label = row.buyer
-
- if(this.warehouseName=='佳屹农仓储库'){
- if (this.check(row.buyer, 3)) {
- this.companyNameOptions.push(cang1)
- this.companyName=row.buyer
- }
-
-
- }else{
- if (this.check(row.buyer, 2)) {
- this.companyNameEWOptions.push(cang1)
- }
- }
- if (this.check(row.seller, 1)) {
- this.ewCustomerOptions.push(cang)
- }
-
- }
- }
- this.idPrint = row.id
- if(type==2&&this.warehouseName=='鲅鱼圈金信库'){
- var data=await getbinNumber({id:row.warehouseId}).toPromise()
- this.binNumberList1=data.warehousePositionInfoList
- }
- this.isShowPrintType = true
- this.onePrint = true //单个打印标识
- }
- },
- printSmall() {
- window.open('../../../../static/weightCheck.html?type=1&tableData=' + JSON.stringify(this.dialogData).replace(/%/g, 'baifenhao'))
- },
- printBig(type, radioType) {
- localStorage.removeItem('print_in_data')
- // 打印额外
- if (this.checked || this.ddchecked) {
- this.makeEWjjSelectPrintList()
- // this.selectEW = true;
- }
- // if(this.outchecked){
- // var _data = JSON.parse(JSON.stringify(this.dialogData))
- // this.$set(_data,'printtype','out')
- // localStorage.setItem('selectPrint_jjSelectPrintList', JSON.stringify(this.jjSelectPrintList))
- // }
- if (type == 1) {
- localStorage.setItem('selectPrint_jjSelectPrintList', JSON.stringify(this.jjSelectPrintList))
- window.open('../../../../static/weightCheck.html?type=2&radioType=' + radioType + '&selectEW=' + this
- .checked + '&selectEWDD=' + this.ddchecked)
- } else if (type == 2) {
- localStorage.setItem('selectPrint_jjSelectPrintList', JSON.stringify(this.excelPrintData))
- window.open('../../../../static/weightCheck.html?type=2&radioType=' + radioType)
- } else {
- console.log(this.dialogDataList)
- localStorage.setItem('print_in_data',JSON.stringify(this.dialogDataList).replace(/%/g, 'baifenhao'))
- // window.open('../../../../static/weightCheck.html?type=2&tableData=' + JSON.stringify(this.dialogDataList).replace(/%/g, 'baifenhao'))
- window.open('../../../../static/weightCheck.html?type=2&tableData=' )
- }
- },
- warehouseNameChange() {
- for(let i = 0 ; i < this.warehouseList.length; i++ ){
- if(this.warehouseName == this.warehouseList[i].warehouseName){
- this.warehouseId = this.warehouseList[i].id
- }
- }
- this.getList()
- },
- handleSizeChange(val) {
- console.log(`每页 ${val} 条`)
- this.pageSize = val
- this.getList()
- },
- handleCurrentChange(val) {
- this.currentPage = val
- console.log(`当前页: ${val}`)
- this.getList()
- },
- getList() {
- // 列表
- getweighingList({
- compId: localStorage.getItem('ws-pf_compId'),
- currentPage: this.currentPage,
- pageSize: this.pageSize,
- searchKeyWord: this.searchKeyWord,
- warehouseName: this.warehouseName,
- managementType: 1,
- serviceManagementType: this.warehousingType,
- statusType: this.choice,
- startDate: this.startDate,
- endDate: this.endDate,
- })
- .toPromise()
- .then((response) => {
- this.weighingRecordList = response.records
- this.deptBudgetTotal = response.total
- })
- .catch((response) => {
- // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
- })
- },
- },
- }
- </script>
- <style lang="scss" scoped>
- .toptitle {
- background: #f6f7fc;
- }
- .bg-left {
- padding-left: 30px;
- }
- .bg-right {
- text-align: right;
- padding: 16px 20px;
- }
- .top-title {
- width: 50%;
- display: flex;
- }
- .title {
- position: relative;
- }
- .title::before {
- content: '';
- display: inline-block;
- width: 5px;
- height: 30px;
- background: #5473e8;
- position: absolute;
- left: 0;
- }
- .container {
- overflow: scroll;
- height: 93vh;
- }
- .center {
- margin: auto;
- }
- .centertitle {
- display: flex;
- margin: 10px 0;
- }
- .temporary {
- line-height: 80px;
- font-size: 20px;
- color: #abaaaa;
- }
- /deep/.forData .cell {
- text-align: center;
- }
- //弹出框
- .eject-warehouse {
- font-size: 20px;
- margin-left: 15px;
- font-weight: 600;
- }
- .table_css {
- margin: 20px auto;
- tr {
- height: 50px;
- }
- .table_item {
- min-width: 70px;
- }
- td {
- text-align: center;
- font-size: 18px;
- font-weight: 600;
- }
- .el-select {
- width: 90%;
- }
- }
- .btn_topcss {
- margin-top: 15px;
- }
- .btn_css {
- width: 90px;
- margin-left: 10px;
- }
- .search_css {
- margin: 0 20px;
- }
- .mask {
- background: black;
- width: 100vw;
- height: 100vh;
- position: fixed;
- top: 0;
- z-index: 99;
- opacity: 0.3;
- }
- .print-type-title {
- text-align: center;
- font-size: 18px;
- margin: 20px;
- }
- .bottom-btn {
- display: flex;
- margin-top: 20px;
- justify-content: space-around;
- }
- .print-type-checkbox {
- // padding-left: 20px;
- }
- .print-type {
- position: absolute;
- top: 0;
- bottom: 0;
- left: 0;
- right: 0;
- margin: auto;
- width: 440px;
- height: 446px;
- background: white;
- border-radius: 10px;
- z-index: 999;
- }
- /deep/.el-radio-group {
- width: 100%;
- display: flex;
- }
- /deep/.el-radio__label {
- font-size: 20px;
- }
- /deep/.el-radio__inner {
- // background: red;
- height: 20px;
- width: 20px;
- }
- .label-width {
- width: 100%;
- text-align: center;
- font-size: 20px;
- }
- .show-excel {
- opacity: 0;
- }
- /deep/.base_header_layout .find.el-button--primary {
- width: 30px;
- border-top-left-radius: 0px;
- border-bottom-left-radius: 0px;
- }
- /deep/.base_header_layout .findinput input {
- border-top-right-radius: 0px;
- border-bottom-right-radius: 0px;
- }
- .ew-print {
- padding: 0 20px;
- margin-top: 10px;
- // display: flex;
- // justify-content: space-between;
- // align-content: center;
- .row {
- display: flex;
- margin-top: 10px;
- align-items: center;
- }
- }
- .sh-address {
- display: flex;
- }
- .print-type-ew {
- display: flex;
- justify-content: space-between;
- padding: 0 20px;
- /deep/.el-radio__label {
- font-size: 14px;
- }
- margin-top: 10px;
- }
- /deep/.el-table .cell {
- text-align: center;
- }
- .shdw-style {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 0 20px;
- margin-top: 20px;
- }
- </style>
|