materialInOutRecord.vue 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946
  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" style="height: 45px"></el-col>
  18. <el-col :span="18" class="bg-right">
  19. <div style="display:flex">
  20. <el-select style='margin-right:5px; width:40%' v-model="warehouseName" placeholder="请选择仓库名"
  21. @change="warehouseNameChange">
  22. <el-option v-for="item in warehouseList" :key="item.id" :label="item.warehouseName"
  23. :value="item.warehouseName"></el-option>
  24. </el-select>
  25. <el-date-picker v-model="value2" type="daterange" align="right" unlink-panels
  26. range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
  27. :picker-options="pickerOptions">
  28. </el-date-picker>
  29. <el-input placeholder=" 可按物料名称、车牌号和操作员姓名查找" clearable v-model="searchKeyWord"
  30. class="search_css">
  31. </el-input>
  32. <el-button type="primary" size="small" @click="lookup">查找</el-button>
  33. </div>
  34. </el-col>
  35. </el-row>
  36. <el-row>
  37. <el-col :span="18" style="height: 33px;">
  38. <el-button style="margin-left: 10px !important" @click="inOutChange('')"
  39. :type="inOutFlag == '' ? 'primary' : ''">全部</el-button>
  40. <el-button @click="inOutChange(2)" :type="inOutFlag == 2 ? 'primary' : ''">入库</el-button>
  41. <el-button @click="inOutChange(1)" :type="inOutFlag == 1 ? 'primary' : ''">出库</el-button>
  42. </el-col>
  43. <el-col :span="18" style="display:flex;margin-left: 45%;">
  44. <div style="text-align:right;margin-right:80px;">合计入库重量(吨):{{ inWeight }}</div>
  45. <div style="text-align:right;margin-right:60px;">合计出库重量(吨):{{ outWeight }}</div>
  46. <div style="text-align:right;margin-right:40px;">合计入库数量(个):{{ inCount }}</div>
  47. <div style="text-align:right;margin-right:20px;">合计出库数量(个):{{ outCount }}</div>
  48. </el-col>
  49. </el-row>
  50. <el-table class="forData" :data="weighingRecordList" style="width: 100%; margin-top: 20px" height="500"
  51. @selection-change="handleSelectionChange">
  52. <el-table-column type="selection" width="55"></el-table-column>
  53. <el-table-column type="index" label="序号" width="50">
  54. <template scope="scope">
  55. <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
  56. <span v-else>{{ scope.$index + 1 }}</span>
  57. </template>
  58. </el-table-column>
  59. <!-- <el-table-column prop="businessNo" label="业务编号" width="150"></el-table-column> -->
  60. <el-table-column prop="itemName" label="物料名称" width="120"></el-table-column>
  61. <el-table-column label="类型" width="60">
  62. <template scope="scope">
  63. <span v-if="scope.row.inOutFlag == '1'">出库</span>
  64. <span v-else>入库</span>
  65. </template>
  66. </el-table-column>
  67. <el-table-column prop="deliveryMethod" label="统计方式" width="100">
  68. <template scope="scope">
  69. <span v-if="scope.row.deliveryMethod == '1'">称重</span>
  70. <span v-else>计数</span>
  71. </template>
  72. </el-table-column>
  73. <el-table-column prop="grossWeight" label="毛重(公斤)" width="150"></el-table-column>
  74. <el-table-column prop="tare" label="皮重(公斤)" width="150"></el-table-column>
  75. <el-table-column prop="netWeight" label="净重(公斤)" width="150"></el-table-column>
  76. <el-table-column prop="carNo" label="车牌号" width="150"></el-table-column>
  77. <el-table-column prop="materialQuantity" label="数量(个)" width="100"></el-table-column>
  78. <el-table-column label="经办人" width="200">
  79. <template scope="scope">
  80. <span v-if="scope.row.grossAgent == scope.row.tareAgent"> {{ scope.row.grossAgent }}</span>
  81. <span v-else>{{ scope.row.grossAgent }} {{ scope.row.tareAgent }}</span>
  82. </template>
  83. </el-table-column>
  84. <el-table-column prop="status" label="状态"></el-table-column>
  85. <el-table-column prop="inOutWarehouseDate" label="出入库日期">
  86. <template scope="scope">
  87. <span>{{ scope.row.inOutWarehouseDate.split(" ")[0] }}</span>
  88. </template>
  89. </el-table-column>
  90. <!-- <el-table-column label="操作" width="200">
  91. <template scope="scope">
  92. <el-button @click="printInfo(scope.row)" >打印</el-button>
  93. <el-button @click="deleteInfo(scope.row)" v-if="scope.row.status == '待称皮重'">删除</el-button>
  94. </template>
  95. </el-table-column> -->
  96. </el-table>
  97. </div>
  98. <div style="text-align: center; padding: 10px">
  99. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
  100. :current-page="currentPage" :page-size="deptCircularPage.pageSize"
  101. layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
  102. </el-pagination>
  103. </div>
  104. <!-- <div class="mask1" v-show="isShowPrintTypeBills"></div>
  105. <div class="print-type1" v-show="isShowPrintTypeBills">
  106. <div class="print-type-content">
  107. <div class="print-type-title">请选择打印纸张类型</div>
  108. <div class="print-type-checkbox">
  109. </div>
  110. <div class="shdw-style1" v-if="checked || (!ddchecked && !checked)">
  111. <div>收货单位:</div>
  112. <el-select v-model="companyName" placeholder="请选择" style="width: 75%;">
  113. <el-option v-for="item in companyNameOptions" :key="item.value" :label="item.label"
  114. :value="item.value">
  115. </el-option>
  116. </el-select>
  117. </div>
  118. <div
  119. v-if="warehouseName1 == '鲅鱼圈金信库' || warehouseName1 == '白城内陆港' || warehouseName1 == '杜尔伯特家禾库' || warehouseName1 == '洮南新友谊兴旺库' || warehouseName1 == '甘南宏旗库' || warehouseName1 == '哈尔滨依兰库' || warehouseName1 == '山东园丰库'">
  120. <div class="print-type-ew">
  121. <el-checkbox v-model="checked" @change="changeEw">打印额外票据</el-checkbox>
  122. <el-checkbox v-model="ddchecked" @change="changeEwDD">单独打印额外票据</el-checkbox>
  123. </div>
  124. <div class="ew-print" v-if="printSeparately">
  125. <div class="row">
  126. <div>额外客户姓名:</div>
  127. <el-select v-model="ewCustomer" placeholder="请选择" style="width: 75%;">
  128. <el-option v-for="item in ewCustomerOptions" :key="item.value" :label="item.label"
  129. :value="item.value">
  130. </el-option>
  131. </el-select>
  132. </div>
  133. <div class="row">
  134. <div>额外收货单位:</div>
  135. <el-select v-model="companyNameEW" placeholder="请选择" style="width: 75%;">
  136. <el-option v-for="item in companyNameEWOptions" :key="item.value" :label="item.label"
  137. :value="item.value">
  138. </el-option>
  139. </el-select>
  140. </div>
  141. </div>
  142. </div>
  143. </div>
  144. <div class="bottom-btn">
  145. <el-button @click="printBig1">确定</el-button>
  146. <el-button @click="typePrintCannelClick1">取消</el-button>
  147. </div>
  148. </div> -->
  149. </div>
  150. </template>
  151. <script>
  152. import {
  153. // delMaterial,
  154. getMaterialRecord
  155. } from '@/model/warehouse/index'
  156. import {
  157. selectWarehouseSelf,
  158. } from '@/model/outboundManagement/index'
  159. export default {
  160. data() {
  161. return {
  162. weighingRecordList: [],
  163. warehouseId: '',
  164. warehouseName: '',
  165. warehouseName1: '',
  166. compId: '',
  167. inOutFlag: '',
  168. //分页
  169. currentPage: 1,
  170. pageSize: 10,
  171. value2: '',
  172. deptCircularPage: {},
  173. deptBudgetTotal: 0,
  174. warehouseList: [], //仓库
  175. searchKeyWord: '',
  176. title: '',
  177. modification: [],
  178. isShowPrintTypeBills: false,
  179. inWeight: 0,//合计入库重量
  180. outWeight: 0,//合计出库重量
  181. inCount: 0,//合计入库数量
  182. outCount: 0,//合计出库数量
  183. startDate: '',
  184. endDate: '',
  185. pickerOptions: {
  186. shortcuts: [{
  187. text: '本周',
  188. onClick(picker) {
  189. const end = new Date()
  190. const start = new Date()
  191. var thisDay = start.getDay()
  192. var thisDate = start.getDate()
  193. if (thisDay != 0) {
  194. start.setDate(thisDate - thisDay)
  195. }
  196. picker.$emit('pick', [start, end])
  197. },
  198. },
  199. {
  200. text: '本月',
  201. onClick(picker) {
  202. const end = new Date()
  203. const start = new Date()
  204. start.setDate(1)
  205. picker.$emit('pick', [start, end])
  206. },
  207. },
  208. {
  209. text: '本季度',
  210. onClick(picker) {
  211. var oDate = new Date()
  212. var thisYear = oDate.getFullYear()
  213. var thisMonth = oDate.getMonth() + 1
  214. var n = Math.ceil(thisMonth / 3) // 季度
  215. var Month = n * 3 - 1
  216. var start = new Date(thisYear, Month - 2, 1)
  217. var end = new Date()
  218. picker.$emit('pick', [start, end])
  219. },
  220. },
  221. ],
  222. },
  223. ddchecked: false,
  224. checked: false,
  225. // ewCustomerOptions: [{
  226. // value: '天津建源供应链管理有限公司',
  227. // label: '天津建源供应链管理有限公司'
  228. // }, {
  229. // value: '黑龙江中天昊元贸易有限公司',
  230. // label: '黑龙江中天昊元贸易有限公司'
  231. // }, {
  232. // value: '黑龙江利润元粮食贸易有限公司',
  233. // label: '黑龙江利润元粮食贸易有限公司'
  234. // }, {
  235. // value: '黑龙江众利合粮食贸易有限公司',
  236. // label: '黑龙江众利合粮食贸易有限公司'
  237. // }, {
  238. // value: '黑龙江鑫满仓粮食贸易有限公司',
  239. // label: '黑龙江鑫满仓粮食贸易有限公司'
  240. // }, {
  241. // value: '厦门建发物产有限公司',
  242. // label: '厦门建发物产有限公司'
  243. // }, {
  244. // value: '黑龙江谷香粮食贸易有限公司',
  245. // label: '黑龙江谷香粮食贸易有限公司'
  246. // }, {
  247. // value: '黑龙江秋收有限公司',
  248. // label: '黑龙江秋收有限公司'
  249. // }, {
  250. // value: '黑龙江欣洋粮食贸易有限公司',
  251. // label: '黑龙江欣洋粮食贸易有限公司'
  252. // }, {
  253. // value: '黑龙江益储益运粮食贸易有限公司',
  254. // label: '黑龙江益储益运粮食贸易有限公司'
  255. // }, {
  256. // value: '黑龙江启兴粮食贸易有限公司',
  257. // label: '黑龙江启兴粮食贸易有限公司'
  258. // }],
  259. // companyNameOptions: [{
  260. // value: '黑龙江中天昊元贸易有限公司',
  261. // label: '黑龙江中天昊元贸易有限公司'
  262. // }, {
  263. // value: '黑龙江利润元粮食贸易有限公司',
  264. // label: '黑龙江利润元粮食贸易有限公司'
  265. // }, {
  266. // value: '黑龙江众利合粮食贸易有限公司',
  267. // label: '黑龙江众利合粮食贸易有限公司'
  268. // }, {
  269. // value: '黑龙江鑫满仓粮食贸易有限公司',
  270. // label: '黑龙江鑫满仓粮食贸易有限公司'
  271. // }, {
  272. // value: '黑龙江谷香粮食贸易有限公司',
  273. // label: '黑龙江谷香粮食贸易有限公司'
  274. // }, {
  275. // value: '黑龙江秋收有限公司',
  276. // label: '黑龙江秋收有限公司'
  277. // }, {
  278. // value: '黑龙江欣洋粮食贸易有限公司',
  279. // label: '黑龙江欣洋粮食贸易有限公司'
  280. // }, {
  281. // value: '黑龙江益储益运粮食贸易有限公司',
  282. // label: '黑龙江益储益运粮食贸易有限公司'
  283. // }, {
  284. // value: '黑龙江启兴粮食贸易有限公司',
  285. // label: '黑龙江启兴粮食贸易有限公司'
  286. // }],
  287. // companyNameEWOptions: [{
  288. // value: '天津建源供应链管理有限公司',
  289. // label: '天津建源供应链管理有限公司'
  290. // }, {
  291. // value: '厦门建发物产有限公司',
  292. // label: '厦门建发物产有限公司'
  293. // }],
  294. // companyName: '黑龙江中天昊元贸易有限公司',
  295. // companyNameEW: '厦门建发物产有限公司',
  296. // ewCustomer: '黑龙江利润元粮食贸易有限公司',
  297. printSeparately: false,
  298. onePrint: false,
  299. dialogDataList: [],
  300. printData: {
  301. }
  302. }
  303. },
  304. activated() {
  305. //仓库
  306. selectWarehouseSelf({
  307. compId: localStorage.getItem('ws-pf_compId'),
  308. })
  309. .toPromise()
  310. .then((response) => {
  311. this.warehouseList = response
  312. })
  313. this.compId = localStorage.getItem('ws-pf_compId')
  314. this.warehouseName = this.$route.query.warehouseName //仓库名
  315. this.warehouseId = this.$route.query.warehouseId //仓库Id
  316. // if (localStorage.getItem('compNameoptions')) {
  317. // var company = JSON.parse(localStorage.getItem('compNameoptions'))
  318. // var extra = company.filter((item) => {
  319. // return item != '黑龙江中天昊元贸易有限公司'
  320. // && item != '黑龙江利润元粮食贸易有限公司'
  321. // && item != '黑龙江众利合粮食贸易有限公司'
  322. // && item != '黑龙江鑫满仓粮食贸易有限公司'
  323. // && item != '黑龙江谷香粮食贸易有限公司'
  324. // && item != '黑龙江秋收有限公司'
  325. // && item != '黑龙江欣洋粮食贸易有限公司'
  326. // && item != '黑龙江益储益运粮食贸易有限公司'
  327. // && item != '黑龙江启兴粮食贸易有限公司'
  328. // })
  329. // if (extra.length > 0) {
  330. // this.companyNameOptions = [
  331. // {
  332. // value: '黑龙江中天昊元贸易有限公司',
  333. // label: '黑龙江中天昊元贸易有限公司'
  334. // }, {
  335. // value: '黑龙江利润元粮食贸易有限公司',
  336. // label: '黑龙江利润元粮食贸易有限公司'
  337. // }, {
  338. // value: '黑龙江众利合粮食贸易有限公司',
  339. // label: '黑龙江众利合粮食贸易有限公司'
  340. // }, {
  341. // value: '黑龙江鑫满仓粮食贸易有限公司',
  342. // label: '黑龙江鑫满仓粮食贸易有限公司'
  343. // }, {
  344. // value: '黑龙江欣洋粮食贸易有限公司',
  345. // label: '黑龙江欣洋粮食贸易有限公司'
  346. // }, {
  347. // value: '黑龙江谷香粮食贸易有限公司',
  348. // label: '黑龙江谷香粮食贸易有限公司'
  349. // }, {
  350. // value: '黑龙江秋收有限公司',
  351. // label: '黑龙江秋收有限公司'
  352. // }, {
  353. // value: '黑龙江益储益运粮食贸易有限公司',
  354. // label: '黑龙江益储益运粮食贸易有限公司'
  355. // }, {
  356. // value: '黑龙江启兴粮食贸易有限公司',
  357. // label: '黑龙江启兴粮食贸易有限公司'
  358. // }]
  359. // this.ewCustomerOptions = [
  360. // {
  361. // value: '天津建源供应链管理有限公司',
  362. // label: '天津建源供应链管理有限公司'
  363. // }, {
  364. // value: '黑龙江中天昊元贸易有限公司',
  365. // label: '黑龙江中天昊元贸易有限公司'
  366. // }, {
  367. // value: '黑龙江利润元粮食贸易有限公司',
  368. // label: '黑龙江利润元粮食贸易有限公司'
  369. // }, {
  370. // value: '黑龙江众利合粮食贸易有限公司',
  371. // label: '黑龙江众利合粮食贸易有限公司'
  372. // }, {
  373. // value: '黑龙江鑫满仓粮食贸易有限公司',
  374. // label: '黑龙江鑫满仓粮食贸易有限公司'
  375. // }, {
  376. // value: '黑龙江欣洋粮食贸易有限公司',
  377. // label: '黑龙江欣洋粮食贸易有限公司'
  378. // }, {
  379. // value: '黑龙江谷香粮食贸易有限公司',
  380. // label: '黑龙江谷香粮食贸易有限公司'
  381. // }, {
  382. // value: '黑龙江秋收有限公司',
  383. // label: '黑龙江秋收有限公司'
  384. // }, {
  385. // value: '黑龙江益储益运粮食贸易有限公司',
  386. // label: '黑龙江益储益运粮食贸易有限公司'
  387. // }, {
  388. // value: '黑龙江启兴粮食贸易有限公司',
  389. // label: '黑龙江启兴粮食贸易有限公司'
  390. // }]
  391. // this.companyNameEWOptions = [
  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. // value: '黑龙江秋收有限公司',
  415. // label: '黑龙江秋收有限公司'
  416. // }, {
  417. // value: '黑龙江益储益运粮食贸易有限公司',
  418. // label: '黑龙江益储益运粮食贸易有限公司'
  419. // }, {
  420. // value: '黑龙江启兴粮食贸易有限公司',
  421. // label: '黑龙江启兴粮食贸易有限公司'
  422. // }]
  423. // if (localStorage.getItem('print_company_name')) {
  424. // this.companyName = localStorage.getItem('print_company_name')
  425. // } else {
  426. // this.companyName = extra[0]
  427. // }
  428. // if (localStorage.getItem('print_company_name_ew')) {
  429. // this.companyNameEW = localStorage.getItem('print_company_name_ew')
  430. // } else {
  431. // this.companyNameEW = extra[0]
  432. // }
  433. // if (localStorage.getItem('print_customer_name_ew')) {
  434. // this.ewCustomer = localStorage.getItem('print_customer_name_ew')
  435. // } else {
  436. // this.ewCustomer = extra[0]
  437. // }
  438. // for (let i = 0; i < extra.length; i++) {
  439. // this.ewCustomerOptions.push({ value: extra[i], label: extra[i] })
  440. // this.companyNameOptions.push({ value: extra[i], label: extra[i] })
  441. // this.companyNameEWOptions.push({ value: extra[i], label: extra[i] })
  442. // }
  443. // }
  444. // }
  445. this.getList()
  446. },
  447. methods: {
  448. inOutChange(num) {
  449. this.inOutFlag = num
  450. this.getList()
  451. },
  452. // changeEw(e) {
  453. // this.ddchecked = false
  454. // if (e) {
  455. // this.printSeparately = true
  456. // } else {
  457. // this.printSeparately = false
  458. // }
  459. // },
  460. // changeEwDD(e) {
  461. // this.checked = false
  462. // if (e) {
  463. // this.printSeparately = true
  464. // } else {
  465. // this.printSeparately = false
  466. // }
  467. // },
  468. // printBig1(type, radioType) {
  469. // this.printData.extra1 = true
  470. // localStorage.setItem('print_company_name', this.companyName)
  471. // localStorage.setItem('print_company_name_ew', this.companyNameEW)
  472. // localStorage.setItem('print_customer_name_ew', this.ewCustomer)
  473. // // 打印额外
  474. // if (this.checked || this.ddchecked) {
  475. // this.printData.extra2 = true
  476. // if (this.ddchecked) {
  477. // localStorage.setItem('print_alone_extra', true)
  478. // } else {
  479. // localStorage.setItem('print_alone_extra', false)
  480. // }
  481. // // this.selectEW = true;
  482. // } else {
  483. // this.printData.extra2 = false
  484. // }
  485. // localStorage.setItem('printdrydata', JSON.stringify(this.printData))
  486. // window.open(
  487. // '../../../../../static/printdry.html?type=2&printTypeList=结算凭证'
  488. // )
  489. // // if (type == 1) {
  490. // // localStorage.setItem('selectPrint_jjSelectPrintList', JSON.stringify(this.jjSelectPrintList))
  491. // // window.open('../../../../static/weightCheck.html?type=2&radioType=' + radioType + '&selectEW=' + this
  492. // // .checked + '&selectEWDD=' + this.ddchecked)
  493. // // } else if (type == 2) {
  494. // // localStorage.setItem('selectPrint_jjSelectPrintList', JSON.stringify(this.excelPrintData))
  495. // // window.open('../../../../static/weightCheck.html?type=2&radioType=' + radioType)
  496. // // } else {
  497. // // console.log(this.dialogDataList)
  498. // // localStorage.setItem('print_in_data',JSON.stringify(this.dialogDataList).replace(/%/g, 'baifenhao'))
  499. // // // window.open('../../../../static/weightCheck.html?type=2&tableData=' + JSON.stringify(this.dialogDataList).replace(/%/g, 'baifenhao'))
  500. // // window.open('../../../../static/weightCheck.html?type=2&tableData=' )
  501. // // }
  502. // },
  503. // typePrintCannelClick1() {
  504. // this.dialogDataList = [] //打个打印取消时数组至空
  505. // this.isShowPrintTypeBills= false
  506. // },
  507. // printInfo(row){
  508. // this.printData=row
  509. // this.warehouseName1=row.warehouseName
  510. // this.isShowPrintTypeBills=true
  511. // // window.open('../../../static/printdry.html')
  512. // },
  513. // deleteInfo(row) {
  514. // //删除
  515. // this.$confirm('确定删除检斤信息?', '提示', {
  516. // confirmButtonText: '确定',
  517. // cancelButtonText: '取消',
  518. // type: 'warning',
  519. // })
  520. // .then(() => {
  521. // delMaterial({
  522. // id: row.id,
  523. // })
  524. // .toPromise()
  525. // .then((response) => {
  526. // this.$notify.success({
  527. // title: '成功',
  528. // message: '删除成功',
  529. // })
  530. // this.getList()
  531. // })
  532. // .catch((response) => {
  533. // // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  534. // })
  535. // })
  536. // .catch(() => {
  537. // return false
  538. // })
  539. // },
  540. handleSelectionChange(val) {
  541. this.modification = val;
  542. //合计入库重量
  543. this.inWeight = 0
  544. //合计出库重量
  545. this.outWeight = 0
  546. //合计入库数量
  547. this.inCount = 0
  548. //合计出库数量
  549. this.outCount = 0
  550. for (let i = 0; i < this.modification.length; i++) {
  551. //合计入库重量
  552. if (this.modification[i].netWeight && this.modification[i].inOutFlag == 2) {
  553. this.inWeight += this.modification[i].netWeight
  554. }
  555. //合计出库重量
  556. if (this.modification[i].netWeight && this.modification[i].inOutFlag == 1) {
  557. this.outWeight += this.modification[i].netWeight
  558. }
  559. //合计入库数量
  560. if (this.modification[i].materialQuantity && this.modification[i].deliveryMethod == 3 && this.modification[i].inOutFlag == 2) {
  561. this.inCount += this.modification[i].materialQuantity
  562. }
  563. //合计出库数量
  564. if (this.modification[i].materialQuantity && this.modification[i].deliveryMethod == 3 && this.modification[i].inOutFlag == 1) {
  565. this.outCount += this.modification[i].materialQuantity
  566. }
  567. }
  568. this.inWeight = (this.inWeight / 1000).toFixed(2)
  569. this.outWeight = (this.outWeight / 1000).toFixed(2)
  570. },
  571. dateFormat(fmt, date) {
  572. let ret
  573. const opt = {
  574. 'Y+': date.getFullYear().toString(), // 年
  575. 'm+': (date.getMonth() + 1).toString(), // 月
  576. 'd+': date.getDate().toString(), // 日
  577. 'H+': date.getHours().toString(), // 时
  578. // "M+": date.getMinutes().toString(), // 分
  579. // "S+": date.getSeconds().toString() // 秒
  580. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  581. }
  582. for (let k in opt) {
  583. ret = new RegExp('(' + k + ')').exec(fmt)
  584. if (ret) {
  585. fmt = fmt.replace(
  586. ret[1],
  587. ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
  588. )
  589. }
  590. }
  591. return fmt
  592. },
  593. lookup() {
  594. if (this.value2) {
  595. this.startDate = this.dateFormat('YYYY-mm-dd', this.value2[0])
  596. this.endDate = this.dateFormat('YYYY-mm-dd', this.value2[1])
  597. } else {
  598. this.startDate = ''
  599. this.endDate = ''
  600. }
  601. this.currentPage = 1
  602. this.getList()
  603. },
  604. returnsales() {
  605. this.searchKeyWord = ''
  606. this.$router.go(-1)
  607. },
  608. warehouseNameChange(e) {
  609. for (let i = 0; i < this.warehouseList.length; i++) {
  610. if (e == this.warehouseList[i].warehouseName) {
  611. this.warehouseId = this.warehouseList[i].id
  612. }
  613. }
  614. this.getList()
  615. },
  616. handleSizeChange(val) {
  617. console.log(`每页 ${val} 条`)
  618. this.pageSize = val
  619. this.getList()
  620. },
  621. handleCurrentChange(val) {
  622. this.currentPage = val
  623. console.log(`当前页: ${val}`)
  624. this.getList()
  625. },
  626. getList() {
  627. // 列表
  628. getMaterialRecord({
  629. baseId: this.warehouseId,
  630. currentPage: this.currentPage,
  631. pageSize: this.pageSize,
  632. searchKeyWord: this.searchKeyWord,
  633. inOutFlag: this.inOutFlag,
  634. startDate: this.startDate,
  635. endDate: this.endDate,
  636. })
  637. .toPromise()
  638. .then((response) => {
  639. this.weighingRecordList = response.records
  640. this.deptBudgetTotal = response.total
  641. })
  642. .catch((response) => {
  643. // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  644. })
  645. },
  646. },
  647. }
  648. </script>
  649. <style lang="scss" scoped>
  650. .toptitle {
  651. background: #f6f7fc;
  652. }
  653. .bg-left {
  654. padding-left: 30px;
  655. }
  656. .bg-right {
  657. text-align: right;
  658. padding: 16px 20px;
  659. }
  660. .top-title {
  661. width: 50%;
  662. display: flex;
  663. }
  664. .title {
  665. position: relative;
  666. }
  667. .title::before {
  668. content: '';
  669. display: inline-block;
  670. width: 5px;
  671. height: 30px;
  672. background: #5473e8;
  673. position: absolute;
  674. left: 0;
  675. }
  676. .container {
  677. overflow: scroll;
  678. height: 93vh;
  679. }
  680. .center {
  681. margin: auto;
  682. }
  683. .centertitle {
  684. display: flex;
  685. margin: 10px 0;
  686. }
  687. .temporary {
  688. line-height: 80px;
  689. font-size: 20px;
  690. color: #abaaaa;
  691. }
  692. /deep/.forData .cell {
  693. text-align: center;
  694. }
  695. //弹出框
  696. .eject-warehouse {
  697. font-size: 20px;
  698. margin-left: 15px;
  699. font-weight: 600;
  700. }
  701. .table_css {
  702. margin: 20px auto;
  703. tr {
  704. height: 50px;
  705. }
  706. .table_item {
  707. min-width: 70px;
  708. }
  709. td {
  710. text-align: center;
  711. font-size: 18px;
  712. font-weight: 600;
  713. }
  714. .el-select {
  715. width: 90%;
  716. }
  717. }
  718. .btn_topcss {
  719. margin-top: 15px;
  720. }
  721. .btn_css {
  722. width: 90px;
  723. margin-left: 10px;
  724. }
  725. .search_css {
  726. margin: 0 20px;
  727. }
  728. .mask {
  729. background: black;
  730. width: 100vw;
  731. height: 100vh;
  732. position: fixed;
  733. top: 0;
  734. z-index: 99;
  735. opacity: 0.3;
  736. }
  737. .print-type-title {
  738. text-align: center;
  739. font-size: 18px;
  740. margin: 20px;
  741. }
  742. .bottom-btn {
  743. display: flex;
  744. margin-top: 20px;
  745. justify-content: space-around;
  746. }
  747. .print-type-checkbox {
  748. // padding-left: 20px;
  749. }
  750. .print-type {
  751. position: absolute;
  752. top: 0;
  753. bottom: 0;
  754. left: 0;
  755. right: 0;
  756. margin: auto;
  757. width: 440px;
  758. height: 320px;
  759. background: white;
  760. border-radius: 10px;
  761. z-index: 999;
  762. }
  763. /deep/.el-radio-group {
  764. width: 100%;
  765. display: flex;
  766. }
  767. /deep/.el-radio__label {
  768. font-size: 20px;
  769. }
  770. /deep/.el-radio__inner {
  771. // background: red;
  772. height: 20px;
  773. width: 20px;
  774. }
  775. .label-width {
  776. width: 100%;
  777. text-align: center;
  778. font-size: 20px;
  779. }
  780. .show-excel {
  781. opacity: 0;
  782. }
  783. /deep/.base_header_layout .find.el-button--primary {
  784. width: 30px;
  785. border-top-left-radius: 0px;
  786. border-bottom-left-radius: 0px;
  787. }
  788. /deep/.base_header_layout .findinput input {
  789. border-top-right-radius: 0px;
  790. border-bottom-right-radius: 0px;
  791. }
  792. .ew-print {
  793. padding: 0 20px;
  794. margin-top: 10px;
  795. // display: flex;
  796. // justify-content: space-between;
  797. // align-content: center;
  798. .row {
  799. display: flex;
  800. margin-top: 10px;
  801. align-items: center;
  802. }
  803. }
  804. .sh-address {
  805. display: flex;
  806. }
  807. .print-type-ew {
  808. display: flex;
  809. justify-content: space-between;
  810. padding: 0 20px;
  811. /deep/.el-radio__label {
  812. font-size: 14px;
  813. }
  814. margin-top: 10px;
  815. }
  816. /deep/.el-table .cell {
  817. text-align: center;
  818. }
  819. .shdw-style {
  820. display: flex;
  821. justify-content: space-between;
  822. align-items: center;
  823. padding: 0 20px;
  824. margin-top: 20px;
  825. }
  826. .mask1 {
  827. background: black;
  828. width: 100vw;
  829. height: 100vh;
  830. position: fixed;
  831. top: 0;
  832. z-index: 1001;
  833. opacity: 0.3;
  834. }
  835. .print-type-title1 {
  836. text-align: center;
  837. font-size: 18px;
  838. margin: 20px;
  839. }
  840. .print-type-checkbox1 {
  841. // padding-left: 20px;
  842. }
  843. .print-type1 {
  844. position: absolute;
  845. top: 0;
  846. bottom: 0;
  847. left: 0;
  848. right: 0;
  849. margin: auto;
  850. width: 440px;
  851. height: 320px;
  852. background: white;
  853. border-radius: 10px;
  854. z-index: 1001;
  855. }
  856. .shdw-style1 {
  857. display: flex;
  858. justify-content: space-between;
  859. align-items: center;
  860. padding: 0 20px;
  861. margin-top: 20px;
  862. }
  863. .print-type-ew {
  864. display: flex;
  865. justify-content: space-between;
  866. padding: 0 20px;
  867. /deep/.el-radio__label {
  868. font-size: 14px;
  869. }
  870. margin-top: 10px;
  871. }
  872. .ew-print {
  873. padding: 0 20px;
  874. margin-top: 10px;
  875. // display: flex;
  876. // justify-content: space-between;
  877. // align-content: center;
  878. .row {
  879. display: flex;
  880. margin-top: 10px;
  881. align-items: center;
  882. }
  883. }
  884. </style>