weightCheckRecord.vue 60 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620
  1. // 检斤记录
  2. <template>
  3. <div class="container">
  4. <el-row class="toptitle">
  5. <el-col :span="12">
  6. <h2 class="bg-left title">检斤记录</h2>
  7. </el-col>
  8. <el-col :span="12" class="bg-right">
  9. <el-button type="primary" size="small" @click="returnsales()">
  10. <img width="6" height="10" style="vertical-align: bottom; margin-right: 3px"
  11. src="../../../public/img/lujing.png" alt="" />返回
  12. </el-button>
  13. </el-col>
  14. </el-row>
  15. <div class="center">
  16. <el-row>
  17. <el-col :span="6">
  18. <el-button :type="warehousingType == 1?'primary':''" size="small" @click="changeType(1)"
  19. class="btn_css btn_topcss">贸易入库</el-button>
  20. <el-button :type="warehousingType == 3?'primary':''" size="small" @click="changeType(3)"
  21. class="btn_css btn_topcss">收购入库</el-button>
  22. </el-col>
  23. <el-col :span="18" class="bg-right">
  24. <div style="display:flex">
  25. <el-select style='margin-right:5px;width:40%' v-model="warehouseName" placeholder="请选择仓库名" @change="warehouseNameChange">
  26. <el-option v-for="item in warehouseList" :key="item.id" :label="item.warehouseName"
  27. :value="item.warehouseName"></el-option>
  28. </el-select>
  29. <el-date-picker v-model="value2" type="daterange" align="right" unlink-panels range-separator="至"
  30. start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
  31. </el-date-picker>
  32. <el-input :placeholder="warehousingType == 1 ? '可按业务编号、合同编号/移库编号、车牌号查找':'可按业务编号、车牌号、客户名查找'" clearable
  33. v-model="searchKeyWord" class="search_css"></el-input>
  34. <!-- <el-input placeholder="可按业务编号、车牌号、客户名查找" clearable v-model="searchKeyWord"></el-input> -->
  35. <el-button type="primary" size="small" @click="lookup">查找</el-button>
  36. </div>
  37. </el-col>
  38. </el-row>
  39. <el-button :type="choice == ''?'primary':''" size="small" @click="screen()" class="btn_css">全部</el-button>
  40. <el-button :type="choice == 2?'primary':''" size="small" @click="screen(2)" class="btn_css">已称毛重</el-button>
  41. <el-button :type="choice == 3?'primary':''" size="small" @click="screen(3)" class="btn_css">已称皮重</el-button>
  42. <el-button size="small" @click="print('',1)">批量打印</el-button>
  43. <el-upload style="margin-top: -35px; margin-left:430px" class="upload-demo inline-block margin-right-10" action=""
  44. :on-change="importClick" :show-file-list="false"
  45. accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
  46. :auto-upload="false">
  47. <ws-button type="primary">导入(移库)</ws-button>
  48. </el-upload>
  49. <el-table class="forData" :data="weighingRecordList" style="width: 100%; margin-top: 20px" height="780"
  50. @selection-change="handleSelectionChange">
  51. <el-table-column key="0" type="selection" width="55"></el-table-column>
  52. <el-table-column key="1" type="index" label="序号" width="80">
  53. <template scope="scope">
  54. <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
  55. <span v-else>{{ scope.$index + 1 }}</span>
  56. </template>
  57. </el-table-column>
  58. <el-table-column key="inOutTaskNo" prop="inOutTaskNo" label="任务编号" width="170"></el-table-column>
  59. <el-table-column key="2" prop="number" label="业务编号" width="170"></el-table-column>
  60. <el-table-column key="3" prop="contractNo" label="合同编号/移库编号" v-if="warehousingType == 1" width="130">
  61. <template scope="scope">
  62. <span v-if="scope.row.contractNo">{{scope.row.contractNo}}</span>
  63. <span v-else>{{scope.row.moveTaskNo}}</span>
  64. </template>
  65. </el-table-column>
  66. <!--//moveTaskNo -->
  67. <el-table-column key="4" prop="customer" label="客户" v-if="warehousingType == 3"></el-table-column>
  68. <el-table-column key="5" prop="carNumber" label="车牌号"></el-table-column>
  69. <el-table-column key="6" prop="goodsName" label="货名"></el-table-column>
  70. <el-table-column key="7" prop="grossWeight" label="毛重(公斤)" width="100"></el-table-column>
  71. <el-table-column key="8" prop="tare" label="皮重(公斤)" width="100"></el-table-column>
  72. <el-table-column key="9" prop="buckleMiscellaneous" label="扣重(公斤)" width="100"></el-table-column>
  73. <el-table-column key="10" prop="netWeight" label="净重(公斤)" width="100"></el-table-column>
  74. <el-table-column key="11" prop="secretaryWeigher" label="司称员"></el-table-column>
  75. <el-table-column key="12" prop="grossDate" label="检斤时间"></el-table-column>
  76. <el-table-column key="13" prop="status" label="状态"></el-table-column>
  77. <el-table-column key="14" label="操作" min-width="400">
  78. <template scope="scope">
  79. <!-- <el-button size="small" @click="print(scope.row)">打印</el-button> -->
  80. <el-button @click="print(scope.row,2)" v-if="scope.row.status == '已称皮重' || scope.row.status == '已称毛重'" v-hasPermission="`acquisitionManagement.acquisitionWeight.print`">打印</el-button>
  81. <el-button @click="backInfo(scope.row)" v-if="scope.row.status == '已称皮重'">退回</el-button>
  82. <el-button v-hasPermission="`warehouseManagement.warehouse.warehouseInfo.huan`" class="putstorage" @click="exchange(scope.row)" v-if="scope.row.status == '已称毛重'|| scope.row.status == '已质检'">换仓</el-button>
  83. <el-button v-hasPermission="`warehouseManagement.warehouse.warehouseInfo.huan`" class="putstorage" @click="exchangeNo(scope.row)" v-if="scope.row.status == '已称毛重'|| scope.row.status == '已质检'">换任务号</el-button>
  84. <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>
  85. <el-button @click="deleteInfo(scope.row)" v-if="scope.row.status == '已称毛重'|| scope.row.status == '已质检'">删除</el-button>
  86. </template>
  87. </el-table-column>
  88. </el-table>
  89. </div>
  90. <div style="text-align: center; padding: 10px">
  91. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
  92. :page-size="deptCircularPage.pageSize" layout="total, sizes, prev, pager, next, jumper"
  93. :total="deptBudgetTotal">
  94. </el-pagination>
  95. </div>
  96. <div class="mask" v-show="isShowPrintType"></div>
  97. <div class="print-type" v-show="isShowPrintType">
  98. <div class="print-type-content">
  99. <div class="print-type-title">请选择打印纸张类型</div>
  100. <div class="print-type-checkbox">
  101. <!-- <el-radio-group v-model="radio">
  102. <el-radio label="A4" class="label-width" @change="selectType">A4</el-radio>
  103. <el-radio label="A5" class="label-width" @change="selectType">A5</el-radio>
  104. </el-radio-group> -->
  105. </div>
  106. <div class="shdw-style" v-if="checked||(!ddchecked&&!checked)">
  107. <div>收货单位:</div>
  108. <!-- <div>{{companyName}}</div> -->
  109. <el-select v-model="companyName" placeholder="请选择" style="width: 75%;">
  110. <el-option v-for="item in companyNameOptions" :key="item.value" :label="item.label" :value="item.value">
  111. </el-option>
  112. </el-select>
  113. </div>
  114. <div class="shdw-style" v-if="checked && serviceManagementType==3 || (!ddchecked && !checked && serviceManagementType==3)">
  115. <div>发货单位:</div>
  116. <!-- <div>{{companyName}}</div> -->
  117. <el-select v-model="customer" placeholder="请选择" style="width: 75%;">
  118. <el-option v-for="item in customerOptions" :key="item.value" :label="item.label" :value="item.value">
  119. </el-option>
  120. </el-select>
  121. </div>
  122. <div v-if="warehouseName=='鲅鱼圈金信库'&&printType==2||
  123. warehouseName=='白城内陆港'&&printType==2||
  124. warehouseName=='杜尔伯特家禾库'&&printType==2||
  125. warehouseName=='洮南兴旺库2023.10-2024.9'&&printType==2||
  126. warehouseName=='洮南新友谊兴旺库'&&printType==2||
  127. warehouseName=='甘南宏旗库'&&printType==2||
  128. warehouseName=='洮南向阳乡金昊'&&printType==2||
  129. warehouseName=='山东园丰库'&&printType==2">
  130. <div class="print-type-ew">
  131. <el-checkbox v-model="checked" @change="changeEw">打印额外票据</el-checkbox>
  132. <el-checkbox v-model="ddchecked" @change="changeEwDD">单独打印额外票据</el-checkbox>
  133. </div>
  134. <div class="ew-print" v-if="printSeparately">
  135. <div class="row">
  136. <div>额外客户姓名:</div>
  137. <!-- <div>{{companyName}}</div> -->
  138. <el-select v-model="ewCustomer" placeholder="请选择" style="width: 75%;">
  139. <el-option v-for="item in ewCustomerOptions" :key="item.value" :label="item.label" :value="item.value">
  140. </el-option>
  141. </el-select>
  142. </div>
  143. <div class="row">
  144. <div>额外收货单位:</div>
  145. <!-- <div>{{companyNameEW}}</div> -->
  146. <el-select v-model="companyNameEW" placeholder="请选择" style="width: 75%;">
  147. <el-option v-for="item in companyNameEWOptions" :key="item.value" :label="item.label"
  148. :value="item.value">
  149. </el-option>
  150. </el-select>
  151. </div>
  152. </div>
  153. </div>
  154. <div v-if="warehouseName=='鲅鱼圈金信库'&&printType==2">
  155. <div class="print-type-ew">
  156. <el-checkbox v-model="outchecked" @change="changeOut">是否打印出库</el-checkbox>
  157. </div>
  158. <div class="ew-print" v-if="printout">
  159. <div class="row">
  160. <div>出库发货单位:</div>
  161. <!-- <div>{{companyName}}</div> -->
  162. <el-select v-model="inshipments" placeholder="请选择" style="width: 75%;">
  163. <el-option v-for="item in ewCustomerOptions" :key="item.value" :label="item.label" :value="item.value">
  164. </el-option>
  165. </el-select>
  166. </div>
  167. <div class="row">
  168. <div>出库收货单位:</div>
  169. <!-- <div>{{companyNameEW}}</div> -->
  170. <el-select v-model="outshipments" placeholder="请选择" style="width: 75%;">
  171. <el-option v-for="item in companyNameEWOptions" :key="item.value" :label="item.label"
  172. :value="item.value">
  173. </el-option>
  174. </el-select>
  175. </div>
  176. <div class="row">
  177. <div>出库仓位号:</div>
  178. <!-- <div>{{companyNameEW}}</div> -->
  179. <el-select v-model="outbinNumber" placeholder="请选择仓位号" style="width: 75%;">
  180. <el-option v-for="item in binNumberList1" :key="item.id" :label="item.binNumber"
  181. :value="item.binNumber">
  182. </el-option>
  183. </el-select>
  184. </div>
  185. </div>
  186. </div>
  187. </div>
  188. <div class="bottom-btn">
  189. <el-button @click="typePrintClick">确定</el-button>
  190. <el-button @click="typePrintCannelClick">取消</el-button>
  191. </div>
  192. </div>
  193. <el-dialog width="70%" class="table-content" center :visible.sync="isShowPrint" title="粮食检斤单">
  194. <weightCheckPrint :tableData="dialogData"></weightCheckPrint>
  195. <div style="text-align:center">
  196. <el-button type="primary" @click="isShowPrint = false">关闭</el-button>
  197. <el-button type="primary" @click="printSmall">打印小票</el-button>
  198. <el-button type="primary" @click="printBig">打印单据</el-button>
  199. </div>
  200. </el-dialog>
  201. <el-dialog
  202. title="提示"
  203. :visible.sync="dialogVisible"
  204. width="30%"
  205. :before-close="handleClose">
  206. <div style="text-align:center">
  207. <el-select filterable clearable v-model="binNumber" placeholder="请选择仓位" class="typeselect"
  208. @change="binNumberChange">
  209. <el-option v-for="item in binnumberList" :key="item.binNumber" :label="item.binNumber"
  210. :value="item.binNumber" />
  211. </el-select>
  212. </div>
  213. <span slot="footer" class="dialog-footer">
  214. <el-button @click="dialogVisible = false">取 消</el-button>
  215. <el-button type="primary" @click="dialogVisibleconfirm">确 定</el-button>
  216. </span>
  217. </el-dialog>
  218. <el-dialog
  219. title="提示"
  220. :visible.sync="dialogVisible1"
  221. width="30%"
  222. :before-close="handleClose1">
  223. <div style="text-align:center">
  224. <el-form ref="form" label-width="110px">
  225. <el-form-item label="任务编号">
  226. <el-select filterable clearable v-model="inOutTaskNo" placeholder="请选择任务号" class="typeselect"
  227. @change="taskNoChange">
  228. <el-option v-for="item in taskNolist" :key="item.inOutTaskNo" :label="item.inOutTaskNo"
  229. :value="item.inOutTaskNo" />
  230. </el-select>
  231. </el-form-item>
  232. <el-form-item label="合同编号">
  233. <el-input v-model="contractNo" placeholder="合同编号" :disabled="disabled" maxlength="15">
  234. </el-input>
  235. </el-form-item>
  236. </el-form>
  237. </div>
  238. <span slot="footer" class="dialog-footer">
  239. <el-button @click="dialogVisible1 = false">取 消</el-button>
  240. <el-button type="primary" @click="dialogVisibleconfirm1">确 定</el-button>
  241. </span>
  242. </el-dialog>
  243. <el-dialog
  244. title="提示"
  245. :visible.sync="dialogVisible2"
  246. width="30%"
  247. :before-close="handleClose2">
  248. <div style="text-align:center">
  249. <el-form ref="form" label-width="110px">
  250. <el-form-item label="客户名">
  251. <el-select filterable clearable v-model="customerNumberCard" placeholder="请选择客户" class="typeselect"
  252. @change="customerChange">
  253. <el-option v-for="item in customerlist" :key="item.customerNumberCard" :label="item.customerName"
  254. :value="item.customerNumberCard" />
  255. </el-select>
  256. </el-form-item>
  257. <el-form-item label="手机号">
  258. <el-input v-model="customerPhone" placeholder="手机号" :disabled="disabled" maxlength="15">
  259. </el-input>
  260. </el-form-item>
  261. <el-form-item label="身份证号码">
  262. <el-input v-model="customerNumberCard" placeholder="身份证号码" :disabled="disabled" maxlength="20">
  263. </el-input>
  264. </el-form-item>
  265. </el-form>
  266. </div>
  267. <span slot="footer" class="dialog-footer">
  268. <el-button @click="dialogVisible2 = false">取 消</el-button>
  269. <el-button type="primary" @click="dialogVisibleconfirm2">确 定</el-button>
  270. </span>
  271. </el-dialog>
  272. </div>
  273. </template>
  274. <script>
  275. import {
  276. selectWarehouseSelf,
  277. getweighingList,
  278. getPrint,
  279. returnInfo,
  280. changeNo,
  281. changeTaskNo,
  282. changeCustomer,
  283. getcustomer,
  284. importWordYk,
  285. getweighingDelete,
  286. getbinNumber
  287. } from '@/model/houseSelfCollect/index'
  288. import {
  289. getReceiptTaskNo,
  290. } from '@/model/warehouse/index'
  291. import {
  292. getcomp
  293. } from '@/model/indexRx'
  294. import weightCheckPrint from './component/weightCheckPrint.vue'
  295. export default {
  296. components: {
  297. weightCheckPrint
  298. },
  299. data() {
  300. return {
  301. weighingRecordList: [],
  302. warehouseId: '',
  303. warehouseName: '',
  304. // goodsNameList: [],
  305. // goodsNameAllList: [],
  306. // binNoList: [],
  307. // binNumberId: '', //仓位Id
  308. // warehouseType: '',
  309. compId: '',
  310. outbinNumber:'',
  311. printType:0,
  312. binNumberList1:[],
  313. UserInfo:JSON.parse(localStorage.getItem('ws_login_getTenantInfoByUser')),
  314. pickerOptions: {
  315. shortcuts: [{
  316. text: '本周',
  317. onClick(picker) {
  318. const end = new Date()
  319. const start = new Date()
  320. var thisDay = start.getDay()
  321. var thisDate = start.getDate()
  322. if (thisDay != 0) {
  323. start.setDate(thisDate - thisDay)
  324. }
  325. picker.$emit('pick', [start, end])
  326. },
  327. },
  328. {
  329. text: '本月',
  330. onClick(picker) {
  331. const end = new Date()
  332. const start = new Date()
  333. start.setDate(1)
  334. picker.$emit('pick', [start, end])
  335. },
  336. },
  337. {
  338. text: '本季度',
  339. onClick(picker) {
  340. var oDate = new Date()
  341. var thisYear = oDate.getFullYear()
  342. var thisMonth = oDate.getMonth() + 1
  343. var n = Math.ceil(thisMonth / 3) // 季度
  344. var Month = n * 3 - 1
  345. var start = new Date(thisYear, Month - 2, 1)
  346. var end = new Date()
  347. picker.$emit('pick', [start, end])
  348. },
  349. },
  350. ],
  351. },
  352. //分页
  353. currentPage: 1,
  354. pageSize: 10,
  355. value2:[],
  356. deptCircularPage: {},
  357. deptBudgetTotal: 0,
  358. warehouseList: [], //仓库
  359. searchKeyWord: '',
  360. choice: '',
  361. warehousingType: 1,
  362. isShowPrint: false,
  363. dialogData: {},
  364. title: '',
  365. disabled: true,
  366. taskflag:2,
  367. modification: [],
  368. ewCustomerOptions: [{
  369. value: '天津建源供应链管理有限公司',
  370. label: '天津建源供应链管理有限公司'
  371. },{
  372. value: '黑龙江中天昊元贸易有限公司',
  373. label: '黑龙江中天昊元贸易有限公司'
  374. }, {
  375. value: '黑龙江利润元粮食贸易有限公司',
  376. label: '黑龙江利润元粮食贸易有限公司'
  377. }, {
  378. value: '黑龙江众利合粮食贸易有限公司',
  379. label: '黑龙江众利合粮食贸易有限公司'
  380. }, {
  381. value: '黑龙江鑫满仓粮食贸易有限公司',
  382. label: '黑龙江鑫满仓粮食贸易有限公司'
  383. },{
  384. value: '厦门建发物产有限公司',
  385. label: '厦门建发物产有限公司'
  386. },{
  387. value: '黑龙江谷香粮食贸易有限公司',
  388. label: '黑龙江谷香粮食贸易有限公司'
  389. },{
  390. value: '黑龙江秋收有限公司',
  391. label: '黑龙江秋收有限公司'
  392. }, {
  393. value: '黑龙江欣洋粮食贸易有限公司',
  394. label: '黑龙江欣洋粮食贸易有限公司'
  395. }, {
  396. value: '黑龙江益储益运粮食贸易有限公司',
  397. label: '黑龙江益储益运粮食贸易有限公司'
  398. }, {
  399. value: '黑龙江启兴粮食贸易有限公司',
  400. label: '黑龙江启兴粮食贸易有限公司'
  401. }, {
  402. value: '吉林中翰兴粮食贸易有限公司',
  403. label: '吉林中翰兴粮食贸易有限公司'
  404. }, {
  405. value: '黑龙江中天绿粮供应链服务有限公司',
  406. label: '黑龙江中天绿粮供应链服务有限公司'
  407. }, {
  408. value: '吉林昊友城元粮食贸易有限公司',
  409. label: '吉林昊友城元粮食贸易有限公司'
  410. }, {
  411. value: '黑龙江中天昊元供应链有限公司',
  412. label: '黑龙江中天昊元供应链有限公司'
  413. }],
  414. companyNameOptions: [{
  415. value: '黑龙江中天昊元贸易有限公司',
  416. label: '黑龙江中天昊元贸易有限公司'
  417. }, {
  418. value: '黑龙江利润元粮食贸易有限公司',
  419. label: '黑龙江利润元粮食贸易有限公司'
  420. }, {
  421. value: '黑龙江众利合粮食贸易有限公司',
  422. label: '黑龙江众利合粮食贸易有限公司'
  423. }, {
  424. value: '黑龙江鑫满仓粮食贸易有限公司',
  425. label: '黑龙江鑫满仓粮食贸易有限公司'
  426. },{
  427. value: '黑龙江谷香粮食贸易有限公司',
  428. label: '黑龙江谷香粮食贸易有限公司'
  429. },{
  430. value: '黑龙江秋收有限公司',
  431. label: '黑龙江秋收有限公司'
  432. }, {
  433. value: '黑龙江欣洋粮食贸易有限公司',
  434. label: '黑龙江欣洋粮食贸易有限公司'
  435. }, {
  436. value: '黑龙江益储益运粮食贸易有限公司',
  437. label: '黑龙江益储益运粮食贸易有限公司'
  438. }, {
  439. value: '黑龙江启兴粮食贸易有限公司',
  440. label: '黑龙江启兴粮食贸易有限公司'
  441. }, {
  442. value: '吉林中翰兴粮食贸易有限公司',
  443. label: '吉林中翰兴粮食贸易有限公司'
  444. }, {
  445. value: '黑龙江中天绿粮供应链服务有限公司',
  446. label: '黑龙江中天绿粮供应链服务有限公司'
  447. }, {
  448. value: '吉林昊友城元粮食贸易有限公司',
  449. label: '吉林昊友城元粮食贸易有限公司'
  450. }, {
  451. value: '黑龙江中天昊元供应链有限公司',
  452. label: '黑龙江中天昊元供应链有限公司'
  453. }],
  454. companyNameEWOptions: [{
  455. value: '天津建源供应链管理有限公司',
  456. label: '天津建源供应链管理有限公司'
  457. },{
  458. value: '厦门建发物产有限公司',
  459. label: '厦门建发物产有限公司'
  460. }],
  461. companyName: '黑龙江中天昊元贸易有限公司',
  462. companyNameEW: '厦门建发物产有限公司',
  463. ewCustomer: '黑龙江利润元粮食贸易有限公司',
  464. inshipments:'黑龙江中天昊元贸易有限公司',
  465. outshipments:'黑龙江中天昊元贸易有限公司',
  466. ewradio: '',
  467. ddchecked: false,
  468. checked: false,
  469. outchecked:false,
  470. customerOptions:[],
  471. customer:'',
  472. isShowPrintType: false,
  473. dialogDataList: [],
  474. jjSelectPrintList: [],
  475. outPrintList: [],
  476. printSeparately: false,
  477. printout:false,
  478. onePrint: false,
  479. startDate:'',
  480. endDate:'',
  481. dialogVisible:false,
  482. dialogVisible1:false,
  483. dialogVisible2:false,
  484. binNumber:'',
  485. binnumberList:[],
  486. taskNolist:[],
  487. customerlist:[],
  488. cangweiNum:'',
  489. contractNum:'',
  490. inOutTaskNo:'',
  491. customerName:'',
  492. contractNo:'',
  493. customerPhone:'',
  494. customerNumberCard:'',
  495. positionId:'',
  496. warehouseInOutDetail:{},
  497. serviceManagementType:1,
  498. }
  499. },
  500. activated() {
  501. //仓库
  502. console.log(localStorage.getItem('compNameoptions'))
  503. getcomp({userMobilePhone:JSON.parse(localStorage.getItem('ws_login_getTenantInfoByUser')).loginInfo.userMobilePhone}).toPromise().then((res)=>{
  504. this.compNameoptions=res
  505. if (this.compNameoptions.length>0) {
  506. var company=this.compNameoptions
  507. var extra=company.filter((item)=>{
  508. return item!='黑龙江中天昊元贸易有限公司'
  509. &&item!='黑龙江利润元粮食贸易有限公司'
  510. &&item!= '黑龙江众利合粮食贸易有限公司'
  511. &&item!='黑龙江鑫满仓粮食贸易有限公司'
  512. &&item!='黑龙江谷香粮食贸易有限公司'
  513. &&item!='黑龙江秋收有限公司'
  514. &&item!= '黑龙江欣洋粮食贸易有限公司'
  515. &&item!='黑龙江益储益运粮食贸易有限公司'
  516. &&item!='黑龙江启兴粮食贸易有限公司'
  517. })
  518. if(extra.length>0){
  519. this.companyNameOptions=[
  520. {
  521. value: '黑龙江中天昊元贸易有限公司',
  522. label: '黑龙江中天昊元贸易有限公司'
  523. }, {
  524. value: '黑龙江利润元粮食贸易有限公司',
  525. label: '黑龙江利润元粮食贸易有限公司'
  526. }, {
  527. value: '黑龙江众利合粮食贸易有限公司',
  528. label: '黑龙江众利合粮食贸易有限公司'
  529. }, {
  530. value: '黑龙江鑫满仓粮食贸易有限公司',
  531. label: '黑龙江鑫满仓粮食贸易有限公司'
  532. },{
  533. value: '黑龙江欣洋粮食贸易有限公司',
  534. label: '黑龙江欣洋粮食贸易有限公司'
  535. },{
  536. value: '黑龙江谷香粮食贸易有限公司',
  537. label: '黑龙江谷香粮食贸易有限公司'
  538. },{
  539. value: '黑龙江秋收有限公司',
  540. label: '黑龙江秋收有限公司'
  541. }, {
  542. value: '黑龙江益储益运粮食贸易有限公司',
  543. label: '黑龙江益储益运粮食贸易有限公司'
  544. }, {
  545. value: '黑龙江启兴粮食贸易有限公司',
  546. label: '黑龙江启兴粮食贸易有限公司'
  547. }, {
  548. value: '吉林中翰兴粮食贸易有限公司',
  549. label: '吉林中翰兴粮食贸易有限公司'
  550. }, {
  551. value: '黑龙江中天绿粮供应链服务有限公司',
  552. label: '黑龙江中天绿粮供应链服务有限公司'
  553. }, {
  554. value: '吉林昊友城元粮食贸易有限公司',
  555. label: '吉林昊友城元粮食贸易有限公司'
  556. }, {
  557. value: '黑龙江中天昊元供应链有限公司',
  558. label: '黑龙江中天昊元供应链有限公司'
  559. }]
  560. this.ewCustomerOptions= [
  561. {
  562. value: '天津建源供应链管理有限公司',
  563. label: '天津建源供应链管理有限公司'
  564. },{
  565. value: '黑龙江中天昊元贸易有限公司',
  566. label: '黑龙江中天昊元贸易有限公司'
  567. }, {
  568. value: '黑龙江利润元粮食贸易有限公司',
  569. label: '黑龙江利润元粮食贸易有限公司'
  570. }, {
  571. value: '黑龙江众利合粮食贸易有限公司',
  572. label: '黑龙江众利合粮食贸易有限公司'
  573. }, {
  574. value: '黑龙江鑫满仓粮食贸易有限公司',
  575. label: '黑龙江鑫满仓粮食贸易有限公司'
  576. },{
  577. value: '黑龙江欣洋粮食贸易有限公司',
  578. label: '黑龙江欣洋粮食贸易有限公司'
  579. },{
  580. value: '黑龙江谷香粮食贸易有限公司',
  581. label: '黑龙江谷香粮食贸易有限公司'
  582. },{
  583. value: '黑龙江秋收有限公司',
  584. label: '黑龙江秋收有限公司'
  585. }, {
  586. value: '黑龙江益储益运粮食贸易有限公司',
  587. label: '黑龙江益储益运粮食贸易有限公司'
  588. }, {
  589. value: '黑龙江启兴粮食贸易有限公司',
  590. label: '黑龙江启兴粮食贸易有限公司'
  591. }, {
  592. value: '吉林中翰兴粮食贸易有限公司',
  593. label: '吉林中翰兴粮食贸易有限公司'
  594. }, {
  595. value: '黑龙江中天绿粮供应链服务有限公司',
  596. label: '黑龙江中天绿粮供应链服务有限公司'
  597. }, {
  598. value: '吉林昊友城元粮食贸易有限公司',
  599. label: '吉林昊友城元粮食贸易有限公司'
  600. }, {
  601. value: '黑龙江中天昊元供应链有限公司',
  602. label: '黑龙江中天昊元供应链有限公司'
  603. }]
  604. this.companyNameEWOptions=[
  605. {
  606. value: '天津建源供应链管理有限公司',
  607. label: '天津建源供应链管理有限公司'
  608. },{
  609. value: '黑龙江中天昊元贸易有限公司',
  610. label: '黑龙江中天昊元贸易有限公司'
  611. }, {
  612. value: '黑龙江利润元粮食贸易有限公司',
  613. label: '黑龙江利润元粮食贸易有限公司'
  614. }, {
  615. value: '黑龙江众利合粮食贸易有限公司',
  616. label: '黑龙江众利合粮食贸易有限公司'
  617. }, {
  618. value: '黑龙江鑫满仓粮食贸易有限公司',
  619. label: '黑龙江鑫满仓粮食贸易有限公司'
  620. },{
  621. value: '黑龙江欣洋粮食贸易有限公司',
  622. label: '黑龙江欣洋粮食贸易有限公司'
  623. },{
  624. value: '黑龙江谷香粮食贸易有限公司',
  625. label: '黑龙江谷香粮食贸易有限公司'
  626. },{
  627. value: '黑龙江秋收有限公司',
  628. label: '黑龙江秋收有限公司'
  629. }, {
  630. value: '黑龙江益储益运粮食贸易有限公司',
  631. label: '黑龙江益储益运粮食贸易有限公司'
  632. }, {
  633. value: '黑龙江启兴粮食贸易有限公司',
  634. label: '黑龙江启兴粮食贸易有限公司'
  635. }, {
  636. value: '黑龙江中天绿粮供应链服务有限公司',
  637. label: '黑龙江中天绿粮供应链服务有限公司'
  638. }, {
  639. value: '吉林昊友城元粮食贸易有限公司',
  640. label: '吉林昊友城元粮食贸易有限公司'
  641. }, {
  642. value: '郑州未来集团有限公司',
  643. label: '郑州未来集团有限公司'
  644. }, {
  645. value: '黑龙江中天昊元供应链有限公司',
  646. label: '黑龙江中天昊元供应链有限公司'
  647. }]
  648. if(localStorage.getItem('print_company_name')){
  649. this.companyName=localStorage.getItem('print_company_name')
  650. }else{
  651. this.companyName=extra[0]
  652. }
  653. if(localStorage.getItem('print_company_name_ew')){
  654. this.companyNameEW=localStorage.getItem('print_company_name_ew')
  655. }else{
  656. this.companyNameEW=extra[0]
  657. }
  658. if(localStorage.getItem('print_customer_name_ew')){
  659. this.ewCustomer=localStorage.getItem('print_customer_name_ew')
  660. }else{
  661. this.ewCustomer=extra[0]
  662. }
  663. for (let i = 0; i < extra.length; i++) {
  664. this.ewCustomerOptions.push({value: extra[i],label:extra[i]})
  665. this.companyNameOptions.push({value: extra[i],label:extra[i]})
  666. this.companyNameEWOptions.push({value: extra[i],label:extra[i]})
  667. }
  668. }
  669. }
  670. })
  671. selectWarehouseSelf({
  672. compId: localStorage.getItem('ws-pf_compId'),
  673. })
  674. .toPromise()
  675. .then((response) => {
  676. this.warehouseList = response
  677. })
  678. this.compId = localStorage.getItem('ws-pf_compId')
  679. this.warehousingType = this.$route.query.inWarehouseType
  680. this.warehouseName = this.$route.query.warehouseName //仓库名
  681. this.warehouseId = this.$route.query.warehouseId
  682. this.getList()
  683. },
  684. methods: {
  685. importClick(file, fileList) {
  686. this.fileTemp = file.raw
  687. let fileName = file.raw.name
  688. let fileType = fileName.substring(fileName.lastIndexOf('.') + 1)
  689. // 判断上传文件格式
  690. if (this.fileTemp) {
  691. if (fileType == 'xlsx' || fileType == 'xls') {
  692. this.importf(this.fileTemp)
  693. } else {
  694. this.$message({
  695. type: 'warning',
  696. message: '附件格式错误,请删除后重新上传!',
  697. })
  698. }
  699. } else {
  700. this.$message({
  701. type: 'warning',
  702. message: '请上传附件!',
  703. })
  704. }
  705. },
  706. importf(obj) {
  707. this.excelFreightspace = []
  708. // this.dialogVisible = true;
  709. let _this = this;
  710. let inputDOM = this.$refs.inputer; // 通过DOM取文件数据
  711. this.file = event.currentTarget.files[0];
  712. var rABS = false; //是否将文件读取为二进制字符串
  713. var f = this.file;
  714. var reader = new FileReader();
  715. //if (!FileReader.prototype.readAsBinaryString) {
  716. FileReader.prototype.readAsBinaryString = function(f) {
  717. var binary = '';
  718. var rABS = false; //是否将文件读取为二进制字符串
  719. var pt = this;
  720. var wb; //读取完成的数据
  721. var outdata;
  722. var reader = new FileReader();
  723. reader.onload = function(e) {
  724. var bytes = new Uint8Array(reader.result);
  725. var length = bytes.byteLength;
  726. for (var i = 0; i < length; i++) {
  727. binary += String.fromCharCode(bytes[i]);
  728. }
  729. var XLSX = require('xlsx');
  730. if (rABS) {
  731. wb = XLSX.read(btoa(fixdata(binary)), { //手动转化
  732. type: 'base64',
  733. cellDates: true
  734. });
  735. } else {
  736. wb = XLSX.read(binary, {
  737. type: 'binary'
  738. });
  739. }
  740. // outdata就是你想要的东西 excel导入的数据
  741. outdata = XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]]);
  742. // excel 数据再处理
  743. let arr = []
  744. outdata.map(v => {
  745. // let jsonString = JSON.stringify(v).replace(/\*/g, '').replace(/\s/ig,'');
  746. let jsonString = JSON.stringify(v).replace(/\//g, '').replace(/\s/ig, '');
  747. v = JSON.parse(jsonString);
  748. let obj = {}
  749. //xxx代表列名
  750. obj.number = v.业务编号
  751. obj.inOutTaskNo = v.移库任务编号
  752. obj.outType = v.运输方式
  753. obj.carNumber = v.车牌号
  754. obj.grossWeight = v.毛重
  755. obj.tare = v.皮重
  756. obj.netWeight = v.净重
  757. obj.grossDate = _this.formatDate(v.入库日期, '-')
  758. _this.excelFreightspace.push(obj)
  759. })
  760. if (_this.excelFreightspace) {
  761. importWordYk({
  762. warehouseName: _this.warehouseName,
  763. weighingManagementList: _this.excelFreightspace
  764. }).toPromise()
  765. .then((response) => {
  766. if (response == 'ok') {
  767. this.$notify({
  768. title: '成功',
  769. message: '导入成功',
  770. type: 'success'
  771. });
  772. _this.getList()
  773. }
  774. })
  775. }
  776. }
  777. reader.readAsArrayBuffer(f);
  778. }
  779. if (rABS) {
  780. reader.readAsArrayBuffer(f);
  781. } else {
  782. reader.readAsBinaryString(f);
  783. }
  784. },
  785. formatDate(numb, format) {
  786. const old = numb - 1;
  787. const t = Math.round((old - Math.floor(old)) * 24 * 60 * 60);
  788. const time = new Date(1900, 0, old, 0, 0, t)
  789. const year = time.getFullYear();
  790. const month = time.getMonth() + 1;
  791. const date = time.getDate();
  792. return year + format + (month < 10 ? '0' + month : month) + format + (date < 10 ? '0' + date : date) +
  793. ' 00:00:00'
  794. },
  795. binNumberChange(e){
  796. this.binNumber = e
  797. for(let i = 0 ; i < this.binnumberList.length ; i++){
  798. if(this.binNumber == this.binnumberList[i].binNumber){
  799. this.positionId = this.binnumberList[i].id
  800. }
  801. }
  802. },
  803. taskNoChange(e){
  804. this.inOutTaskNo = e
  805. for(let i = 0 ; i < this.taskNolist.length ; i++){
  806. if(this.inOutTaskNo == this.taskNolist[i].inOutTaskNo){
  807. if(this.taskNolist[i].contractNo){
  808. this.contractNo = this.taskNolist[i].contractNo
  809. }
  810. else{
  811. this.contractNo = this.taskNolist[i].moveTaskNo
  812. }
  813. }
  814. }
  815. },
  816. customerChange(e){
  817. for(let i = 0 ; i < this.customerlist.length ; i++){
  818. if(this.customerNumberCard == this.customerlist[i].customerNumberCard){
  819. this.customerPhone = this.customerlist[i].customerPhone
  820. this.customerName = this.customerlist[i].customerName
  821. }
  822. }
  823. },
  824. handleClose(){
  825. this.dialogVisible = false
  826. },
  827. handleClose1(){
  828. this.inOutTaskNo=''
  829. this.dialogVisible1 = false
  830. },
  831. handleClose2(){
  832. this.customerName=''
  833. this.customerPhone=''
  834. this.customerNumberCard=''
  835. this.dialogVisible2 = false
  836. },
  837. dialogVisibleconfirm(){
  838. if(this.binNumber == this.cangweiNum){
  839. this.$message.error('已是该仓位无需修改')
  840. return
  841. }
  842. this.$confirm(`确定修改仓位?`, {
  843. cancelButtonText: '取消',
  844. confirmButtonText: '确定',
  845. type: 'warning',
  846. })
  847. .then(() => {
  848. // let _obj = JSON.parse(this.warehouseInOutDetail)
  849. // _obj.binNumber = this.binNumber
  850. changeNo({id:this.id,changePositionId:this.positionId,changeBinNumer:this.binNumber}).toPromise()
  851. .then((response) => {
  852. this.$notify.success({
  853. title: '成功',
  854. message: '修改仓位成功',
  855. })
  856. this.getList()
  857. this.dialogVisible=false
  858. })
  859. })
  860. .catch(() => {
  861. return false
  862. })
  863. },
  864. dialogVisibleconfirm1(){
  865. // if(this.contractNo == this.contractNum){
  866. // this.$message.error('已是该任务号无需修改')
  867. // return
  868. // }
  869. this.$confirm(`确定修改任务号?`, {
  870. cancelButtonText: '取消',
  871. confirmButtonText: '确定',
  872. type: 'warning',
  873. })
  874. .then(() => {
  875. changeTaskNo({id:this.id,inOutTaskNo:this.inOutTaskNo,contractNo:this.contractNo}).toPromise()
  876. .then((response) => {
  877. this.$notify.success({
  878. title: '成功',
  879. message: '修改任务号成功',
  880. })
  881. this.getList()
  882. this.inOutTaskNo=''
  883. this.dialogVisible1=false
  884. })
  885. })
  886. .catch(() => {
  887. return false
  888. })
  889. },
  890. dialogVisibleconfirm2(){
  891. this.$confirm(`确定修改客户?`, {
  892. cancelButtonText: '取消',
  893. confirmButtonText: '确定',
  894. type: 'warning',
  895. })
  896. .then(() => {
  897. changeCustomer({id:this.id,customer:this.customerName,customerPhone:this.customerPhone,customerNumberCard:this.customerNumberCard}).toPromise()
  898. .then((response) => {
  899. this.$notify.success({
  900. title: '成功',
  901. message: '修改客户成功',
  902. })
  903. this.getList()
  904. this.customerName=''
  905. this.customerPhone=''
  906. this.customerNumberCard=''
  907. this.dialogVisible2=false
  908. })
  909. })
  910. .catch(() => {
  911. return false
  912. })
  913. },
  914. exchange(row){
  915. for(let i = 0 ; i < this.warehouseList.length; i++ ){
  916. if(this.warehouseName == this.warehouseList[i].warehouseName){
  917. this.binnumberList = this.warehouseList[i].positionInfos
  918. }
  919. }
  920. this.id = row.id
  921. this.binNumber = row.binNumber
  922. this.cangweiNum = row.binNumber
  923. this.dialogVisible = true
  924. },
  925. exchangeNo(row){
  926. if (row.serviceManagementType == 1) {
  927. this.taskflag=2
  928. } else {
  929. this.taskflag=3
  930. }
  931. getReceiptTaskNo({
  932. flag: this.taskflag,
  933. warehouseName: this.warehouseName,
  934. })
  935. .toPromise()
  936. .then((response) => {
  937. this.taskNolist = response
  938. })
  939. this.id = row.id
  940. this.contractNo = row.contractNo
  941. this.contractNum = row.contractNo
  942. this.dialogVisible1 = true
  943. },
  944. exchangeName(row){
  945. getcustomer({
  946. warehouseId: this.warehouseId,
  947. goodsName: row.goodsName
  948. })
  949. .toPromise()
  950. .then((response) => {
  951. this.customerlist = response
  952. })
  953. this.id = row.id
  954. this.dialogVisible2 = true
  955. },
  956. backInfo(row){
  957. this.$confirm('确定要退回该信息?', '提示', {
  958. confirmButtonText: '确定',
  959. cancelButtonText: '取消',
  960. type: 'warning',
  961. })
  962. .then(() => {
  963. returnInfo(row)
  964. .toPromise()
  965. .then((response) => {
  966. this.$notify.success({
  967. title: '成功',
  968. message: '退回成功!',
  969. })
  970. this.getList()
  971. })
  972. .catch((response) => {
  973. // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  974. })
  975. })
  976. },
  977. deleteInfo(row){
  978. //删除
  979. this.$confirm('确定删除检斤信息?', '提示', {
  980. confirmButtonText: '确定',
  981. cancelButtonText: '取消',
  982. type: 'warning',
  983. })
  984. .then(() => {
  985. getweighingDelete({
  986. id: row.id,
  987. })
  988. .toPromise()
  989. .then((response) => {
  990. this.$notify.success({
  991. title: '成功',
  992. message: '删除成功',
  993. })
  994. this.getList()
  995. })
  996. .catch((response) => {
  997. // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  998. })
  999. })
  1000. .catch(() => {
  1001. return false
  1002. })
  1003. },
  1004. typePrintCannelClick() {
  1005. this.onePrint = false //单个打印标识
  1006. this.dialogDataList = [] //打个打印取消时数组至空
  1007. this.isShowPrintType = false
  1008. },
  1009. handleSelectionChange(val) {
  1010. this.modification = val;
  1011. },
  1012. // batchPrint(){
  1013. // if(this.modification.length == 0){
  1014. // this.$message.error("请选择批量打印的条目!")
  1015. // return
  1016. // }
  1017. // // this.isShowPrintType = true
  1018. // },
  1019. changeEw(e) {
  1020. this.ddchecked = false
  1021. if (e) {
  1022. this.printSeparately = true
  1023. } else {
  1024. this.printSeparately = false
  1025. }
  1026. },
  1027. changeEwDD(e) {
  1028. this.checked = false
  1029. if (e) {
  1030. this.printSeparately = true
  1031. } else {
  1032. this.printSeparately = false
  1033. }
  1034. },
  1035. changeOut(e) {
  1036. if (e) {
  1037. this.printout = true
  1038. } else {
  1039. this.printout = false
  1040. }
  1041. },
  1042. dateFormat(fmt, date) {
  1043. let ret
  1044. const opt = {
  1045. 'Y+': date.getFullYear().toString(), // 年
  1046. 'm+': (date.getMonth() + 1).toString(), // 月
  1047. 'd+': date.getDate().toString(), // 日
  1048. 'H+': date.getHours().toString(), // 时
  1049. // "M+": date.getMinutes().toString(), // 分
  1050. // "S+": date.getSeconds().toString() // 秒
  1051. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  1052. }
  1053. for (let k in opt) {
  1054. ret = new RegExp('(' + k + ')').exec(fmt)
  1055. if (ret) {
  1056. fmt = fmt.replace(
  1057. ret[1],
  1058. ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
  1059. )
  1060. }
  1061. }
  1062. return fmt
  1063. },
  1064. lookup() {
  1065. if (this.value2&&this.value2.length>0) {
  1066. this.startDate = this.dateFormat('YYYY-mm-dd', this.value2[0])
  1067. this.endDate = this.dateFormat('YYYY-mm-dd', this.value2[1])
  1068. } else {
  1069. this.startDate = ''
  1070. this.endDate = ''
  1071. }
  1072. this.currentPage = 1
  1073. this.getList()
  1074. },
  1075. changeType(val) {
  1076. this.warehousingType = val
  1077. this.getList()
  1078. },
  1079. screen(num) {
  1080. this.choice = num
  1081. this.getList()
  1082. },
  1083. returnsales() {
  1084. this.$router.go(-1)
  1085. },
  1086. async typePrintClick(type) {
  1087. localStorage.setItem('print_company_name',this.companyName)
  1088. localStorage.setItem('print_company_name_ew',this.companyNameEW)
  1089. localStorage.setItem('print_customer_name_ew',this.ewCustomer)
  1090. localStorage.setItem('print_out',this.outchecked)
  1091. if (this.onePrint) { //判断是否是单个打印
  1092. getPrint({
  1093. id: this.idPrint
  1094. })
  1095. .toPromise()
  1096. .then((response) => {
  1097. // 判断是否打印出库
  1098. this.dialogDataList = [] //点击确认时先清空要打印的数组
  1099. this.dialogData = response
  1100. if (response.compName == '黑龙江秋收有限公司') {
  1101. this.dialogData.compName = '黑龙江中天昊元贸易有限公司'
  1102. }else{
  1103. this.dialogData.compName = this.companyName
  1104. }
  1105. this.dialogData.customer=this.customer
  1106. if (this.checked) {
  1107. if(this.dialogData&&!this.dialogData.customer&&this.dialogData.contractManagement){
  1108. this.dialogData.customer = this.dialogData.contractManagement.seller
  1109. }
  1110. this.dialogDataList.push(this.dialogData)
  1111. var _datas = JSON.stringify(this.dialogData)
  1112. _datas = JSON.parse(_datas)
  1113. _datas.compName = this.companyNameEW;
  1114. _datas.customer = this.ewCustomer
  1115. this.dialogDataList.push(_datas)
  1116. } else if (this.ddchecked) {
  1117. _datas = this.dialogData
  1118. _datas.compName = this.companyNameEW;
  1119. _datas.customer = this.ewCustomer
  1120. this.dialogDataList.push(_datas)
  1121. }else {
  1122. this.dialogData.compName = this.companyName
  1123. if(this.dialogData&&this.dialogData.contractManagement&& this.warehousingType != 3&&this.dialogData.inOutType=='退库'){
  1124. this.dialogData.customer = this.dialogData.contractManagement.buyer
  1125. }
  1126. else if(this.dialogData&&this.dialogData.contractManagement&& this.warehousingType != 3&&this.dialogData.inOutType!='退库'){
  1127. this.dialogData.customer = this.dialogData.contractManagement.seller
  1128. }
  1129. this.dialogDataList.push(this.dialogData)
  1130. }
  1131. if(this.outchecked){
  1132. if(!this.checked&&!this.ddchecked){
  1133. this.dialogDataList=[]
  1134. var _data = JSON.parse(JSON.stringify(this.dialogData))
  1135. this.$set(_data,'printtype','out')
  1136. _data.compName = this.outshipments;
  1137. _data.customer = this.inshipments
  1138. _data.binNumber = this.outbinNumber
  1139. this.dialogDataList.push(_data)
  1140. }else{
  1141. var _data = JSON.parse(JSON.stringify(this.dialogData))
  1142. this.$set(_data,'printtype','out')
  1143. _data.compName = this.outshipments;
  1144. _data.customer = this.inshipments
  1145. _data.binNumber = this.outbinNumber
  1146. this.dialogDataList.push(_data)
  1147. }
  1148. }
  1149. this.printBig('', this.radio)
  1150. })
  1151. .catch((response) => {
  1152. // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  1153. })
  1154. } else {
  1155. // if (this.isExcelPrint) {
  1156. // this.printBig(2, this.radio)
  1157. // this.isExcelPrint = false
  1158. // } else {
  1159. this.jjSelectPrintList = []
  1160. let index1 = 0;
  1161. for (let i = 0; i < this.modification.length; i++) {
  1162. await getPrint({
  1163. id: this.modification[i].id
  1164. })
  1165. .toPromise()
  1166. .then((response) => {
  1167. index1++;
  1168. response.compName = this.companyName
  1169. if (response.compName == '黑龙江秋收有限公司') {
  1170. response.compName = '黑龙江中天昊元贸易有限公司'
  1171. }
  1172. response.customer=this.customer
  1173. this.jjSelectPrintList.push(response)
  1174. if (index1 == this.modification.length) {
  1175. this.printBig(1, this.radio)
  1176. }
  1177. })
  1178. .catch((response) => {})
  1179. }
  1180. // }
  1181. }
  1182. },
  1183. makeEWjjSelectPrintList() {
  1184. let _selectPrint_EWjjSelectPrintList = JSON.parse(JSON.stringify(this.jjSelectPrintList));
  1185. for (let i = 0; i < _selectPrint_EWjjSelectPrintList.length; i++) {
  1186. let _data = _selectPrint_EWjjSelectPrintList[i];
  1187. _data.compName = this.companyNameEW;
  1188. _data.customer = this.ewCustomer
  1189. }
  1190. localStorage.setItem('selectPrint_EWjjSelectPrintList', JSON.stringify(_selectPrint_EWjjSelectPrintList))
  1191. },
  1192. check(name, type) {
  1193. if (type == 1) {
  1194. for (var _tmp = 0; _tmp < this.ewCustomerOptions.length; _tmp++) {
  1195. if (this.ewCustomerOptions[_tmp].label == name) {
  1196. return false
  1197. }
  1198. }
  1199. return true
  1200. } else if (type == 2) {
  1201. for (var _tmp = 0; _tmp < this.companyNameEWOptions.length; _tmp++) {
  1202. if (this.companyNameEWOptions[_tmp].label == name) {
  1203. return false
  1204. }
  1205. }
  1206. return true
  1207. } else if (type == 3) {
  1208. for (var _tmp = 0; _tmp < this.companyNameOptions.length; _tmp++) {
  1209. console.log(name)
  1210. if (this.companyNameOptions[_tmp].label == name) {
  1211. return false
  1212. }
  1213. }
  1214. return true
  1215. }
  1216. },
  1217. async print(row, type, pageType) {
  1218. this.printType=type
  1219. //打印
  1220. if (type == 1) { //
  1221. if (this.modification.length == 0) {
  1222. this.$message.error('请选择批量打印的条目!')
  1223. return
  1224. }
  1225. for (let _num = 0; _num < this.modification.length; _num++) {
  1226. this.serviceManagementType=this.modification[_num].serviceManagementType
  1227. if(this.modification[_num].serviceManagementType == 3){
  1228. this.customerOptions=[{label:this.modification[_num].customer,value:this.modification[_num].customer}]
  1229. this.customerOptions.push({label:this.modification[_num].seller,value:this.modification[_num].seller})
  1230. this.customer=this.modification[_num].customer
  1231. }
  1232. 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=='佳屹农仓储库')){
  1233. if (this.modification[_num].seller && this.modification[_num].buyer) {
  1234. let cang = {}
  1235. cang.value = this.modification[_num].seller
  1236. cang.label = this.modification[_num].seller
  1237. let cang1 = {}
  1238. cang1.value = this.modification[_num].buyer
  1239. cang1.label = this.modification[_num].buyer
  1240. // if (this.check(this.modification[_num].seller, 1)) {
  1241. // this.ewCustomerOptions.push(cang)
  1242. // }
  1243. if(this.warehouseName=='佳屹农仓储库'){
  1244. if (this.check(this.modification[_num].buyer, 3)) {
  1245. this.companyNameOptions.push(cang1)
  1246. this.companyName=this.modification[_num].buyer
  1247. }
  1248. }else{
  1249. if (this.check(this.modification[_num].buyer, 2)) {
  1250. this.ewCustomerOptions.push(cang1)
  1251. }
  1252. }
  1253. if (this.check(this.modification[_num].seller, 1)) {
  1254. this.companyNameEWOptions.push(cang)
  1255. }
  1256. }
  1257. }
  1258. }
  1259. this.isShowPrintType = true
  1260. } else {
  1261. this.serviceManagementType=row.serviceManagementType
  1262. if(row.serviceManagementType == 3){
  1263. this.customerOptions=[{label:row.customer,value:row.customer}]
  1264. this.customerOptions.push({label:row.seller,value:row.seller})
  1265. this.customer=row.customer
  1266. console.log(this.customerOptions,this.customer,222222)
  1267. }
  1268. 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=='佳屹农仓储库')) {
  1269. if (row.seller && row.buyer) {
  1270. let cang = {}
  1271. cang.value = row.seller
  1272. cang.label = row.seller
  1273. // if (this.check(row.seller, 1)) {
  1274. // this.ewCustomerOptions.push(cang)
  1275. // }
  1276. let cang1 = {}
  1277. cang1.value = row.buyer
  1278. cang1.label = row.buyer
  1279. if(this.warehouseName=='佳屹农仓储库'){
  1280. if (this.check(row.buyer, 3)) {
  1281. this.companyNameOptions.push(cang1)
  1282. this.companyName=row.buyer
  1283. }
  1284. }else{
  1285. if (this.check(row.buyer, 2)) {
  1286. this.companyNameEWOptions.push(cang1)
  1287. }
  1288. }
  1289. if (this.check(row.seller, 1)) {
  1290. this.ewCustomerOptions.push(cang)
  1291. }
  1292. }
  1293. }
  1294. this.idPrint = row.id
  1295. if(type==2&&this.warehouseName=='鲅鱼圈金信库'){
  1296. var data=await getbinNumber({id:row.warehouseId}).toPromise()
  1297. this.binNumberList1=data.warehousePositionInfoList
  1298. }
  1299. this.isShowPrintType = true
  1300. this.onePrint = true //单个打印标识
  1301. }
  1302. },
  1303. printSmall() {
  1304. window.open('../../../../static/weightCheck.html?type=1&tableData=' + JSON.stringify(this.dialogData).replace(/%/g, 'baifenhao'))
  1305. },
  1306. printBig(type, radioType) {
  1307. localStorage.removeItem('print_in_data')
  1308. // 打印额外
  1309. if (this.checked || this.ddchecked) {
  1310. this.makeEWjjSelectPrintList()
  1311. // this.selectEW = true;
  1312. }
  1313. // if(this.outchecked){
  1314. // var _data = JSON.parse(JSON.stringify(this.dialogData))
  1315. // this.$set(_data,'printtype','out')
  1316. // localStorage.setItem('selectPrint_jjSelectPrintList', JSON.stringify(this.jjSelectPrintList))
  1317. // }
  1318. if (type == 1) {
  1319. localStorage.setItem('selectPrint_jjSelectPrintList', JSON.stringify(this.jjSelectPrintList))
  1320. window.open('../../../../static/weightCheck.html?type=2&radioType=' + radioType + '&selectEW=' + this
  1321. .checked + '&selectEWDD=' + this.ddchecked)
  1322. } else if (type == 2) {
  1323. localStorage.setItem('selectPrint_jjSelectPrintList', JSON.stringify(this.excelPrintData))
  1324. window.open('../../../../static/weightCheck.html?type=2&radioType=' + radioType)
  1325. } else {
  1326. console.log(this.dialogDataList)
  1327. localStorage.setItem('print_in_data',JSON.stringify(this.dialogDataList).replace(/%/g, 'baifenhao'))
  1328. // window.open('../../../../static/weightCheck.html?type=2&tableData=' + JSON.stringify(this.dialogDataList).replace(/%/g, 'baifenhao'))
  1329. window.open('../../../../static/weightCheck.html?type=2&tableData=' )
  1330. }
  1331. },
  1332. warehouseNameChange() {
  1333. for(let i = 0 ; i < this.warehouseList.length; i++ ){
  1334. if(this.warehouseName == this.warehouseList[i].warehouseName){
  1335. this.warehouseId = this.warehouseList[i].id
  1336. }
  1337. }
  1338. this.getList()
  1339. },
  1340. handleSizeChange(val) {
  1341. console.log(`每页 ${val} 条`)
  1342. this.pageSize = val
  1343. this.getList()
  1344. },
  1345. handleCurrentChange(val) {
  1346. this.currentPage = val
  1347. console.log(`当前页: ${val}`)
  1348. this.getList()
  1349. },
  1350. getList() {
  1351. // 列表
  1352. getweighingList({
  1353. compId: localStorage.getItem('ws-pf_compId'),
  1354. currentPage: this.currentPage,
  1355. pageSize: this.pageSize,
  1356. searchKeyWord: this.searchKeyWord,
  1357. warehouseName: this.warehouseName,
  1358. managementType: 1,
  1359. serviceManagementType: this.warehousingType,
  1360. statusType: this.choice,
  1361. startDate: this.startDate,
  1362. endDate: this.endDate,
  1363. })
  1364. .toPromise()
  1365. .then((response) => {
  1366. this.weighingRecordList = response.records
  1367. this.deptBudgetTotal = response.total
  1368. })
  1369. .catch((response) => {
  1370. // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  1371. })
  1372. },
  1373. },
  1374. }
  1375. </script>
  1376. <style lang="scss" scoped>
  1377. .toptitle {
  1378. background: #f6f7fc;
  1379. }
  1380. .bg-left {
  1381. padding-left: 30px;
  1382. }
  1383. .bg-right {
  1384. text-align: right;
  1385. padding: 16px 20px;
  1386. }
  1387. .top-title {
  1388. width: 50%;
  1389. display: flex;
  1390. }
  1391. .title {
  1392. position: relative;
  1393. }
  1394. .title::before {
  1395. content: '';
  1396. display: inline-block;
  1397. width: 5px;
  1398. height: 30px;
  1399. background: #5473e8;
  1400. position: absolute;
  1401. left: 0;
  1402. }
  1403. .container {
  1404. overflow: scroll;
  1405. height: 93vh;
  1406. }
  1407. .center {
  1408. margin: auto;
  1409. }
  1410. .centertitle {
  1411. display: flex;
  1412. margin: 10px 0;
  1413. }
  1414. .temporary {
  1415. line-height: 80px;
  1416. font-size: 20px;
  1417. color: #abaaaa;
  1418. }
  1419. /deep/.forData .cell {
  1420. text-align: center;
  1421. }
  1422. //弹出框
  1423. .eject-warehouse {
  1424. font-size: 20px;
  1425. margin-left: 15px;
  1426. font-weight: 600;
  1427. }
  1428. .table_css {
  1429. margin: 20px auto;
  1430. tr {
  1431. height: 50px;
  1432. }
  1433. .table_item {
  1434. min-width: 70px;
  1435. }
  1436. td {
  1437. text-align: center;
  1438. font-size: 18px;
  1439. font-weight: 600;
  1440. }
  1441. .el-select {
  1442. width: 90%;
  1443. }
  1444. }
  1445. .btn_topcss {
  1446. margin-top: 15px;
  1447. }
  1448. .btn_css {
  1449. width: 90px;
  1450. margin-left: 10px;
  1451. }
  1452. .search_css {
  1453. margin: 0 20px;
  1454. }
  1455. .mask {
  1456. background: black;
  1457. width: 100vw;
  1458. height: 100vh;
  1459. position: fixed;
  1460. top: 0;
  1461. z-index: 99;
  1462. opacity: 0.3;
  1463. }
  1464. .print-type-title {
  1465. text-align: center;
  1466. font-size: 18px;
  1467. margin: 20px;
  1468. }
  1469. .bottom-btn {
  1470. display: flex;
  1471. margin-top: 20px;
  1472. justify-content: space-around;
  1473. }
  1474. .print-type-checkbox {
  1475. // padding-left: 20px;
  1476. }
  1477. .print-type {
  1478. position: absolute;
  1479. top: 0;
  1480. bottom: 0;
  1481. left: 0;
  1482. right: 0;
  1483. margin: auto;
  1484. width: 440px;
  1485. height: 446px;
  1486. background: white;
  1487. border-radius: 10px;
  1488. z-index: 999;
  1489. }
  1490. /deep/.el-radio-group {
  1491. width: 100%;
  1492. display: flex;
  1493. }
  1494. /deep/.el-radio__label {
  1495. font-size: 20px;
  1496. }
  1497. /deep/.el-radio__inner {
  1498. // background: red;
  1499. height: 20px;
  1500. width: 20px;
  1501. }
  1502. .label-width {
  1503. width: 100%;
  1504. text-align: center;
  1505. font-size: 20px;
  1506. }
  1507. .show-excel {
  1508. opacity: 0;
  1509. }
  1510. /deep/.base_header_layout .find.el-button--primary {
  1511. width: 30px;
  1512. border-top-left-radius: 0px;
  1513. border-bottom-left-radius: 0px;
  1514. }
  1515. /deep/.base_header_layout .findinput input {
  1516. border-top-right-radius: 0px;
  1517. border-bottom-right-radius: 0px;
  1518. }
  1519. .ew-print {
  1520. padding: 0 20px;
  1521. margin-top: 10px;
  1522. // display: flex;
  1523. // justify-content: space-between;
  1524. // align-content: center;
  1525. .row {
  1526. display: flex;
  1527. margin-top: 10px;
  1528. align-items: center;
  1529. }
  1530. }
  1531. .sh-address {
  1532. display: flex;
  1533. }
  1534. .print-type-ew {
  1535. display: flex;
  1536. justify-content: space-between;
  1537. padding: 0 20px;
  1538. /deep/.el-radio__label {
  1539. font-size: 14px;
  1540. }
  1541. margin-top: 10px;
  1542. }
  1543. /deep/.el-table .cell {
  1544. text-align: center;
  1545. }
  1546. .shdw-style {
  1547. display: flex;
  1548. justify-content: space-between;
  1549. align-items: center;
  1550. padding: 0 20px;
  1551. margin-top: 20px;
  1552. }
  1553. </style>