warehouseManagementPerfectput.vue 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524
  1. // 完善入库信息
  2. <template>
  3. <div class="container">
  4. <el-row>
  5. <el-col :span="20">
  6. <h2 class="bg-left title">完善入库登记</h2>
  7. </el-col>
  8. <el-col :span="4" class="bg-right">
  9. <el-button
  10. class="bg-bottom"
  11. type="primary"
  12. size="small"
  13. @click="revert()"
  14. ><img
  15. width="6"
  16. height="10"
  17. style="vertical-align: bottom; margin-right: 3px"
  18. src="../../../public/img/lujing.png"
  19. alt=""
  20. />返回</el-button
  21. >
  22. </el-col>
  23. </el-row>
  24. <ws-form ref="dataList" :model="dataList" :rules="rules">
  25. <div class="basicInformation">
  26. <h2>
  27. {{ deptBudgetList1.warehouseName }}库
  28. <span class="position" v-show="this.$route.query.warehouseType == 1">
  29. {{ deptBudgetList1.binNumber }}仓位
  30. </span>
  31. <span v-show="this.$route.query.warehouseType == 2">(临)</span>
  32. </h2>
  33. <div class="small-title">基本信息</div>
  34. <ws-info-table>
  35. <ws-form-item label="合同编号" span="1" prop="contractNo">
  36. <el-select
  37. filterable
  38. :filter-method="dataFilter1"
  39. v-model="dataList.contractNo"
  40. placeholder="请选择合同编号或移库任务编号"
  41. class="typeselect"
  42. @change='contractNoChange'
  43. >
  44. <el-option
  45. v-for="item in options1"
  46. :key="item.constKey"
  47. :label="item.contractNo"
  48. :value="item.contractNo"
  49. />
  50. </el-select>
  51. </ws-form-item>
  52. <!-- 货名 -->
  53. <ws-form-item label="货名" span="1">
  54. <ws-select
  55. disabled
  56. v-model="dataList.goodsName"
  57. placeholder
  58. class="typeselect"
  59. @change="selectgoodsName"
  60. >
  61. <ws-option
  62. v-for="item in goodnameList"
  63. :key="item.constKey"
  64. :label="item.constValue"
  65. :value="item.constValue"
  66. />
  67. </ws-select>
  68. </ws-form-item>
  69. <ws-form-item label="类型" span="1" prop="type">
  70. <ws-select v-model="dataList.type" @change="typeChange">
  71. <ws-option v-for="item in typeList" :key="item" :label="item" :value="item" />
  72. </ws-select>
  73. </ws-form-item>
  74. <!--毛重(吨)-->
  75. <ws-form-item label="毛重(吨)" span="1" prop="grossWeight">
  76. <ws-input
  77. @input="grossWeightchange"
  78. v-model="dataList.grossWeight"
  79. placeholder="请输入毛重"
  80. maxlength="20"
  81. size="small"
  82. />
  83. </ws-form-item>
  84. <!--皮重(吨)-->
  85. <ws-form-item label="皮重(吨)" span="1" prop="tare" class="readonly">
  86. <ws-input
  87. @input="tarechange"
  88. v-model="dataList.tare"
  89. placeholder="请输入皮重"
  90. maxlength="100"
  91. size="small"
  92. />
  93. </ws-form-item>
  94. <ws-form-item label="扣重(吨)" span="1" prop="deductionWeight" class="readonly">
  95. <ws-input
  96. @input="tarechange"
  97. v-model="dataList.deductionWeight"
  98. placeholder="请输入扣重"
  99. maxlength="100"
  100. size="small"
  101. />
  102. </ws-form-item>
  103. <!--净重(吨)-->
  104. <ws-form-item label="净重(吨)" span="1" prop="netWeight">
  105. <ws-input
  106. readonly="readonly"
  107. v-model="dataList.netWeight"
  108. placeholder="不可编辑,自动计算"
  109. maxlength="120"
  110. size="small"
  111. />
  112. </ws-form-item>
  113. <ws-form-item v-if='dataList.type=="潮粮"' label="扣重比" span="1" prop="buckleWeightRatio" class="readonly">
  114. <ws-input
  115. @input='pureweight'
  116. v-model="dataList.buckleWeightRatio"
  117. placeholder="请输入扣重比"
  118. maxlength="100"
  119. size="small"
  120. />
  121. </ws-form-item>
  122. <ws-form-item v-if='dataList.type=="潮粮"' label="干粮水分占比" span="1" prop="solidGrainWater" class="readonly">
  123. <ws-input
  124. @input='pureweight'
  125. v-model="dataList.solidGrainWater"
  126. placeholder="请输入干粮水分占比"
  127. maxlength="100"
  128. size="small"
  129. />
  130. </ws-form-item>
  131. <ws-form-item v-if='dataList.type=="潮粮"' label="潮粮水分占比" span="1" prop="tidalGrainWater" class="readonly">
  132. <ws-input
  133. @input='pureweight'
  134. v-model="dataList.tidalGrainWater"
  135. placeholder="请输入潮粮水分占比"
  136. maxlength="100"
  137. size="small"
  138. />
  139. </ws-form-item>
  140. <ws-form-item v-if='dataList.type=="潮粮"' label="纯重" span="1" prop="pureWeight" class="readonly">
  141. <ws-input
  142. disabled
  143. v-model="dataList.pureWeight"
  144. placeholder="不可编辑,自动计算"
  145. maxlength="100"
  146. size="small"
  147. />
  148. </ws-form-item>
  149. <!--净重(吨)-->
  150. <ws-form-item label="扣款" span="1" prop="deductionAmount">
  151. <ws-input
  152. v-model="dataList.deductionAmount"
  153. placeholder="请输入扣款金额"
  154. maxlength="120"
  155. size="small"
  156. />
  157. </ws-form-item>
  158. <!-- 品级 -->
  159. <ws-form-item label="品级" span="1" class="readonly">
  160. <ws-select
  161. v-model="dataList.grade"
  162. placeholder
  163. class="typeselect"
  164. @change="selectpackingMethod"
  165. >
  166. <ws-option
  167. v-for="item in gradeList"
  168. :key="item.constKey"
  169. :label="item.constValue"
  170. :value="item.constValue"
  171. />
  172. </ws-select>
  173. </ws-form-item>
  174. <!--经办人-->
  175. <ws-form-item label="经办人" span="1" prop="agent">
  176. <el-select
  177. v-model="dataList.agent"
  178. placeholder="请选择经办人"
  179. filterable
  180. :filter-method="dataFilter"
  181. @change="selectstaff"
  182. >
  183. <el-option
  184. v-for="item in options"
  185. :key="item.value"
  186. :label="item.staffName"
  187. :value="item.staffName"
  188. />
  189. </el-select>
  190. </ws-form-item>
  191. <!--出库日期-->
  192. <ws-form-item label="入库日期" span="1" prop="inOutDate" class="deliverydate">
  193. <el-date-picker
  194. v-model="dataList.inOutDate"
  195. placeholder="请选择入库日期"
  196. type="date"
  197. value-format="yyyy-MM-dd"
  198. ></el-date-picker>
  199. </ws-form-item>
  200. <!-- 入库类型 -->
  201. <ws-form-item label="入库类型" span="1">
  202. <ws-select
  203. v-model="dataList.inOutType"
  204. placeholder
  205. class="typeselect"
  206. @change="selectstorageType"
  207. >
  208. <ws-option
  209. v-for="item in storageType"
  210. :key="item.constKey"
  211. :label="item.constValue"
  212. :value="item.constValue"
  213. />
  214. </ws-select>
  215. </ws-form-item>
  216. <!--车牌号 -->
  217. <ws-form-item label="车牌号" span="1" prop="carNo">
  218. <ws-input
  219. v-if='!carstatus'
  220. v-model="dataList.carNo"
  221. placeholder="请输入车牌号"
  222. maxlength="7"
  223. size="small"
  224. />
  225. <el-select
  226. v-if='carstatus'
  227. filterable
  228. :filter-method="dataFilter2"
  229. v-model="dataList.carNo"
  230. placeholder="请选择车牌号"
  231. class="typeselect"
  232. @change='carChange'
  233. >
  234. <el-option
  235. v-for="item in options2"
  236. :key="item.constKey"
  237. :label="item.carNo+'('+item.tranCarNo+')'"
  238. :value="item.carNo"
  239. />
  240. </el-select>
  241. </ws-form-item>
  242. <ws-form-item label="成本" span="1" prop="cost">
  243. <ws-input
  244. :disabled='disabled1'
  245. v-model="dataList.cost"
  246. placeholder="请输入成本"
  247. size="small"
  248. />
  249. <img
  250. width="17"
  251. height="18"
  252. style="vertical-align: text-top; position: relative; top: -1px"
  253. src="../../../public/img/edit.png"
  254. @click="editClick(1)"
  255. alt=""
  256. />
  257. </ws-form-item>
  258. <ws-form-item label="运费" span="1" prop="freight">
  259. <ws-input
  260. :disabled='disabled2'
  261. v-model="dataList.freight"
  262. placeholder="请输入运费"
  263. size="small"
  264. />
  265. <img
  266. width="17"
  267. height="18"
  268. style="vertical-align: text-top; position: relative; top: -1px"
  269. src="../../../public/img/edit.png"
  270. @click="editClick(2)"
  271. alt=""
  272. />
  273. </ws-form-item>
  274. </ws-info-table>
  275. <div v-show="this.$route.query.warehouseType == 2 && this.$route.query.createType == 2">
  276. <el-checkbox v-model="checked" checked>退库并出库</el-checkbox>
  277. <ws-info-table v-show="checked == true">
  278. <!-- 出库类型 -->
  279. <ws-form-item label="出库类型" span="1">
  280. <ws-select
  281. v-model="dataList.temporaryOutType"
  282. placeholder=""
  283. class="typeselect"
  284. >
  285. <ws-option
  286. v-for="item in deliveryType"
  287. :key="item.constKey"
  288. :label="item.constValue"
  289. :value="item.constValue"
  290. />
  291. </ws-select>
  292. </ws-form-item>
  293. <!-- 出库合同编号 -->
  294. <ws-form-item label="出库合同编号" span="1">
  295. <ws-select
  296. v-model="dataList.contractNo"
  297. placeholder="请选择合同编号或移库任务编号"
  298. class="typeselect"
  299. >
  300. <ws-option
  301. v-for="item in outContractNo"
  302. :key="item.constKey"
  303. :label="item.contractNo"
  304. :value="item.contractNo"
  305. />
  306. </ws-select>
  307. </ws-form-item>
  308. </ws-info-table>
  309. </div>
  310. </div>
  311. <div class="small-title">上传磅单照片</div>
  312. <el-upload
  313. action="https://www.zthymaoyi.com/upload/admin"
  314. :show-file-list="false"
  315. :on-success="
  316. (res) => {
  317. uploadSuccessHandle1(res)
  318. }
  319. "
  320. class="avatar-uploader"
  321. accept=".jpg, .jpeg, .png, .gif"
  322. ><el-button size="small" type="primary">点击上传</el-button>
  323. </el-upload>
  324. <div>
  325. <img v-if='dataList.addressUrl' style='width:100px;height:100px;' :src="dataList.addressUrl" alt="">
  326. </div>
  327. <div class="small-title">化验数据(选填)</div>
  328. <div class="inspector">
  329. <!--质检员-->
  330. <ws-form-item label="质检员" span="1" prop="qualityInspector">
  331. <ws-input
  332. v-model="dataList.warehouseInOutDetail.qualityInspector"
  333. placeholder="请输入质检员姓名"
  334. maxlength="120"
  335. size="small"
  336. />
  337. </ws-form-item>
  338. </div>
  339. <div class="neifor">
  340. <ws-info-table>
  341. <!--水分(%)<=-->
  342. <ws-form-item label="水分(%)<=" span="1" prop="waterContent">
  343. <ws-input
  344. v-model="dataList.warehouseInOutDetail.waterContent"
  345. placeholder="请输入水分占比"
  346. maxlength="120"
  347. size="small"
  348. />
  349. </ws-form-item>
  350. <!--杂质(%)<=-->
  351. <ws-form-item label="杂质(%)<=" span="1" prop="impurity">
  352. <ws-input
  353. v-model="dataList.warehouseInOutDetail.impurity"
  354. placeholder="请输入杂质占比"
  355. maxlength="120"
  356. size="small"
  357. />
  358. </ws-form-item>
  359. <!--容重(克/升)>=-->
  360. <ws-form-item label="容重(克/升)>=" span="1" prop="bulkDensity">
  361. <ws-input
  362. v-model="dataList.warehouseInOutDetail.bulkDensity"
  363. placeholder="请输入容重"
  364. maxlength="120"
  365. size="small"
  366. />
  367. </ws-form-item>
  368. <!--霉变粒(%)<=-->
  369. <ws-form-item label="霉变粒(%)<=" span="1" prop="mildewGrain">
  370. <ws-input
  371. v-model="dataList.warehouseInOutDetail.mildewGrain"
  372. placeholder="请输入霉变粒占比"
  373. maxlength="120"
  374. size="small"
  375. />
  376. </ws-form-item>
  377. <!--热损伤(%)<=-->
  378. <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
  379. <ws-input
  380. v-model="dataList.warehouseInOutDetail.jiaorenli"
  381. placeholder="请输入热损伤占比"
  382. maxlength="120"
  383. size="small"
  384. />
  385. </ws-form-item>
  386. <!--不完善粒(%)<=-->
  387. <ws-form-item label="不完善粒(%)<=" span="1" prop="imperfectGrain">
  388. <ws-input
  389. v-model="dataList.warehouseInOutDetail.imperfectGrain"
  390. placeholder="请输入不完善粒占比"
  391. maxlength="120"
  392. size="small"
  393. />
  394. </ws-form-item>
  395. </ws-info-table>
  396. </div>
  397. <div style="text-align: right; padding: 10px">
  398. <el-button
  399. class="bg-bottom-up"
  400. type="primary"
  401. size="small"
  402. @click="temporaryStorage()"
  403. >暂存</el-button
  404. >
  405. <el-button
  406. class="bg-bottom-up"
  407. type="primary"
  408. size="small"
  409. @click="submit()"
  410. >提交</el-button
  411. >
  412. </div>
  413. </ws-form>
  414. </div>
  415. </template>
  416. <script>
  417. import {
  418. pullDown,
  419. addstorageputList,
  420. xialaNo,
  421. getstaff,
  422. } from '@/model/warehouse/index'
  423. import { downloadFile } from '@/utils/batchDown'
  424. import Pagination from '@/components/Pagination'
  425. import { mapActions, mapGetters, mapState } from 'vuex'
  426. import WsUpload from '@/components/WsUpload'
  427. // import { dayjs, fmoney, EventBus } from 'base-core-lib'
  428. import { dayjs, EventBus } from 'base-core-lib'
  429. export default {
  430. name: 'viewSpareMoney',
  431. components: {
  432. WsUpload,
  433. Pagination,
  434. },
  435. watch: {
  436. // vesselId(val) {
  437. // this.getList()
  438. // },
  439. isShow(val) {
  440. this.showType = val
  441. },
  442. },
  443. computed: {
  444. ...mapGetters(['deptBudgetList']),
  445. },
  446. data() {
  447. return {
  448. //弹出框
  449. dialogViewSpareMoney: false,
  450. dialogApproveFormVisible: false,
  451. // 船舶类型
  452. monetaryKey: null,
  453. // 表格显示数据
  454. tableDate: [],
  455. // 是否显示
  456. showType: true,
  457. // 年
  458. year: '',
  459. deptBudgetTotal: 0,
  460. readonly: true,
  461. currentPage: 1,
  462. pageSize: 10,
  463. searchType: 1,
  464. searchKeyWord: '',
  465. contractType: 2,
  466. startDate: null,
  467. endDate: null,
  468. goodnameList: {},
  469. checked: true,
  470. disabled1:true,
  471. disabled2:true,
  472. staffList: [],
  473. options: [],
  474. storageType: [],
  475. deliveryType: [],
  476. outContractNo: [],
  477. // 提交类型
  478. submitType: true,
  479. typeList:['干粮','潮粮'],
  480. storageType: [],
  481. appendixIdsAdd: '',
  482. uploadSuccess: {},
  483. warehouseInOutDetail: {},
  484. onChange: {},
  485. deptBudgetList1: [],
  486. gradeList: [],
  487. rules: {
  488. netWeight: [
  489. {
  490. required: true,
  491. type: 'number',
  492. message: '请输入活动名称',
  493. trigger: 'blur',
  494. },
  495. ],
  496. },
  497. size: 10,
  498. compId: sessionStorage.getItem('ws-pf_compId'),
  499. deptCircularPage: {},
  500. packtypeList: {},
  501. date: {
  502. year: dayjs().format('YYYY'),
  503. month: dayjs().format('MM'),
  504. },
  505. options1: [],
  506. options2: [],
  507. carstatus:false,
  508. contractList: [],
  509. dataList: {
  510. id: '',
  511. grossWeight: '',
  512. contractNo: '',
  513. tare: '',
  514. netWeight: '',
  515. grade: '',
  516. agent: '',
  517. carNo: '',
  518. inOutDate: '',
  519. inOutType: '',
  520. goodsName: '',
  521. warehouseInOutDetail: {},
  522. cost:'',
  523. freight:0,
  524. type:'',
  525. buckleWeightRatio:'',
  526. tidalGrainWater:'',
  527. solidGrainWater:'',
  528. pureWeight:'',
  529. deductionAmount:'',
  530. deductionWeigh:'',
  531. },
  532. historyList: [],
  533. pickerBeginDateBefore: {
  534. disabledDate: (time) => {
  535. return time.getTime() > Date.now()
  536. },
  537. },
  538. accessoryTFs: false,
  539. }
  540. },
  541. activated() {
  542. this.deptBudgetList1.warehouseName = this.$route.query.warehouseName
  543. this.deptBudgetList1.binNumber = this.$route.query.binNumber
  544. this.getList()
  545. this.dataList.id = this.$route.query.id
  546. this.dataList.grossWeight = this.$route.query.grossWeight
  547. this.dataList.contractNo = this.$route.query.contractNo
  548. this.dataList.baseId = this.$route.query.baseId
  549. this.dataList.positionId = this.$route.query.positionId
  550. this.dataList.warehouseName = this.$route.query.warehouseName
  551. this.dataList.binNumber = this.$route.query.binNumber
  552. this.dataList.tare = this.$route.query.tare
  553. this.dataList.netWeight = this.$route.query.netWeight
  554. this.dataList.grade = this.$route.query.grade
  555. this.dataList.agent = this.$route.query.agent
  556. this.dataList.carNo = this.$route.query.carNo
  557. this.dataList.inOutDate = this.$route.query.inOutDate
  558. this.dataList.contractNo = this.$route.query.contractNo
  559. this.dataList.inOutType = this.$route.query.inOutType
  560. this.dataList.compId = this.$route.query.compId
  561. this.dataList.goodsName = this.$route.query.goodsName
  562. this.dataList.goodsNameKey = Number(this.$route.query.goodsNameKey)
  563. this.dataList.inOutFlag = this.$route.inOutFlag
  564. this.dataList.inOutTypeKey = Number(this.$route.query.inOutTypeKey)
  565. this.dataList.statusFlag = this.$route.statusFlag
  566. this.dataList.warehouseInOutDetail = this.$route.query.warehouseInOutDetail
  567. this.deptBudgetList.warehouseType = this.$route.query.warehouseType
  568. this.deptBudgetList.createType = this.$route.query.createType
  569. this.dataList.temporaryOutType = this.$route.query.temporaryOutType
  570. this.dataList.cost=this.$route.query.cost
  571. this.dataList.freight=this.$route.query.freight
  572. this.dataList.type=this.$route.query.type
  573. this.dataList.buckleWeightRatio=this.$route.query.buckleWeightRatio
  574. this.dataList.tidalGrainWater=this.$route.query.tidalGrainWater
  575. this.dataList.solidGrainWater=this.$route.query.solidGrainWater
  576. this.dataList.pureWeight=this.$route.query.pureWeight
  577. this.dataList.deductionAmount=this.$route.query.deductionAmount
  578. this.dataList.deductionWeight=this.$route.query.deductionWeight
  579. },
  580. methods: {
  581. uploadSuccessHandle1(res){
  582. this.dataList.addressUrl=res.url
  583. },
  584. pureweight(status){
  585. console.log(this.deptBudgetList)
  586. if(this.deptBudgetList.netWeight&&this.deptBudgetList.tidalGrainWater&&this.deptBudgetList.solidGrainWater&&this.deptBudgetList.buckleWeightRatio){
  587. this.deptBudgetList.pureWeight=(this.deptBudgetList.netWeight*(100-(this.deptBudgetList.tidalGrainWater-this.deptBudgetList.solidGrainWater)*this.deptBudgetList.buckleWeightRatio))/100
  588. }
  589. },
  590. //返回按钮
  591. revert() {
  592. this.$router.go(-1)
  593. },
  594. carChange(e){
  595. for (let i = 0; i < this.tranCarInfoList.length; i++) {
  596. if(this.tranCarInfoList[i].carNo==this.dataList.carNo){
  597. this.dataList.freight=this.tranCarInfoList[i].tranPrice
  598. }
  599. }
  600. },
  601. typeChange(e){
  602. },
  603. contractNoChange(e){
  604. for (var i = 0; i < this.outContractNo.length; i++) {
  605. if (this.outContractNo[i].contractNo == e) {
  606. this.dataList.goodsName = this.outContractNo[i].goodsName
  607. this.dataList.goodsNameKey = this.outContractNo[i].goodsNameKey
  608. this.dataList.cost= this.outContractNo[i].contractPrice
  609. if(this.outContractNo[i].tranCarInfoList){
  610. this.options2=this.outContractNo[i].tranCarInfoList
  611. this.tranCarInfoList=this.outContractNo[i].tranCarInfoList
  612. this.carstatus=true
  613. }
  614. }
  615. }
  616. },
  617. dataFilter1(val) {
  618. console.log(val)
  619. this.deptBudgetList.contractNo = val;
  620. if (val) { //val存在
  621. this.options1 = this.outContractNo1.filter((item) => {
  622. if (!!~item.contractNo.indexOf(val) || !!~item.contractNo.toUpperCase().indexOf(val.toUpperCase())) {
  623. return true
  624. }
  625. })
  626. } else { //val为空时,还原数组
  627. this.options1 = this.outContractNo;
  628. }
  629. },
  630. dataFilter2(val) {
  631. this.deptBudgetList.carNo = val;
  632. if (val) { //val存在
  633. this.options1 = this.outContractNo1.filter((item) => {
  634. if (!!~item.carNo.indexOf(val) || !!~item.carNo.toUpperCase().indexOf(val.toUpperCase())) {
  635. return true
  636. }
  637. })
  638. } else { //val为空时,还原数组
  639. this.options2 = this.tranCarInfoList;
  640. }
  641. },
  642. dataFilter(val) {
  643. // console.log(val,"名")
  644. this.deptBudgetList.staffList = val
  645. if (val) {
  646. //val存在
  647. this.options = this.staffList.filter((item) => {
  648. if (
  649. !!~item.staffName.indexOf(val) ||
  650. !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
  651. ) {
  652. return true
  653. }
  654. })
  655. } else {
  656. //val为空时,还原数组
  657. this.options = this.staffList
  658. }
  659. },
  660. editClick(status){
  661. if(status==1){
  662. this.disabled1=!this.disabled1
  663. }else{
  664. this.disabled2=!this.disabled2
  665. }
  666. },
  667. selectstaff(e) {
  668. for (var i = 0; i < this.staffList.length; i++) {
  669. if (this.staffList[i].staffName == e) {
  670. this.deptBudgetList.personChargeKey = this.staffList[i].staffId
  671. }
  672. }
  673. },
  674. //暂存按钮
  675. temporaryStorage() {
  676. this.$confirm(`暂存后可在待完成页面查看,确定暂存`, {
  677. cancelButtonText: '取消',
  678. confirmButtonText: '确定',
  679. type: 'warning',
  680. })
  681. .then(() => {debugger
  682. this.$refs.dataList.validate((valid) => {
  683. if (valid) {
  684. this.dataList.compId = sessionStorage.getItem('ws-pf_compId')
  685. this.dataList.inOutFlag = 2
  686. this.dataList.statusFlag = 1
  687. let _data = JSON.parse(sessionStorage.getItem('winseaview-userInfo'))
  688. this.dataList.backOffice = _data.content.showCompName+'-' +_data.content.staffName
  689. addstorageputList(this.dataList)
  690. .toPromise()
  691. .then((response) => {
  692. this.$message.success('暂存成功')
  693. this.$router.push({ path: 'warehouseManagementList' })
  694. })
  695. } else {
  696. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  697. return false
  698. }
  699. })
  700. })
  701. .catch(() => {
  702. return false
  703. })
  704. },
  705. //提交按钮
  706. submit() {
  707. if (!this.dataList.goodsName) {
  708. this.$message({
  709. message: '货名不能为空',
  710. type: 'warning',
  711. })
  712. return
  713. }
  714. if (!this.dataList.grossWeight) {
  715. this.$message({
  716. message: '毛重不能为空',
  717. type: 'warning',
  718. })
  719. return
  720. }
  721. if (
  722. this.dataList.grossWeight <= 0 ||
  723. this.dataList.grossWeight > 10000 ||
  724. (String(this.dataList.grossWeight).indexOf('.') != -1 &&
  725. String(this.dataList.grossWeight).length -
  726. (String(this.dataList.grossWeight).indexOf('.') + 1) >
  727. 3)
  728. ) {
  729. this.$message({
  730. message: '毛重输入错误',
  731. type: 'warning',
  732. })
  733. return
  734. }
  735. if (
  736. this.dataList.tare < 0 ||
  737. this.dataList.tare > 10000 ||
  738. (String(this.dataList.tare).indexOf('.') != -1 &&
  739. String(this.dataList.tare).length -
  740. (String(this.dataList.tare).indexOf('.') + 1) >
  741. 3)
  742. ) {
  743. this.$message({
  744. message: '皮重输入错误',
  745. type: 'warning',
  746. })
  747. return
  748. }
  749. if (!this.dataList.deductionWeight) {
  750. this.$message({
  751. message: '扣重不能为空',
  752. type: 'warning'
  753. })
  754. return
  755. }
  756. if (
  757. this.dataList.deductionWeight < 0 ||
  758. this.dataList.deductionWeight > 10 ||
  759. (String(this.dataList.deductionWeight).indexOf('.') != -1 &&
  760. String(this.dataList.deductionWeight).length -
  761. (String(this.dataList.deductionWeight).indexOf('.') + 1) >
  762. 3)
  763. ) {
  764. this.$message({
  765. message: '扣重输入错误',
  766. type: 'warning'
  767. })
  768. return
  769. }
  770. if (this.dataList.type=='潮粮'&&!this.dataList.buckleWeightRatio) {
  771. this.$message({
  772. message: '扣重比不能为空',
  773. type: 'warning'
  774. })
  775. return
  776. }
  777. if (
  778. this.dataList.type=='潮粮'&&this.dataList.buckleWeightRatio < 0 ||
  779. this.dataList.type=='潮粮'&&this.dataList.buckleWeightRatio > 3 ||
  780. (this.dataList.type=='潮粮'&&String(this.dataList.buckleWeightRatio).indexOf('.') != -1 &&
  781. String(this.dataList.buckleWeightRatio).length -
  782. (String(this.dataList.buckleWeightRatio).indexOf('.') + 1) >
  783. 2)
  784. ) {
  785. this.$message({
  786. message: '扣重比输入错误',
  787. type: 'warning'
  788. })
  789. return
  790. }
  791. if (this.dataList.type=='潮粮'&&!this.dataList.tidalGrainWater) {
  792. this.$message({
  793. message: '潮粮水分不能为空',
  794. type: 'warning'
  795. })
  796. return
  797. }
  798. if (
  799. this.dataList.type=='潮粮'&&this.dataList.tidalGrainWater < 1 ||
  800. this.dataList.type=='潮粮'&&this.dataList.tidalGrainWater > 40 ||
  801. (this.dataList.type=='潮粮'&&String(this.dataList.tidalGrainWater).indexOf('.') != -1 &&
  802. String(this.dataList.tidalGrainWater).length -
  803. (String(this.dataList.tidalGrainWater).indexOf('.') + 1) >
  804. 2)
  805. ) {
  806. this.$message({
  807. message: '潮粮水分输入错误',
  808. type: 'warning'
  809. })
  810. return
  811. }
  812. if (this.dataList.type=='潮粮'&&!this.dataList.solidGrainWater) {
  813. this.$message({
  814. message: '干粮水分不能为空',
  815. type: 'warning'
  816. })
  817. return
  818. }
  819. if (
  820. this.deptBudgetList.type=='潮粮'&&this.dataList.solidGrainWater < 1 ||
  821. this.deptBudgetList.type=='潮粮'&&this.dataList.solidGrainWater > 40 ||
  822. (this.dataList.type=='潮粮'&&String(this.dataList.solidGrainWater).indexOf('.') != -1 &&
  823. String(this.dataList.solidGrainWater).length -
  824. (String(this.dataList.solidGrainWater).indexOf('.') + 1) >
  825. 1)
  826. ) {
  827. this.$message({
  828. message: '干粮水分输入错误',
  829. type: 'warning'
  830. })
  831. return
  832. }
  833. if (!this.dataList.deductionAmount) {
  834. this.$message({
  835. message: '扣款不能为空',
  836. type: 'warning'
  837. })
  838. return
  839. }
  840. if (
  841. this.dataList.deductionAmount < 0 ||
  842. this.dataList.deductionAmount > 10000 ||
  843. (String(this.dataList.deductionAmount).indexOf('.') != -1 &&
  844. String(this.dataList.deductionAmount).length -
  845. (String(this.dataList.deductionAmount).indexOf('.') + 1) >
  846. 2)
  847. ) {
  848. this.$message({
  849. message: '扣款输入错误',
  850. type: 'warning'
  851. })
  852. return
  853. }
  854. if (!this.dataList.cost) {
  855. this.$message({
  856. message: '未获取到成本,请编辑后提交',
  857. type: 'warning'
  858. })
  859. return
  860. }
  861. if (
  862. this.dataList.cost < 0 ||
  863. this.dataList.cost > 20000 ||
  864. (String(this.dataList.cost).indexOf('.') != -1 &&
  865. String(this.dataList.cost).length -
  866. (String(this.dataList.cost).indexOf('.') + 1) >
  867. 2)
  868. ) {
  869. this.$message({
  870. message: '成本输入错误',
  871. type: 'warning'
  872. })
  873. return
  874. }
  875. if (!this.dataList.freight&&this.dataList.freight!=0) {
  876. this.$message({
  877. message: '运费不能为空',
  878. type: 'warning'
  879. })
  880. return
  881. }
  882. if (
  883. this.dataList.freight < 0 ||
  884. this.dataList.freight > 100000 ||
  885. (String(this.dataList.freight).indexOf('.') != -1 &&
  886. String(this.dataList.freight).length -
  887. (String(this.dataList.freight).indexOf('.') + 1) >
  888. 2)
  889. ) {
  890. this.$message({
  891. message: '运费输入错误',
  892. type: 'warning'
  893. })
  894. return
  895. }
  896. if (!this.dataList.agent) {
  897. this.$message({
  898. message: '经办人不能为空',
  899. type: 'warning',
  900. })
  901. return
  902. }
  903. if (this.dataList.agent.length < 2 || this.dataList.agent.length > 10) {
  904. this.$message({
  905. message: '经办人输入有误',
  906. type: 'warning',
  907. })
  908. return
  909. }
  910. if (!this.dataList.grade) {
  911. this.$message({
  912. message: '品级不能为空!',
  913. type: 'warning',
  914. })
  915. return
  916. }
  917. if (!this.dataList.inOutDate) {
  918. this.$message({
  919. message: '入库日期不能为空!',
  920. type: 'warning',
  921. })
  922. return
  923. }
  924. if (!this.dataList.inOutType) {
  925. this.$message({
  926. message: '入库类型不能为空!',
  927. type: 'warning',
  928. })
  929. return
  930. }
  931. if (!this.dataList.carNo) {
  932. this.$message({
  933. message: '车牌号不能为空',
  934. type: 'warning',
  935. })
  936. return
  937. }
  938. if (this.dataList.carNo.length > 7) {
  939. this.$message({
  940. message: '车牌号输入错误,请输入7个字符之内',
  941. type: 'warning',
  942. })
  943. return
  944. }
  945. if (!this.dataList.contractNo) {
  946. this.$message({
  947. message: '合同编号不能为空',
  948. type: 'warning',
  949. })
  950. return
  951. }
  952. if (
  953. this.dataList.contractNo.length < 6 ||
  954. this.dataList.contractNo.length > 20
  955. ) {
  956. this.$message({
  957. message: '合同编号长度不符合要求,请输入6-20个字符之内',
  958. type: 'warning',
  959. })
  960. return
  961. }
  962. if (this.dataList.netWeight > this.$route.query.capacity) {
  963. this.$message({
  964. message: '入库量大于该仓库容量!',
  965. type: 'warning',
  966. })
  967. return
  968. }
  969. //自检员
  970. if (this.dataList.warehouseInOutDetail.qualityInspector) {
  971. if (
  972. this.dataList.warehouseInOutDetail.qualityInspector.length < 2 ||
  973. this.dataList.warehouseInOutDetail.qualityInspector.length > 10
  974. ) {
  975. this.$message({
  976. message: '质检员姓名长度错误!',
  977. type: 'warning',
  978. })
  979. return
  980. }
  981. }
  982. if (this.dataList.warehouseInOutDetail.waterContent) {
  983. if (isNaN(this.dataList.warehouseInOutDetail.waterContent)) {
  984. this.$message({
  985. message: '水分(%)非数字!',
  986. type: 'warning',
  987. })
  988. return
  989. }
  990. if (
  991. this.dataList.warehouseInOutDetail.waterContent < 1 ||
  992. this.dataList.warehouseInOutDetail.waterContent > 40 ||
  993. (String(this.dataList.warehouseInOutDetail.waterContent).indexOf(
  994. '.'
  995. ) != -1 &&
  996. String(this.dataList.warehouseInOutDetail.waterContent).length -
  997. (String(this.dataList.warehouseInOutDetail.waterContent).indexOf(
  998. '.'
  999. ) +
  1000. 1) >
  1001. 2)
  1002. ) {
  1003. this.$message({
  1004. message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1005. type: 'warning',
  1006. })
  1007. return
  1008. }
  1009. }
  1010. //杂质
  1011. if (this.dataList.warehouseInOutDetail.impurity) {
  1012. if (isNaN(this.dataList.warehouseInOutDetail.impurity)) {
  1013. this.$message({
  1014. message: '杂质(%)非数字!',
  1015. type: 'warning',
  1016. })
  1017. return
  1018. }
  1019. if (
  1020. this.dataList.warehouseInOutDetail.impurity < 1 ||
  1021. this.dataList.warehouseInOutDetail.impurity > 40 ||
  1022. (String(this.dataList.warehouseInOutDetail.impurity).indexOf('.') !=
  1023. -1 &&
  1024. String(this.dataList.warehouseInOutDetail.impurity).length -
  1025. (String(this.dataList.warehouseInOutDetail.impurity).indexOf(
  1026. '.'
  1027. ) +
  1028. 1) >
  1029. 2)
  1030. ) {
  1031. this.$message({
  1032. message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1033. type: 'warning',
  1034. })
  1035. return
  1036. }
  1037. }
  1038. //霉变
  1039. if (this.dataList.warehouseInOutDetail.mildewGrain) {
  1040. if (isNaN(this.dataList.warehouseInOutDetail.mildewGrain)) {
  1041. this.$message({
  1042. message: '霉变粒(%)非数字!',
  1043. type: 'warning',
  1044. })
  1045. return
  1046. }
  1047. if (
  1048. this.dataList.warehouseInOutDetail.mildewGrain < 1 ||
  1049. this.dataList.warehouseInOutDetail.mildewGrain > 40 ||
  1050. (String(this.dataList.warehouseInOutDetail.mildewGrain).indexOf(
  1051. '.'
  1052. ) != -1 &&
  1053. String(this.dataList.warehouseInOutDetail.mildewGrain).length -
  1054. (String(this.dataList.warehouseInOutDetail.mildewGrain).indexOf(
  1055. '.'
  1056. ) +
  1057. 1) >
  1058. 2)
  1059. ) {
  1060. this.$message({
  1061. message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1062. type: 'warning',
  1063. })
  1064. return
  1065. }
  1066. }
  1067. //热损伤
  1068. if (this.dataList.warehouseInOutDetail.jiaorenli) {
  1069. if (isNaN(this.dataList.warehouseInOutDetail.jiaorenli)) {
  1070. this.$message({
  1071. message: '热损伤(%)非数字!',
  1072. type: 'warning',
  1073. })
  1074. return
  1075. }
  1076. if (
  1077. this.dataList.warehouseInOutDetail.jiaorenli < 1 ||
  1078. this.dataList.warehouseInOutDetail.jiaorenli > 40 ||
  1079. (String(this.dataList.warehouseInOutDetail.jiaorenli).indexOf('.') !=
  1080. -1 &&
  1081. String(this.dataList.warehouseInOutDetail.jiaorenli).length -
  1082. (String(this.dataList.warehouseInOutDetail.jiaorenli).indexOf(
  1083. '.'
  1084. ) +
  1085. 1) >
  1086. 2)
  1087. ) {
  1088. this.$message({
  1089. message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1090. type: 'warning',
  1091. })
  1092. return
  1093. }
  1094. }
  1095. //不完善粒(%)
  1096. if (this.dataList.warehouseInOutDetail.imperfectGrain) {
  1097. if (isNaN(this.dataList.warehouseInOutDetail.imperfectGrain)) {
  1098. this.$message({
  1099. message: '不完善粒(%)非数字!',
  1100. type: 'warning',
  1101. })
  1102. return
  1103. }
  1104. if (
  1105. this.dataList.warehouseInOutDetail.imperfectGrain < 1 ||
  1106. this.dataList.warehouseInOutDetail.imperfectGrain > 40 ||
  1107. (String(this.dataList.warehouseInOutDetail.imperfectGrain).indexOf(
  1108. '.'
  1109. ) != -1 &&
  1110. String(this.dataList.warehouseInOutDetail.imperfectGrain).length -
  1111. (String(
  1112. this.dataList.warehouseInOutDetail.imperfectGrain
  1113. ).indexOf('.') +
  1114. 1) >
  1115. 2)
  1116. ) {
  1117. this.$message({
  1118. message: '不完善粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1119. type: 'warning',
  1120. })
  1121. return
  1122. }
  1123. }
  1124. //容重
  1125. if (this.dataList.warehouseInOutDetail.bulkDensity) {
  1126. if (isNaN(this.dataList.warehouseInOutDetail.bulkDensity)) {
  1127. this.$message({
  1128. message: '容重(克/升)非数字!',
  1129. type: 'warning',
  1130. })
  1131. return
  1132. }
  1133. if (
  1134. this.dataList.warehouseInOutDetail.bulkDensity < 1 ||
  1135. this.dataList.warehouseInOutDetail.bulkDensity > 40 ||
  1136. (String(this.dataList.warehouseInOutDetail.bulkDensity).indexOf(
  1137. '.'
  1138. ) != -1 &&
  1139. String(this.dataList.warehouseInOutDetail.bulkDensity).length -
  1140. (String(this.dataList.warehouseInOutDetail.bulkDensity).indexOf(
  1141. '.'
  1142. ) +
  1143. 1) >
  1144. 0)
  1145. ) {
  1146. this.$message({
  1147. message: '容重(克/升)输入错误! 取值范围1-40之间且是整数',
  1148. type: 'warning',
  1149. })
  1150. return
  1151. }
  1152. }
  1153. this.$confirm(`确定提交入库信息`, {
  1154. cancelButtonText: '取消',
  1155. confirmButtonText: '确定',
  1156. type: 'warning',
  1157. })
  1158. .then(() => {
  1159. this.$refs.dataList.validate((valid) => {
  1160. if (valid) {
  1161. this.dataList.compId = sessionStorage.getItem('ws-pf_compId')
  1162. this.dataList.inOutFlag = 2
  1163. this.dataList.statusFlag = 3
  1164. addstorageputList(this.dataList)
  1165. .toPromise()
  1166. .then((response) => {
  1167. this.$message.success('添加成功')
  1168. this.$router.push({ path: 'warehouseManagementList' })
  1169. })
  1170. } else {
  1171. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  1172. return false
  1173. }
  1174. })
  1175. })
  1176. .catch(() => {
  1177. return false
  1178. })
  1179. },
  1180. //暂存按钮
  1181. returnWarehouse() {
  1182. this.$refs.dataList.validate((valid) => {
  1183. if (valid) {
  1184. this.dataList.compId = sessionStorage.getItem('ws-pf_compId')
  1185. this.dataList.statusFlag = 1
  1186. addstorageputList(this.dataList)
  1187. .toPromise()
  1188. .then((response) => {
  1189. this.$message.success('添加成功')
  1190. this.$router.push({ path: 'warehouseManagementList' })
  1191. })
  1192. } else {
  1193. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  1194. return false
  1195. }
  1196. })
  1197. },
  1198. tarechange(e) {
  1199. if (this.dataList.grossWeight && this.dataList.tare) {
  1200. this.dataList.netWeight = Number(
  1201. this.dataList.grossWeight - this.dataList.tare
  1202. )
  1203. }
  1204. },
  1205. grossWeightchange(e) {
  1206. if (this.dataList.grossWeight && this.dataList.tare) {
  1207. this.dataList.netWeight = Number(
  1208. this.dataList.grossWeight - this.dataList.tare
  1209. )
  1210. }
  1211. },
  1212. selectgoodsName(e) {
  1213. for (var i = 0; i < this.goodnameList.length; i++) {
  1214. if (this.goodnameList[i].constValue == e) {
  1215. this.dataList.goodsNameKey = this.goodnameList[i].constKey
  1216. }
  1217. }
  1218. },
  1219. selectpackingMethod(e) {
  1220. for (var i = 0; i < this.packtypeList.length; i++) {
  1221. if (this.packtypeList[i].constValue == e) {
  1222. this.dataList.packingMethodKey = this.packtypeList[i].constKey
  1223. }
  1224. }
  1225. },
  1226. selectstorageType(e) {
  1227. for (var i = 0; i < this.storageType.length; i++) {
  1228. if (this.storageType[i].constValue == e) {
  1229. this.dataList.inOutTypeKey = this.storageType[i].constKey
  1230. }
  1231. }
  1232. },
  1233. handleClose() {
  1234. this.accessoryTFs = false
  1235. },
  1236. handleSizeChange(val) {
  1237. console.log(`每页 ${val} 条`)
  1238. this.pageSize = val
  1239. this.getList()
  1240. },
  1241. handleCurrentChange(val) {
  1242. this.currentPage = val
  1243. console.log(`当前页: ${val}`)
  1244. this.getList()
  1245. },
  1246. getList() {
  1247. // 货名
  1248. pullDown({ constId: 'CON2' })
  1249. .toPromise()
  1250. .then((response) => {
  1251. this.goodnameList = response
  1252. })
  1253. // 品级
  1254. pullDown({ constId: 'CON3' })
  1255. .toPromise()
  1256. .then((response) => {
  1257. this.gradeList = response
  1258. })
  1259. // 类型
  1260. if (this.$route.query.warehouseType == '1') {
  1261. pullDown({ constId: 'CON5' })
  1262. .toPromise()
  1263. .then((response) => {
  1264. this.storageType = response
  1265. })
  1266. } else if (this.$route.query.warehouseType == '2') {
  1267. //临时仓库入库类型
  1268. pullDown({ constId: 'WARE1' })
  1269. .toPromise()
  1270. .then((response) => {
  1271. this.storageType = response
  1272. })
  1273. //临时仓库出库类型
  1274. pullDown({ constId: 'WARE2' })
  1275. .toPromise()
  1276. .then((response) => {
  1277. this.deliveryType = response
  1278. })
  1279. }
  1280. //合同编号
  1281. xialaNo({ compId: sessionStorage.getItem('ws-pf_compId') })
  1282. .toPromise()
  1283. .then((response) => {
  1284. this.outContractNo = response
  1285. })
  1286. //经办人
  1287. getstaff({ compId: sessionStorage.getItem('ws-pf_compId'),warehouseId:this.dataList.id })
  1288. .toPromise()
  1289. .then((response) => {
  1290. this.options = response
  1291. this.staffList = response
  1292. // this.agent = response
  1293. })
  1294. },
  1295. selecttaskType(e) {
  1296. for (var i = 0; i < this.taskTypeList.length; i++) {
  1297. if (this.taskTypeList[i].value == e) {
  1298. this.searchType = this.taskTypeList[i].type
  1299. }
  1300. }
  1301. },
  1302. fujian(row) {
  1303. if (
  1304. row.receiveAttachmentPath === null ||
  1305. row.receiveAttachmentPath === ''
  1306. ) {
  1307. EventBus.$emit(
  1308. 'warning',
  1309. this.$t('system.noticeCircular.NoInformation')
  1310. )
  1311. } else {
  1312. this.accessoryTFs = true
  1313. }
  1314. this.appendixIdss = row.receiveAttachmentPath
  1315. },
  1316. handleExamine(row) {
  1317. this.$router.push({
  1318. name: 'salesContractExamine',
  1319. query: { id: row.id },
  1320. })
  1321. },
  1322. // 关闭 dialog时 处理文件url 初始化upload组件
  1323. handleCloe() {
  1324. this.dialogViewSpareMoney = false
  1325. },
  1326. history(row) {
  1327. console.log(row)
  1328. billoperatehis({ id: row.id })
  1329. .toPromise()
  1330. .then((response) => {
  1331. this.historyList = response
  1332. })
  1333. },
  1334. async exportlist() {
  1335. const { data } = await export1(
  1336. {
  1337. compId: sessionStorage.getItem('ws-pf_compId'),
  1338. contractType: this.contractType,
  1339. currentPage: this.currentPage,
  1340. pageSize: this.pageSize,
  1341. searchType: this.searchType,
  1342. searchKeyWord: this.searchKeyWord,
  1343. startDate: this.startDate,
  1344. endDate: this.endDate,
  1345. },
  1346. {},
  1347. { responseType: 'blob' }
  1348. ).toPromise()
  1349. downloadFile({
  1350. res: data,
  1351. fileName: `${
  1352. this.date.year + (this.date.month ? `-${this.date.month}` : '')
  1353. }_采购合同`,
  1354. type: 'xls',
  1355. })
  1356. },
  1357. // deletecontract(){},
  1358. //删除
  1359. approve() {},
  1360. listQuery() {},
  1361. total() {},
  1362. clearfiltQuery() {},
  1363. selectCrtDuty() {},
  1364. },
  1365. }
  1366. </script>
  1367. <style lang="scss" scoped>
  1368. /deep/.basicInformation {
  1369. .ws-info-table {
  1370. border: none;
  1371. }
  1372. .el-form-item {
  1373. width: 33.3333%;
  1374. border: none;
  1375. .el-form-item__label {
  1376. background: transparent;
  1377. border: none;
  1378. }
  1379. .el-form-item__content {
  1380. border: none;
  1381. }
  1382. }
  1383. }
  1384. .title {
  1385. position: relative;
  1386. padding-left: 10px;
  1387. }
  1388. .title::before {
  1389. content: '';
  1390. display: inline-block;
  1391. width: 5px;
  1392. height: 30px;
  1393. background: #5473e8;
  1394. position: absolute;
  1395. left: 0;
  1396. }
  1397. .el-form {
  1398. padding: 0 10%;
  1399. }
  1400. .el-button--primary {
  1401. background-color: #5878e8;
  1402. border-color: #5878e8;
  1403. }
  1404. .el-col {
  1405. background: #f6f7fc;
  1406. }
  1407. .bg-right {
  1408. text-align: right;
  1409. padding: 16px 20px;
  1410. }
  1411. .center {
  1412. position: relative;
  1413. top: 50px;
  1414. width: 40%;
  1415. height: 2000px;
  1416. margin: 0 auto;
  1417. }
  1418. /deep/.el-form-item__label {
  1419. width: 160px;
  1420. }
  1421. .inspector {
  1422. width: 50%;
  1423. }
  1424. //质检员
  1425. /deep/[data-v-58803672] .el-form-item__label {
  1426. width: 60px;
  1427. }
  1428. [data-v-58803672] .el-form-item__label {
  1429. width: 60px;
  1430. }
  1431. //选填
  1432. /deep/.el-form-item {
  1433. width: 50%;
  1434. }
  1435. .container {
  1436. overflow: scroll;
  1437. height: 120vh;
  1438. }
  1439. /deep/.ws-info-table .el-form-item .el-form-item__label {
  1440. text-align: center;
  1441. }
  1442. .deliverydate {
  1443. display: inline-block;
  1444. width: 10%;
  1445. }
  1446. .center {
  1447. margin-top: -60px;
  1448. width: 80%;
  1449. }
  1450. //仓位
  1451. .position {
  1452. width: 52px;
  1453. height: 20px;
  1454. background: #afb5cb;
  1455. border-radius: 2px;
  1456. font-size: 12px;
  1457. font-family: PingFangSC-Medium, PingFang SC;
  1458. color: #ffffff;
  1459. line-height: 20px;
  1460. }
  1461. //表格文字
  1462. /deep/.ws-info-table .el-form-item .el-form-item__label {
  1463. text-align: left;
  1464. font-size: 14px;
  1465. font-family: PingFangSC-Regular, PingFang SC;
  1466. font-weight: 400;
  1467. color: #8890b1;
  1468. line-height: 16px;
  1469. }
  1470. //质检员
  1471. .inspector .el-form-item__content {
  1472. text-align: left;
  1473. margin-left: 0px;
  1474. }
  1475. .small-title {
  1476. position: relative;
  1477. padding: 10px;
  1478. font-weight: 600;
  1479. }
  1480. .small-title::before {
  1481. position: absolute;
  1482. content: '';
  1483. display: block;
  1484. background: #5473e8;
  1485. width: 4px;
  1486. height: 14px;
  1487. left: 0px;
  1488. top: 13px;
  1489. }
  1490. //下面列表
  1491. .neifor {
  1492. width: 80%;
  1493. background-color: #f6f7fc;
  1494. }
  1495. /deep/.neifor .ws-info-table .el-form-item .el-form-item__label {
  1496. width: 35%;
  1497. text-align: center;
  1498. }
  1499. /deep/.neifor .ws-info-table .el-form-item .el-form-item__content {
  1500. width: 60%;
  1501. background-color: #f6f7fc;
  1502. }
  1503. /deep/.neifor .el-input--small .el-input__inner {
  1504. width: 100%;
  1505. }
  1506. .el-input__inner {
  1507. width: 150px;
  1508. }
  1509. </style>