weighingManagement.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811
  1. <!--检斤管理-->
  2. <template>
  3. <div>
  4. <BaseHeaderLayout :leftSpan="10">
  5. <template slot="left">
  6. <ws-button type="primary" @click="print('',1)"
  7. v-hasPermission="`acquisitionManagement.acquisitionWeight.print`">批量打印
  8. </ws-button>
  9. <el-upload style="margin-left: 8px;" class="upload-demo inline-block margin-right-10" action=""
  10. :on-change="handleChange" :show-file-list="false"
  11. accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
  12. :auto-upload="false">
  13. <el-button type="primary" class="show-excel">excel导入打印</el-button>
  14. </el-upload>
  15. </template>
  16. <template slot="right">
  17. <ws-select v-model="warehouseName" placeholder="" @change="warehouseNameChange" :value="searchType"
  18. style="margin: 0 10px;width:400px">
  19. <ws-option v-for="item in warehouseList" :key="item.value" :label="item.value" :value="item.value"
  20. style="color: #8890b1" />
  21. </ws-select>
  22. <el-date-picker style="margin: 0 10px 0 0" value-format='yyyy-MM-dd' v-model="value2" @change='datechange'
  23. type="daterange" align="right" unlink-panels range-separator="至" start-placeholder="起始时间"
  24. end-placeholder="截止时间">
  25. </el-date-picker>
  26. <div></div>
  27. <ws-input class='findinput' @keyup.enter.native="find()" v-model="searchKeyWord" placeholder="可按编号、客户名、车牌号、货名查找"
  28. clearable maxlength="500" type="input">
  29. </ws-input>
  30. <ws-button class="find" type="primary" @click="find()"><img width="16" height="16" style="
  31. vertical-align: text-top;
  32. position: relative;
  33. top: 0px;
  34. left:-8px;
  35. " src="../../../public/img/sousuo.png" alt="" /></ws-button>
  36. </template>
  37. </BaseHeaderLayout>
  38. <el-table :data="weighingList" style="width: 100%; margin-top: 20px" ref="weighingList" border height="calc(100% - 130px)"
  39. @row-click="handleRowClick" @selection-change="handleSelectionChange">
  40. <el-table-column type="selection" width="55"></el-table-column>
  41. <el-table-column type="index" label="序号" width="50">
  42. <template scope="scope">
  43. <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
  44. <span v-else>{{ scope.$index + 1 }}</span>
  45. </template>
  46. </el-table-column>
  47. <el-table-column prop="number" width="150" label="编号"></el-table-column>
  48. <el-table-column prop="customer" label="客户"></el-table-column>
  49. <el-table-column prop="carNumber" label="车牌号"></el-table-column>
  50. <!-- <el-table-column prop="boxNo" label="箱号-1">
  51. <template slot-scope="scope">
  52. <div v-if='scope.row.qualityInspectionManagement.boxNo'>{{scope.row.qualityInspectionManagement.boxNo}}</div>
  53. </template>
  54. </el-table-column>
  55. <el-table-column prop="boxNoOther" label="箱号-2">
  56. <template slot-scope="scope">
  57. <div v-if='scope.row.qualityInspectionManagement.boxNoOther'>
  58. {{scope.row.qualityInspectionManagement.boxNoOther}}
  59. </div>
  60. </template>
  61. </el-table-column>
  62. <el-table-column prop="titleNo" label="封号-1">
  63. <template slot-scope="scope">
  64. <div v-if='scope.row.qualityInspectionManagement.titleNo'>{{scope.row.qualityInspectionManagement.titleNo}}
  65. </div>
  66. </template>
  67. </el-table-column>
  68. <el-table-column prop="titleNoOther" label="封号-2">
  69. <template slot-scope="scope">
  70. <div v-if='scope.row.qualityInspectionManagement.titleNoOther'>
  71. {{scope.row.qualityInspectionManagement.titleNoOther}}
  72. </div>
  73. </template>
  74. </el-table-column> -->
  75. <el-table-column prop="goodsName" label="货名"></el-table-column>
  76. <el-table-column prop="type" label="类型"></el-table-column>
  77. <el-table-column prop="grossWeight" label="毛重(公斤)" width="120"></el-table-column>
  78. <el-table-column prop="tare" label="皮重(公斤)" width="120"></el-table-column>
  79. <el-table-column prop="buckleMiscellaneous" label="扣杂"></el-table-column>
  80. <el-table-column prop="netWeight" label="净重(公斤)" width="120"></el-table-column>
  81. <el-table-column prop="binNumber" label="仓位号"></el-table-column>
  82. <el-table-column prop="storageNumber" label="囤位号"></el-table-column>
  83. <el-table-column prop="secretaryWeigher" label="司称员">
  84. <template slot-scope="scope">
  85. <div v-if="scope.row.secretaryWeigher == scope.row.skinInspector">{{scope.row.skinInspector}}</div>
  86. <div v-else>{{scope.row.secretaryWeigher}}<span
  87. v-if="scope.row.skinInspector">,{{scope.row.skinInspector}}</span></div>
  88. </template>
  89. </el-table-column>
  90. <el-table-column prop="suqualityTestingDate" label="称重时间" width="90">
  91. <template slot-scope="scope">
  92. <div v-if="
  93. scope.row.status == '已称毛重'
  94. "> {{scope.row.grossDate}}</div>
  95. <div v-if="
  96. scope.row.status == '已称皮重'
  97. "> {{scope.row.tareDate}}</div>
  98. </template>
  99. </el-table-column>
  100. <el-table-column prop="status" label="状态"></el-table-column>
  101. <el-table-column width="270" prop="contractNo1" label="操作">
  102. <template slot-scope="scope">
  103. <el-button @click="weightCheck(scope.row, 1)" v-if=" scope.row.status == '已称毛重' || scope.row.status == '已质检' "
  104. v-hasPermission="`acquisitionManagement.acquisitionWeight.mao`">毛重</el-button>
  105. <!-- scope.row.paymentManagement.status == '待结算' && -->
  106. <el-button :disabled="scope.row.allow == 2" @click="weightCheck(scope.row, 2)"
  107. v-if=" (scope.row.status == '已称毛重' || scope.row.status == '已称皮重') "
  108. v-hasPermission="`acquisitionManagement.acquisitionWeight.weight`">皮重</el-button>
  109. <div style="display: inline-block;">
  110. <el-button @click="del(scope.row)" type="danger"
  111. v-hasPermission="`acquisitionManagement.acquisitionQuality.delete`">删除</el-button>
  112. </div>
  113. <el-button @click="print(scope.row)" v-if="scope.row.status == '已称皮重' ||scope.row.status == '已称毛重'"
  114. v-hasPermission="`acquisitionManagement.acquisitionWeight.print`">打印</el-button>
  115. </template>
  116. </el-table-column>
  117. </el-table>
  118. <div style="text-align: center;margin-top:20px">
  119. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
  120. :page-size="deptCircularPage.pageSize" layout="total, sizes, prev, pager, next, jumper"
  121. :total="deptBudgetTotal">
  122. </el-pagination>
  123. </div>
  124. <div class="mask" v-show="isShowPrintType"></div>
  125. <div class="print-type" v-show="isShowPrintType">
  126. <div class="print-type-content">
  127. <div class="print-type-title">请选择打印纸张类型</div>
  128. <div class="print-type-checkbox">
  129. <el-radio-group v-model="radio">
  130. <el-radio label="A4" class="label-width" @change="selectType">A4</el-radio>
  131. <el-radio label="A5" class="label-width" @change="selectType">A5</el-radio>
  132. </el-radio-group>
  133. </div>
  134. </div>
  135. <div class="bottom-btn">
  136. <el-button @click="typePrintClick">确定</el-button>
  137. <el-button @click="typePrintCannelClick">取消</el-button>
  138. </div>
  139. </div>
  140. <el-dialog width="70%" class="table-content" center :visible.sync="isShowPrint" title="粮食检斤单">
  141. <weightCheckPrint :tableData="dialogData"></weightCheckPrint>
  142. <div style="text-align:center">
  143. <el-button type="primary" @click="isShowPrint = false">关闭</el-button>
  144. <el-button type="primary" @click="printSmall">打印小票</el-button>
  145. <el-button type="primary" @click="printBig">打印单据</el-button>
  146. </div>
  147. </el-dialog>
  148. </div>
  149. </template>
  150. <script>
  151. import {
  152. getweighingList,
  153. getweighingDelete,
  154. selectWarehouseSelf,
  155. getPrint
  156. } from '@/model/houseSelfCollect/index'
  157. import weightCheckPrint from './component/weightCheckPrint.vue'
  158. export default {
  159. components: {
  160. weightCheckPrint
  161. },
  162. watch: {},
  163. data() {
  164. return {
  165. //分页
  166. currentPage: 1,
  167. pageSize: 10,
  168. deptCircularPage: {},
  169. deptBudgetTotal: 0,
  170. paymentForm: false,
  171. paymentForm1: false,
  172. weighingList: [],
  173. searchKeyWord: '',
  174. searchType: [],
  175. warehouseName: '',
  176. value1: '', //选择时间
  177. warehouseList: [],
  178. warehouseId: '',
  179. cangid: '',
  180. monitorUrl1: '',
  181. monitorUrl2: '',
  182. isShowPrint: false, //打印弹出
  183. dialogData: {
  184. qualityInspectionManagement: {},
  185. },
  186. purchasePriceList: [],
  187. allowEdit: '0',
  188. disabled: false,
  189. isShowPrintType: false,
  190. modification: [],
  191. jjSelectPrintList: [],
  192. radio: 'A4',
  193. value2: [],
  194. startDate: '',
  195. endDate: '',
  196. excelPrintData: [],
  197. isExcelPrint: false,
  198. }
  199. },
  200. activated() {
  201. this.selectWarehouse()
  202. },
  203. methods: {
  204. selectType(val) {
  205. console.log(val)
  206. // for (let i = 0; i < this.ruleForm.type.length; i++) {
  207. // switch (this.ruleForm.type[i]) {
  208. // case '打印身份证(正反面)':
  209. // this.isShowPrintType1 = !this.isShowPrintType1
  210. // break
  211. // case '打印银行卡(正反面)':
  212. // this.isShowPrintType2 = !this.isShowPrintType2
  213. // break
  214. // case '打印结算凭证':
  215. // this.isShowPrintType3 = !this.isShowPrintType3
  216. // case '打印发票':
  217. // this.isShowPrintType4 = !this.isShowPrintType4
  218. // break
  219. // }
  220. // }
  221. },
  222. handleChange(file, fileList) {
  223. this.jjSelectPrintList = []
  224. this.fileTemp = file.raw
  225. let fileName = file.raw.name
  226. let fileType = fileName.substring(fileName.lastIndexOf('.') + 1);
  227. // 判断上传文件格式
  228. if (this.fileTemp) {
  229. if ((fileType == 'xlsx') || (fileType == 'xls')) {
  230. this.importf(this.fileTemp)
  231. } else {
  232. this.$message({
  233. type: 'warning',
  234. message: '附件格式错误,请删除后重新上传!'
  235. })
  236. }
  237. } else {
  238. this.$message({
  239. type: 'warning',
  240. message: '请上传附件!'
  241. })
  242. }
  243. },
  244. importf(obj) {
  245. this.excelFreightspace = []
  246. this.dialogVisible = true;
  247. let _this = this;
  248. let inputDOM = this.$refs.inputer; // 通过DOM取文件数据
  249. this.file = event.currentTarget.files[0];
  250. var rABS = false; //是否将文件读取为二进制字符串
  251. var f = this.file;
  252. var reader = new FileReader();
  253. //if (!FileReader.prototype.readAsBinaryString) {
  254. FileReader.prototype.readAsBinaryString = function(f) {
  255. var binary = '';
  256. var rABS = false; //是否将文件读取为二进制字符串
  257. var pt = this;
  258. var wb; //读取完成的数据
  259. var outdata;
  260. var reader = new FileReader();
  261. reader.onload = function(e) {
  262. var bytes = new Uint8Array(reader.result);
  263. var length = bytes.byteLength;
  264. for (var i = 0; i < length; i++) {
  265. binary += String.fromCharCode(bytes[i]);
  266. }
  267. var XLSX = require('xlsx');
  268. if (rABS) {
  269. wb = XLSX.read(btoa(fixdata(binary)), {
  270. type: 'base64',
  271. cellDates: true
  272. });
  273. } else {
  274. wb = XLSX.read(binary, {
  275. type: 'binary'
  276. });
  277. }
  278. // excel导入的数据
  279. outdata = XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]]);
  280. let arr = []
  281. let _index = 0
  282. outdata.map(v => {
  283. _index++
  284. let jsonString = JSON.stringify(v).replace(/\//g, '').replace(/\s/ig, '');
  285. console.log(jsonString);
  286. v = JSON.parse(jsonString);
  287. let obj = {
  288. qualityInspectionManagement: {}
  289. }
  290. obj.compName = v.公司名
  291. obj.number = v.编号
  292. obj.customer = v.客户姓名
  293. obj.customerPhone = v.客户电话
  294. obj.carNumber = v.车牌号
  295. obj.compName = v.收货单位
  296. obj.person = v.联系人
  297. obj.personPhone = v.联系电话
  298. obj.goodsName = v.货名
  299. obj.type = v.类型
  300. obj.qualityInspectionManagement.bulkDensity = v.容重
  301. obj.qualityInspectionManagement.imperfectGrain = v.不完善粒
  302. obj.qualityInspectionManagement.grade = v.等级
  303. obj.qualityInspectionManagement.waterContent = v.水分
  304. obj.qualityInspectionManagement.jiaorenli = v.热损伤
  305. obj.qualityInspectionManagement.qualityDate = v.质检时间
  306. obj.qualityInspectionManagement.impurity = v.杂质
  307. obj.qualityInspectionManagement.mildewGrain = v.霉变粒
  308. obj.qualityInspectionManagement.buckleMiscellaneous = v.扣杂
  309. obj.grossWeight = v.毛重
  310. obj.tare = v.皮重
  311. obj.buckleMiscellaneous = v.扣重
  312. obj.netWeight = v.净重
  313. obj.grossDate = v.毛重检斤时间
  314. obj.tareDate = v.皮重检斤时间
  315. obj.secretaryWeigher = v.毛检
  316. obj.skinInspector = v.皮检
  317. console.log(obj)
  318. _this.excelPrintData.push(obj)
  319. if (_index == outdata.length) {
  320. _this.isShowPrintType = true
  321. _this.isExcelPrint = true
  322. }
  323. })
  324. }
  325. reader.readAsArrayBuffer(f);
  326. }
  327. if (rABS) {
  328. reader.readAsArrayBuffer(f);
  329. } else {
  330. reader.readAsBinaryString(f);
  331. }
  332. console.log(reader)
  333. },
  334. handleRowClick(row) {},
  335. handleSelectionChange(val) {
  336. this.modification = val
  337. },
  338. printSmall() {
  339. window.open('../../../../static/weightCheck.html?type=1&tableData=' + JSON.stringify(this.dialogData))
  340. },
  341. printBig(type, radioType) {
  342. if (type == 1) {
  343. localStorage.setItem('selectPrint_jjSelectPrintList', JSON.stringify(this.jjSelectPrintList))
  344. window.open('../../../../static/weightCheck.html?type=2&radioType=' + radioType)
  345. } else if (type == 2) {
  346. localStorage.setItem('selectPrint_jjSelectPrintList', JSON.stringify(this.excelPrintData))
  347. window.open('../../../../static/weightCheck.html?type=2&radioType=' + radioType)
  348. } else {
  349. window.open('../../../../static/weightCheck.html?type=2&tableData=' + JSON.stringify(this.dialogData))
  350. }
  351. },
  352. typePrintClick(type) {
  353. if (this.isExcelPrint) {
  354. this.printBig(2, this.radio)
  355. this.isExcelPrint = false
  356. } else {
  357. this.jjSelectPrintList = []
  358. let index1 = 0;
  359. for (let i = 0; i < this.modification.length; i++) {
  360. getPrint({
  361. id: this.modification[i].id
  362. })
  363. .toPromise()
  364. .then((response) => {
  365. index1++;
  366. if (response.compName == '黑龙江秋收有限公司') {
  367. response.compName = '黑龙江中天昊元贸易有限公司'
  368. }
  369. this.jjSelectPrintList.push(response)
  370. if (index1 == this.modification.length) {
  371. this.printBig(1, this.radio)
  372. }
  373. })
  374. .catch((response) => {})
  375. }
  376. }
  377. },
  378. typePrintCannelClick() {
  379. this.isShowPrintType = false
  380. },
  381. print(row, type, pageType) {
  382. if (type == 1) {
  383. this.isShowPrintType = true
  384. } else {
  385. getPrint({
  386. id: row.id
  387. })
  388. .toPromise()
  389. .then((response) => {
  390. // let printString = localStorage.getItem('ws-pf_compId') + "," + row.qualityNo + "," + this.cangid
  391. // getQRcode({printString}).toPromise()
  392. // .then((res) => {//二维码
  393. this.isShowPrint = true
  394. this.dialogData = response
  395. // this.printData.qrCodeUrl = res
  396. // })
  397. if (response.compName == '黑龙江秋收有限公司') {
  398. this.dialogData.compName = '黑龙江中天昊元贸易有限公司'
  399. }
  400. })
  401. .catch((response) => {
  402. // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  403. })
  404. }
  405. },
  406. warehouseNameChange(e) {
  407. // this.warehouseName = e
  408. for (let i = 0; i < this.warehouseList.length; i++) {
  409. if (this.warehouseList[i].value == e) {
  410. this.warehouseId = this.warehouseList[i].warehouseId
  411. this.cangid = this.warehouseList[i].warehouseId
  412. this.allowEdit = this.warehouseList[i].allowEdit
  413. this.WAREHOUSE[2].payname = this.warehouseList[i].value
  414. this.common.name = this.warehouseList[i].value
  415. this.monitorUrl1 = this.warehouseList[i].monitorUrl1
  416. this.monitorUrl2 = this.warehouseList[i].monitorUrl2
  417. this.warehouseList[i].compId = localStorage.getItem('ws-pf_compId')
  418. localStorage.setItem('ck', e)
  419. localStorage.setItem('houseSelfCollect_house1', JSON.stringify(this.warehouseList[i]))
  420. }
  421. }
  422. this.getList()
  423. },
  424. isConfirmQuality(val) {
  425. if (val.qualityInspectionManagement.confirm == '1' && val.qualityInspectionManagement.warehouseName == '哈尔滨依兰库')
  426. return false;
  427. return true
  428. },
  429. weightCheck(row, num) {
  430. console.log(this.cangid)
  431. // 质检是否是已确定状态
  432. // let _isGoweightCheck = this.isConfirmQuality(row)
  433. let _isGoweightCheck = true
  434. console.log(row.qualityInspectionManagement)
  435. if (_isGoweightCheck) {
  436. this.$router.push({
  437. path: 'weightCheck',
  438. query: {
  439. tpyeNo: num,
  440. id: row.id,
  441. number: row.number,
  442. binNumber: row.binNumber,
  443. customer: row.customer,
  444. storageNumber: row.storageNumber,
  445. carNumber: row.carNumber,
  446. boxNo: row.qualityInspectionManagement.boxNo,
  447. boxNoOther: row.qualityInspectionManagement.boxNoOther,
  448. titleNo: row.qualityInspectionManagement.titleNo,
  449. titleNoOther: row.qualityInspectionManagement.titleNoOther,
  450. carModel: row.qualityInspectionManagement.carModel,
  451. goodsName: row.goodsName,
  452. grossWeight: row.grossWeight,
  453. tare: row.tare,
  454. netWeight: row.netWeight,
  455. relationId: row.relationId,
  456. warehouseId: this.warehouseId,
  457. monitorUrl1: this.monitorUrl1,
  458. monitorUrl2: this.monitorUrl2,
  459. allowEdit: this.allowEdit,
  460. cangid: this.cangid,
  461. warehouseName: this.warehouseName,
  462. paramType: row.qualityInspectionManagement.paramType,
  463. customerNumberCard: row.customerNumberCard,
  464. automaticWeightAcquisition: row.automaticWeightAcquisition
  465. },
  466. })
  467. } else {
  468. this.$message({
  469. message: '质检状态未确认,质检状态确认后称毛重!',
  470. type: 'warning',
  471. })
  472. }
  473. },
  474. del(row) {
  475. //删除
  476. this.$confirm('确定删除检斤信息?', '提示', {
  477. confirmButtonText: '确定',
  478. cancelButtonText: '取消',
  479. type: 'warning',
  480. })
  481. .then(() => {
  482. getweighingDelete({
  483. id: row.id,
  484. })
  485. .toPromise()
  486. .then((response) => {
  487. this.$notify.success({
  488. title: '成功',
  489. message: '删除成功',
  490. })
  491. this.getList()
  492. })
  493. .catch((response) => {
  494. // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  495. })
  496. })
  497. .catch(() => {
  498. return false
  499. })
  500. },
  501. find() {
  502. this.getList()
  503. },
  504. datechange() {
  505. if (this.value2) {
  506. this.startDate = this.value2[0]
  507. this.endDate = this.value2[1]
  508. } else {
  509. this.startDate = ''
  510. this.endDate = ''
  511. }
  512. this.getList()
  513. },
  514. handleSizeChange(val) {
  515. console.log(`每页 ${val} 条`)
  516. this.pageSize = val
  517. this.getList()
  518. },
  519. handleCurrentChange(val) {
  520. this.currentPage = val
  521. console.log(`当前页: ${val}`)
  522. this.getList()
  523. },
  524. selectWarehouse() {
  525. let _wareHouse = localStorage.getItem('houseSelfCollect_house1')
  526. _wareHouse = JSON.parse(_wareHouse)
  527. selectWarehouseSelf({
  528. compId: localStorage.getItem('ws-pf_compId'),
  529. })
  530. .toPromise()
  531. .then((response) => {
  532. this.warehouseList = []
  533. for (let i = 0; i < response.length; i++) {
  534. this.warehouseList.push({
  535. value: response[i].warehouseName,
  536. warehouseId: response[i].id,
  537. allowEdit: response[i].allowEdit,
  538. monitorUrl1: response[i].monitorUrl1,
  539. monitorUrl2: response[i].monitorUrl2,
  540. id: response[i].id,
  541. warehouseNo: response[i].commonWarehouseNo,
  542. compId: response[i].compId
  543. })
  544. if (_wareHouse && response[i].warehouseName == _wareHouse.value) {
  545. this.cangid = _wareHouse.warehouseId
  546. this.warehouseName = response[i].warehouseName
  547. this.common.name = _wareHouse.value
  548. this.warehouseId = _wareHouse.warehouseId
  549. this.warehouseNo = _wareHouse.warehouseNo
  550. this.monitorUrl1 = _wareHouse.monitorUrl1
  551. this.allowEdit = response[i].allowEdit
  552. this.monitorUrl2 = _wareHouse.monitorUrl2
  553. } else {
  554. if (this.cangid && this.cangid == response[i].id) {
  555. this.warehouseName = response[i].warehouseName
  556. this.allowEdit = response[i].allowEdit
  557. this.common.name = response[i].warehouseName
  558. this.warehouseId = response[i].id
  559. this.warehouseNo = response[i].commonWarehouseNo
  560. this.monitorUrl1 = response[i].monitorUrl1
  561. this.monitorUrl2 = response[i].monitorUrl2
  562. }
  563. if (this.warehouseList.length > 0 && !this.cangid) {
  564. this.warehouseName = this.warehouseList[0].value
  565. this.allowEdit = this.warehouseList[0].allowEdit
  566. this.cangid = this.warehouseList[0].warehouseId
  567. this.warehouseId = this.warehouseList[0].warehouseId
  568. this.WAREHOUSE[1].payname = this.warehouseList[0].value
  569. this.common.name = this.warehouseList[0].value
  570. this.monitorUrl1 = this.warehouseList[0].monitorUrl1
  571. this.monitorUrl2 = this.warehouseList[0].monitorUrl2
  572. }
  573. }
  574. }
  575. localStorage.setItem('ck', this.common.name)
  576. this.getList()
  577. })
  578. },
  579. getList() {
  580. getweighingList({
  581. compId: localStorage.getItem('ws-pf_compId'),
  582. currentPage: this.currentPage,
  583. pageSize: this.pageSize,
  584. searchKeyWord: this.searchKeyWord,
  585. warehouseName: this.warehouseName,
  586. startDate: this.startDate,
  587. endDate: this.endDate,
  588. managementType: 1
  589. })
  590. .toPromise()
  591. .then((response) => {
  592. for (let i = 0; i < response.records.length; i++) {
  593. if (response.records[i].paymentManagement) {
  594. if (response.records[i].paymentManagement.approveStatus || response.records[i]
  595. .paymentManagement.status != '待结算') {
  596. response.records[i].allow = 2
  597. }
  598. } else {
  599. response.records[i].allow = 1
  600. }
  601. }
  602. this.weighingList = response.records
  603. this.common.commonWeighingList = response.records
  604. this.deptBudgetTotal = response.total
  605. })
  606. .catch((response) => {
  607. // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  608. })
  609. },
  610. },
  611. }
  612. </script>
  613. <style lang="scss" scoped>
  614. .title {
  615. font-size: 20px;
  616. font-weight: 600;
  617. margin: 20px;
  618. }
  619. .ws-info-table {
  620. border: none;
  621. }
  622. .ws-info-table .el-form-item {
  623. width: 50%;
  624. border: none;
  625. }
  626. /deep/.ws-info-table .el-form-item .el-form-item__label {
  627. width: 30%;
  628. text-align: center;
  629. background: #ffffff;
  630. color: #8890b1;
  631. }
  632. /deep/.ws-info-table .el-form-item .el-form-item__content {
  633. border: none;
  634. }
  635. /deep/.el-table .el-table__header .cell,
  636. .el-table .el-table__body .cell {
  637. text-align: center;
  638. }
  639. /deep/.el-table--enable-row-transition .el-table__body td {
  640. text-align: center;
  641. }
  642. .formItem {
  643. width: 51% !important;
  644. }
  645. /deep/.el-dialog__title {
  646. font-size: 24px !important;
  647. }
  648. /deep/.el-dialog__header {
  649. text-align: center !important;
  650. padding: 10px 0 !important;
  651. height: auto !important;
  652. }
  653. .number {
  654. text-align: right;
  655. margin: 0 0 10px 0;
  656. }
  657. table,
  658. table tr th,
  659. table tr td {
  660. border: 2px solid #333333;
  661. padding: 5px 0;
  662. }
  663. table {
  664. width: 100%;
  665. min-height: 25px;
  666. line-height: 25px;
  667. text-align: center;
  668. border-collapse: collapse;
  669. border: 3px solid #333333;
  670. }
  671. .col-bgc {
  672. background: #f6f7fb;
  673. }
  674. .bottom-row1 {
  675. display: flex;
  676. margin: 10px 0;
  677. }
  678. .bottom-row2 {
  679. display: flex;
  680. margin: 10px 0;
  681. .left {
  682. img {
  683. width: 41px;
  684. height: 41px;
  685. margin-right: 118px;
  686. }
  687. }
  688. .config {
  689. margin-top: 20px;
  690. margin-right: 240px;
  691. }
  692. .autograph {
  693. margin-top: 20px;
  694. }
  695. }
  696. .bottom-row3 {
  697. margin: 10px 0;
  698. }
  699. .bottom-row4 {
  700. margin-top: 50px;
  701. text-align: center;
  702. }
  703. .mask {
  704. background: black;
  705. width: 100vw;
  706. height: 100vh;
  707. position: fixed;
  708. top: 0;
  709. z-index: 99;
  710. opacity: 0.3;
  711. }
  712. .print-type-title {
  713. text-align: center;
  714. font-size: 18px;
  715. margin: 20px;
  716. }
  717. .bottom-btn {
  718. display: flex;
  719. margin-top: 20px;
  720. justify-content: space-around;
  721. }
  722. .print-type-checkbox {
  723. // padding-left: 20px;
  724. }
  725. .print-type {
  726. position: absolute;
  727. top: 0;
  728. bottom: 0;
  729. left: 0;
  730. right: 0;
  731. margin: auto;
  732. width: 220px;
  733. height: 160px;
  734. background: white;
  735. border-radius: 10px;
  736. z-index: 999;
  737. }
  738. /deep/.el-radio-group {
  739. width: 100%;
  740. display: flex;
  741. }
  742. /deep/.el-radio__label {
  743. font-size: 20px;
  744. }
  745. /deep/.el-radio__inner {
  746. // background: red;
  747. height: 20px;
  748. width: 20px;
  749. }
  750. .label-width {
  751. width: 100%;
  752. text-align: center;
  753. font-size: 20px;
  754. }
  755. .show-excel {
  756. opacity: 0;
  757. }
  758. /deep/.base_header_layout .find.el-button--primary {
  759. width: 30px;
  760. border-top-left-radius: 0px;
  761. border-bottom-left-radius: 0px;
  762. }
  763. /deep/.base_header_layout .findinput input {
  764. border-top-right-radius: 0px;
  765. border-bottom-right-radius: 0px;
  766. }
  767. </style>