warehouseManagementDelivery.vue 48 KB

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