newQualityInspectionManagement.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778
  1. <!--质检信息-->
  2. <template>
  3. <div class="center">
  4. <div class="substance">
  5. <div class="substance-left">
  6. <div class="titleTop">
  7. <div class="title"></div>
  8. <div class="textword">基本信息</div>
  9. </div>
  10. <ws-form>
  11. <ws-info-table>
  12. <ws-form-item label="任务编号" span="1" prop="contractNo">
  13. <ws-input v-model="inspect.contractNo" placeholder="自动获取,不可编辑" disabled size="small" />
  14. </ws-form-item>
  15. <ws-form-item label="仓位号" span="1" prop="binNumber">
  16. <ws-input v-model="inspect.binNumber" placeholder="自动获取,不可编辑" disabled size="small" />
  17. </ws-form-item>
  18. <ws-form-item label="业务编号" span="1" prop="number">
  19. <ws-input v-model="inspect.weighingManagement.number" placeholder="自动获取,不可编辑" disabled size="small" />
  20. </ws-form-item>
  21. <ws-form-item label="囤位号" span="1" prop="storageTagNo">
  22. <ws-input v-model="inspect.storageTagNo" placeholder="暂无" disabled size="small" />
  23. </ws-form-item>
  24. <ws-form-item label="合同/移库编号" span="1" prop="contractNo"><!--moveTaskNo-->
  25. <ws-input v-model="inspect.contractNo" placeholder="自动获取,不可编辑" disabled size="small" v-if="inspect.contractNo" />
  26. <ws-input v-model="inspect.moveTaskNo" placeholder="自动获取,不可编辑" disabled size="small" v-else/>
  27. </ws-form-item>
  28. <ws-form-item label="提示" span="1" prop="tips">
  29. <ws-input v-model="inspect.weighingManagement.tips" placeholder="暂无" disabled size="small" />
  30. </ws-form-item>
  31. <ws-form-item label="货名" span="1" prop="goodsName">
  32. <ws-input v-model="inspect.goodsName" placeholder="自动获取,不可编辑" disabled size="small" />
  33. </ws-form-item>
  34. <ws-form-item label="经办人" span="1" prop="secretaryWeigher">
  35. <ws-input v-model="inspect.weighingManagement.secretaryWeigher" placeholder="自动获取,不可编辑" disabled size="small" />
  36. </ws-form-item>
  37. <ws-form-item label="出库类型" span="1" prop="inOutType">
  38. <ws-input v-model="inspect.weighingManagement.inOutType" placeholder="自动获取,不可编辑" disabled size="small" />
  39. </ws-form-item>
  40. <ws-form-item label="出库日期" span="1" prop="updateDate">
  41. <ws-input v-model="inspect.updateDate" placeholder="自动获取,不可编辑" disabled size="small" />
  42. </ws-form-item>
  43. <ws-form-item label="运输方式" span="1" prop="outType">
  44. <ws-input v-model="inspect.weighingManagement.outType" placeholder="自动获取,不可编辑" disabled size="small" />
  45. </ws-form-item>
  46. <ws-form-item label="车队" span="1" prop="fleet">
  47. <ws-input v-model="inspect.fleet" placeholder="非车队车辆" disabled size="small" />
  48. </ws-form-item>
  49. <ws-form-item label="车牌号" span="1" prop="carNumber">
  50. <ws-input v-model="inspect.carNumber" placeholder="自动获取,不可编辑" disabled size="small" />
  51. </ws-form-item>
  52. <ws-form-item label="箱号-1" span="1" prop="boxNo">
  53. <ws-input v-model="inspect.weighingManagement.boxNo" placeholder="暂无" disabled size="small" />
  54. </ws-form-item>
  55. <ws-form-item label="箱号-2" span="1" prop="boxNoOther">
  56. <ws-input v-model="inspect.weighingManagement.boxNoOther" placeholder="暂无" disabled size="small" />
  57. </ws-form-item>
  58. <ws-form-item label="封号-1" span="1" prop="titleNo">
  59. <ws-input v-model="inspect.weighingManagement.titleNo" placeholder="暂无" disabled size="small" />
  60. </ws-form-item>
  61. <ws-form-item label="封号-2" span="1" prop="titleNoOther">
  62. <ws-input v-model="inspect.weighingManagement.titleNoOther" placeholder="暂无" disabled size="small" />
  63. </ws-form-item>
  64. </ws-info-table>
  65. </ws-form>
  66. </div>
  67. <div class="substance-right">
  68. <el-select v-model="warehouseName" placeholder="请选择仓库名" @change="warehouseNameChange">
  69. <el-option v-for="item in warehouseList" :key="item.id" :label="item.warehouseName"
  70. :value="item.warehouseName">
  71. </el-option>
  72. </el-select>
  73. <div class="screen">
  74. <div class="screen_left">
  75. <el-badge :value="noinspectList.length" class="badge_item">
  76. <div :class="inspectbtn == 1 ? 'inspect_css':'noinspect_css'" @click="inspectChange(1)">未质检</div>
  77. </el-badge>
  78. <el-badge :value="inspectList.length" class="badge_item">
  79. <div :class="inspectbtn == 2 ? 'inspect_css':'noinspect_css'" @click="inspectChange(2)">已质检</div>
  80. </el-badge>
  81. </div>
  82. <div class="screen_right">
  83. <div class="record" @click="record">记录</div>
  84. </div>
  85. </div>
  86. <!-- <el-table @cell-click='listclick' :data="inspectList" style="width: 100%; margin-top: 20px" ref="inspect" border>
  87. <el-table-column prop="qualityNo" label="业务编号"></el-table-column>
  88. <el-table-column prop="carNumber" label="车牌号"></el-table-column>
  89. <el-table-column prop="status" label="状态">
  90. <template slot-scope="scope">
  91. <span v-if='scope.row.confirm=="1"'>
  92. 已确认
  93. </span>
  94. <span v-else>
  95. {{scope.row.status}}
  96. </span>
  97. </template>
  98. </el-table-column>
  99. </el-table> -->
  100. <el-table ref="singleTable" :data="switchList" highlight-current-row @current-change="rowChange"
  101. style="width: 100%; overflow-y: scroll !important; height: calc(100vh - 54vh);margin-top:14px">
  102. <el-table-column property="number" label="业务编号">
  103. <span slot-scope="scope">{{scope.row.weighingManagement?scope.row.weighingManagement.number:""}}</span>
  104. </el-table-column>
  105. <el-table-column property="carNumber" label="车牌号">
  106. </el-table-column>
  107. <el-table-column property="status" label="状态">
  108. </el-table-column>
  109. </el-table>
  110. <div style="text-align: center">
  111. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
  112. :current-page="currentPage" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper"
  113. :total="deptBudgetTotal">
  114. </el-pagination>
  115. </div>
  116. </div>
  117. </div>
  118. <div class="footer">
  119. <div class="titleTop">
  120. <div class="title"></div>
  121. <div class="textword">质检数据</div>
  122. </div>
  123. <div class="formList">
  124. <ws-form>
  125. <ws-info-table>
  126. <ws-form-item label="等级" prop="grade">
  127. <ws-select v-model="inspect.grade" placeholder="请输入等级" class="typeselect" :disabled="disabled">
  128. <ws-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue"
  129. :value="item.constValue" />
  130. </ws-select>
  131. </ws-form-item>
  132. <ws-form-item label="杂质(%)" prop="impurity">
  133. <el-input v-model="inspect.impurity" placeholder="请输入杂质占比" maxlength="10" size="small" type="number" :disabled="disabled" />
  134. </ws-form-item>
  135. <ws-form-item label="水分(%)" prop="waterContent">
  136. <el-input v-model="inspect.waterContent" placeholder="请输入水分占比" maxlength="10" size="small" type="number" :disabled="disabled" />
  137. </ws-form-item>
  138. <ws-form-item label="霉变粒(%)" prop="mildewGrain">
  139. <el-input v-model="inspect.mildewGrain" placeholder="请输入霉变粒占比" maxlength="10" size="small" type="number" :disabled="disabled" />
  140. </ws-form-item>
  141. <ws-form-item label="容重(克/升)" prop="bulkDensity">
  142. <el-input v-model="inspect.bulkDensity" placeholder="请输入容重" maxlength="10" size="small" type="number" :disabled="disabled" />
  143. </ws-form-item>
  144. <ws-form-item label="热损伤(%)" prop="jiaorenli">
  145. <el-input v-model="inspect.jiaorenli" placeholder="请输入热损伤占比" maxlength="10" size="small" type="number" :disabled="disabled" />
  146. </ws-form-item>
  147. <ws-form-item label="不完善粒(%)" prop="imperfectGrain">
  148. <el-input v-model="inspect.imperfectGrain" placeholder="请输入不完善粒占比" maxlength="10" size="small" type="number" :disabled="disabled" />
  149. </ws-form-item>
  150. </ws-info-table>
  151. </ws-form>
  152. <div class="but">
  153. <!-- <el-button @click="print" type="primary">提交</el-button> -->
  154. <el-button @click="print" type="primary">提交并打印</el-button>
  155. </div>
  156. </div>
  157. </div>
  158.  <el-dialog width="70%" class="table-content" center :visible.sync="isShowPrint" title="粮食质检单" @close="closeDialog">
  159. <!-- <inspectInfoPrint :printData="printData"></inspectInfoPrint> -->
  160. <outInspectPrint :printData="printData" ref="saveImg"></outInspectPrint>
  161. <div style="text-align:center">
  162. <el-button type="primary" @click="isShowPrint = false">关闭</el-button>
  163. <el-button type="primary" @click="printSmall">打印小票</el-button>
  164. <el-button type="primary" @click="printBig">打印单据</el-button>
  165. </div>
  166. </el-dialog>
  167. </div>
  168. </template>
  169. <script>
  170. import {
  171. addOut,
  172. selectWarehouseSelf,
  173. getinspectList
  174. } from '@/model/outboundManagement/index'
  175. import {
  176. packList
  177. } from '@/model/contarct/index'
  178. import html2canvas from 'html2canvas'
  179. import axios from 'axios'
  180. import outInspectPrint from './component/outInspectPrint.vue'
  181. export default {
  182. components: {
  183. outInspectPrint,
  184. },
  185. watch: {},
  186. data() {
  187. return {
  188. inspect: {
  189. weighingManagement:{}
  190. },
  191. disabled: false,
  192. gradeList: [],
  193. cangid: '', //仓库id
  194. warehouseName: '',
  195. warehouseList: [],
  196. inspectbtn: 1,
  197. inspectList: [],
  198. noinspectList:[],
  199. switchList:[],
  200. //分页
  201. currentPage: 1,
  202. pageSize: 10,
  203. deptCircularPage: {},
  204. deptBudgetTotal: 0,
  205. managementType: 3,
  206. isShowPrint:false,
  207. printData:{}
  208. }
  209. },
  210. activated() {
  211. // this.cangid = this.$route.query.cangid
  212. // this.warehouseName = this.$route.query.warehouseName
  213. // this.inspect.contractNo = this.$route.query.contractNo
  214. // this.inspect.binNumber = this.$route.query.binNumber
  215. // this.inspect.carNumber = this.$route.query.carNumber
  216. // this.inspect.goodsName = this.$route.query.goodsName
  217. // this.inspect.storageTagNo = this.$route.query.storageTagNo
  218. // let id = this.$route.query.id
  219. // this.cangNo = this.$route.query.warehouseNo
  220. // this.count = Number(this.$route.query.count) + 1
  221. // 品级
  222. packList({
  223. constId: 'CON3'
  224. })
  225. .toPromise()
  226. .then((response) => {
  227. this.gradeList = response
  228. })
  229. //仓库
  230. selectWarehouseSelf({
  231. compId: localStorage.getItem('ws-pf_compId'),
  232. })
  233. .toPromise()
  234. .then((response) => {
  235. this.warehouseList = response
  236. let _wareHouse = localStorage.getItem('houseSelfCollect_house1')
  237. _wareHouse = JSON.parse(_wareHouse)
  238. for (let i = 0; i < response.length; i++) {
  239. if (_wareHouse && response[i].warehouseName == _wareHouse.value) {
  240. this.warehouseName = response[i].warehouseName
  241. this.warehouseId = response[i].warehouseId
  242. this.positionInfos=response[i].positionInfos
  243. this.warehouseCount = response[i].count
  244. this.warehouseNo = response[i].commonWarehouseNo
  245. this.warehouseType=response[i].warehouseType
  246. }
  247. if (!_wareHouse) {
  248. this.warehouseName = this.warehouseList[0].value
  249. this.warehouseId = this.warehouseList[0].warehouseId
  250. this.positionInfos=response[0].positionInfos
  251. this.warehouseCount = response[0].count
  252. this.warehouseNo = response[0].commonWarehouseNo
  253. this.warehouseType=response[0].warehouseType
  254. }
  255. }
  256. if (_wareHouse ) {
  257. this.warehouseName =_wareHouse.value
  258. for (var i = 0; i < response.length; i++) {
  259. if (response[i].warehouseName == _wareHouse.value) {
  260. this.cangid = this.warehouseList[i].id
  261. break
  262. }
  263. }
  264. } else {
  265. this.warehouseName = this.warehouseList[0].warehouseName
  266. localStorage.setItem('ck', this.warehouseName)
  267. this.cangid = this.warehouseList[0].id
  268. }
  269. this.getList()
  270. })
  271. },
  272. methods: {
  273. printSmall(){
  274. this.inspect.type = 1
  275. localStorage.setItem('out-Warehouse_print',JSON.stringify( this.inspect))
  276. window.open('../../../static/outInspectionPrint.html')
  277. },
  278. printBig(){
  279. this.inspect.type = 2
  280. localStorage.setItem('out-Warehouse_print',JSON.stringify(this.inspect))
  281. window.open('../../../static/outInspectionPrint.html')
  282. },
  283. warehouseNameChange(e) {
  284. for (let i = 0; i < this.warehouseList.length; i++) {
  285. if(this.warehouseList[i].warehouseName==e){
  286. localStorage.setItem('houseSelfCollect_house1', JSON.stringify({
  287. No:this.warehouseList[i].commonWarehouseNo,
  288. allowEdit:this.warehouseList[i].allowEdit,
  289. value:this.warehouseList[i].warehouseName,
  290. count:this.warehouseList[i].count,
  291. warehouseId:this.warehouseList[i].id
  292. }))
  293. // this.positionInfos=this.warehouseList1[i].positionInfos
  294. // this.warehouseCount = this.warehouseList1[i].count
  295. // this.warehouseNo = this.warehouseList1[i].commonWarehouseNo
  296. // this.warehouseType=this.warehouseList1[i].warehouseType
  297. }
  298. }
  299. this.getList()
  300. },
  301. record(){
  302. this.$router.push({
  303. path:'outInspectRecord',
  304. query:{warehouseName: this.warehouseName}
  305. })
  306. },
  307. inspectChange(num) {
  308. this.inspectbtn = num
  309. if(num == 1){
  310. this.switchList = this.noinspectList
  311. }else if(num == 2){
  312. this.switchList = this.inspectList
  313. }
  314. if(this.switchList.length > 0){
  315. this.inspect = this.switchList[0]
  316. if(!this.inspect.weighingManagement){
  317. this.inspect.weighingManagement = {}
  318. }
  319. }else{
  320. this.inspect = {}
  321. }
  322. this.deptBudgetTotal = this.switchList.length
  323. },
  324. handleSizeChange(val) {
  325. console.log(`每页 ${val} 条`)
  326. this.pageSize = val
  327. this.getList()
  328. },
  329. handleCurrentChange(val) {
  330. this.currentPage = val
  331. console.log(`当前页: ${val}`)
  332. this.getList()
  333. },
  334. rowChange(val) {
  335. // if(this.tpyeNo == 2 && this.status == 1 && val.qualityInspectionManagement.confirm == 0){
  336. // this.$message({
  337. // message: '该条质检信息未确认',
  338. // type: 'warning'
  339. // });
  340. // }
  341. if(val){
  342. this.inspect = val
  343. }
  344. },
  345. getdate() {
  346. var date = new Date()
  347. var year = date.getFullYear() //获取完整的年份(4位)
  348. var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
  349. var datetime = date.getDate() //获取当前日(1-31)
  350. if (mouth < 10) {
  351. mouth = '0' + mouth
  352. }
  353. if (datetime < 10) {
  354. datetime = '0' + datetime
  355. }
  356. return year + '' + mouth + datetime
  357. },
  358. closeDialog() {
  359. html2canvas(this.$refs.saveImg.$el).then((canvas) => {
  360. let dataURL = canvas.toDataURL('image/png')
  361. this.imgUrl = dataURL
  362. if (this.imgUrl !== '') {
  363. let b = this.dataURLtoFile(this.imgUrl, 'printImage')
  364. let formdata = new FormData()
  365. formdata.append('file', b)
  366. axios({
  367. method: 'post',
  368. url: 'https://www.zthymaoyi.com/upload/admin',
  369. data: formdata,
  370. }).then((response) => {
  371. //编辑接口
  372. this.inspect.pictureAddress = response.data.url
  373. addOut(this.inspect)
  374. .toPromise()
  375. .then((response) => {
  376. })
  377. })
  378. }
  379. })
  380. this.isShowPrint = false
  381. },
  382. print() {
  383. this.inspect.warehouseName = this.warehouseName
  384. // this.inspect.id = this.$route.query.id
  385. this.inspect.qualityInspector = localStorage.getItem('ws-pf_staffName')
  386. this.inspect.compId = localStorage.getItem('ws-pf_compId')
  387. // if (!this.inspect.grade) {
  388. // this.$message({
  389. // message: '等级不能为空',
  390. // type: 'warning',
  391. // })
  392. // return
  393. // }
  394. // if (!this.inspect.impurity) {
  395. // this.$message({
  396. // message: '杂质不能为空',
  397. // type: 'warning',
  398. // })
  399. // return
  400. // }
  401. if (this.inspect.impurity && (this.inspect.impurity < 0 || this.inspect.impurity > 40)) {
  402. this.$message({
  403. message: '杂质输入错误',
  404. type: 'warning',
  405. })
  406. return
  407. }
  408. if (this.inspect.impurity && String(this.inspect.impurity).indexOf('.') != -1 && String(this.inspect.impurity).length - (String(this
  409. .inspect.impurity).indexOf('.') + 1) > 1) {
  410. this.$message({
  411. message: '杂质应保留一位小数',
  412. type: 'warning',
  413. })
  414. return
  415. }
  416. // if (!this.inspect.waterContent) {
  417. // this.$message({
  418. // message: '水分不能为空',
  419. // type: 'warning',
  420. // })
  421. // return
  422. // }
  423. if (this.inspect.waterContent && (this.inspect.waterContent < 0 || this.inspect.waterContent > 40)) {
  424. this.$message({
  425. message: '水分输入错误',
  426. type: 'warning',
  427. })
  428. return
  429. }
  430. if (this.inspect.waterContent && String(this.inspect.waterContent).indexOf('.') != -1 && String(this.inspect.waterContent).length - (String(
  431. this.inspect.waterContent).indexOf('.') + 1) > 1) {
  432. this.$message({
  433. message: '水分应保留一位小数',
  434. type: 'warning',
  435. })
  436. return
  437. }
  438. // if (!this.inspect.mildewGrain) {
  439. // this.$message({
  440. // message: '霉变粒不能为空',
  441. // type: 'warning',
  442. // })
  443. // return
  444. // }
  445. if (this.inspect.mildewGrain && this.inspect.mildewGrain < 0 || this.inspect.mildewGrain > 40) {
  446. this.$message({
  447. message: '霉变粒输入错误',
  448. type: 'warning',
  449. })
  450. return
  451. }
  452. if (String(this.inspect.mildewGrain).indexOf('.') != -1 && String(this.inspect.mildewGrain).length - (String(
  453. this.inspect.mildewGrain).indexOf('.') + 1) > 1) {
  454. this.$message({
  455. message: '霉变粒应保留一位小数',
  456. type: 'warning',
  457. })
  458. return
  459. }
  460. // if (!this.inspect.bulkDensity) {
  461. // this.$message({
  462. // message: '容重不能为空',
  463. // type: 'warning',
  464. // })
  465. // return
  466. // }
  467. if (this.inspect.bulkDensity && this.inspect.bulkDensity < 500 || this.inspect.bulkDensity > 1000) {
  468. this.$message({
  469. message: '容重输入错误',
  470. type: 'warning',
  471. })
  472. return
  473. }
  474. if (this.inspect.bulkDensity && String(this.inspect.bulkDensity).indexOf('.') != -1 && String(this.inspect.bulkDensity).length - (String(
  475. this.inspect.bulkDensity).indexOf('.') + 1) > 0) {
  476. this.$message({
  477. message: '容重需输入整数',
  478. type: 'warning',
  479. })
  480. return
  481. }
  482. // if (!this.inspect.jiaorenli) {
  483. // this.$message({
  484. // message: '热损伤不能为空',
  485. // type: 'warning',
  486. // })
  487. // return
  488. // }
  489. if (this.inspect.jiaorenli && this.inspect.jiaorenli < 0 || this.inspect.jiaorenli > 40) {
  490. this.$message({
  491. message: '热损伤输入错误',
  492. type: 'warning',
  493. })
  494. return
  495. }
  496. if (String(this.inspect.jiaorenli).indexOf('.') != -1 && String(this.inspect.jiaorenli).length - (String(this
  497. .inspect.jiaorenli).indexOf('.') + 1) > 1) {
  498. this.$message({
  499. message: '热损伤应保留一位小数',
  500. type: 'warning',
  501. })
  502. return
  503. }
  504. // if (!this.inspect.imperfectGrain) {
  505. // this.$message({
  506. // message: '不完善粒不能为空',
  507. // type: 'warning',
  508. // })
  509. // return
  510. // }
  511. if (this.inspect.imperfectGrain && this.inspect.imperfectGrain < 0 || this.inspect.imperfectGrain > 40) {
  512. this.$message({
  513. message: '不完善粒输入错误',
  514. type: 'warning',
  515. })
  516. return
  517. }
  518. if ( this.inspect.imperfectGrain && String(this.inspect.imperfectGrain).indexOf('.') != -1 && String(this.inspect.imperfectGrain).length - (
  519. String(this.inspect.imperfectGrain).indexOf('.') + 1) > 1) {
  520. this.$message({
  521. message: '不完善粒应保留一位小数',
  522. type: 'warning',
  523. })
  524. return
  525. }
  526. this.$confirm('确定保存质检信息?', '提示', {
  527. confirmButtonText: '确定',
  528. cancelButtonText: '取消',
  529. type: 'warning',
  530. })
  531. .then(() => {
  532. addOut(this.inspect)
  533. .toPromise()
  534. .then((response) => {
  535. this.$message.success('保存成功')
  536. this.printData = this.inspect
  537. this.isShowPrint = true
  538. })
  539. })
  540. .catch(() => {
  541. return false
  542. })
  543. },
  544. cancel() {
  545. this.$router.push({
  546. path: 'qualityInspectionManagement'
  547. })
  548. },
  549. getList() {
  550. getinspectList({
  551. compId: localStorage.getItem('ws-pf_compId'),
  552. currentPage: this.currentPage,
  553. pageSize: this.pageSize,
  554. warehouseName: this.warehouseName,
  555. managementType: this.managementType,
  556. qualityType:1
  557. })
  558. .toPromise()
  559. .then((response) => {
  560. this.noinspectList = response.records
  561. if(this.inspectbtn == 1 && this.noinspectList.length > 0){
  562. this.switchList = this.noinspectList
  563. this.inspect = this.noinspectList[0]
  564. if(!this.inspect.weighingManagement){
  565. this.inspect.weighingManagement = {}
  566. }
  567. }else{
  568. this.switchList = []
  569. this.inspect = {}
  570. this.inspect.weighingManagement = {}
  571. }
  572. this.deptBudgetTotal = this.switchList.length
  573. })
  574. getinspectList({
  575. compId: localStorage.getItem('ws-pf_compId'),
  576. currentPage: this.currentPage,
  577. pageSize: this.pageSize,
  578. warehouseName: this.warehouseName,
  579. managementType: this.managementType,
  580. qualityType:2
  581. })
  582. .toPromise()
  583. .then((response) => {
  584. this.inspectList = response.records
  585. if(this.inspectbtn == 2 && this.inspectList.length > 0){
  586. this.switchList = this.inspectList
  587. this.inspect = this.inspectList[0]
  588. if(!this.inspect.weighingManagement){
  589. this.inspect.weighingManagement = {}
  590. }
  591. }else{
  592. this.switchList = []
  593. this.inspect = {}
  594. this.inspect.weighingManagement = {}
  595. }
  596. this.deptBudgetTotal = this.switchList.length
  597. })
  598. },
  599. },
  600. }
  601. </script>
  602. <style lang="scss" scoped>
  603. .center {
  604. background: #E8ECF6;
  605. overflow-y: scroll;
  606. }
  607. .ws-info-table {
  608. border: none;
  609. padding: 0 20px;
  610. }
  611. .ws-info-table .el-form-item {
  612. width: 50%;
  613. border: none;
  614. }
  615. /deep/.ws-info-table .el-form-item .el-form-item__label {
  616. width: 30%;
  617. text-align: center;
  618. background: #ffffff;
  619. font-size: 14px;
  620. color: #8890B1;
  621. min-width: 115px;
  622. }
  623. /deep/.ws-info-table .el-form-item .el-form-item__content {
  624. border: none;
  625. }
  626. .title::before {
  627. content: '';
  628. display: inline-block;
  629. width: 5px;
  630. height: 30px;
  631. background: #5473E8;
  632. margin-right: 10px;
  633. margin-top: 15px;
  634. }
  635. .titleTop {
  636. display: flex;
  637. width: 100%;
  638. height: 60px;
  639. background: #F6F7FC;
  640. line-height: 60px;
  641. margin-bottom: 20px;
  642. border-radius: 4px;
  643. .textword {
  644. font-size: 18px;
  645. font-weight: 600;
  646. }
  647. }
  648. .substance {
  649. display: flex;
  650. width: 100%;
  651. height: 730px;
  652. .substance-left {
  653. width: 59%;
  654. background: #ffffff;
  655. border-radius: 4px;
  656. /deep/.el-input.is-disabled .el-input__inner{
  657. background: #F5F7FA;
  658. border-radius: 4px;
  659. color: #8890B1 !important;
  660. border: none;
  661. }
  662. /deep/.ws-info-table .el-form-item{
  663. margin: 10px 0;
  664. }
  665. }
  666. .substance-right {
  667. width: 40%;
  668. background: #ffffff;
  669. margin-left: 20px;
  670. border-radius: 4px;
  671. padding: 10px 20px 0;
  672. /deep/.el-select {
  673. width: 50%;
  674. }
  675. .screen {
  676. display: flex;
  677. width: 100%;
  678. margin: 15px 10px 0 0;
  679. border-bottom: 1px solid #D8DCE6;
  680. height: 45px;
  681. .screen_left,
  682. .screen_right {
  683. width: 50%;
  684. }
  685. .screen_left{
  686. min-width: 182px;
  687. }
  688. .badge_item {
  689. margin-right: 15px;
  690. }
  691. .inspect_css,
  692. .noinspect_css,
  693. .record {
  694. width: 74px;
  695. height: 32px;
  696. border-radius: 4px;
  697. text-align: center;
  698. line-height: 32px;
  699. }
  700. .record:hover,.inspect_css:hover,.noinspect_css:hover{
  701. cursor:pointer;
  702. }
  703. .inspect_css {
  704. background: #F0F6FF;
  705. color: #5878E8;
  706. }
  707. .screen_right {
  708. justify-content: flex-end;
  709. display: flex;
  710. }
  711. .record {
  712. color: #5878E8;
  713. }
  714. }
  715. }
  716. }
  717. .footer {
  718. margin-top: 20px;
  719. background: #FFFFFF;
  720. border-radius: 4px;
  721. height: 300px;
  722. .formList {
  723. width: 90%;
  724. margin: auto;
  725. }
  726. /deep/.el-form-item__content {
  727. width: 50%;
  728. }
  729. }
  730. /deep/.el-table .el-table__header .cell,
  731. .el-table .el-table__body .cell {
  732. text-align: center;
  733. }
  734. /deep/.el-table--enable-row-transition .el-table__body td {
  735. text-align: center;
  736. }
  737. .bg-right {
  738. padding-right: 10px;
  739. text-align: right;
  740. }
  741. .but {
  742. text-align: center;
  743. margin: 20px auto;
  744. }
  745. </style>