warehouseManagementGross.vue 87 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832
  1. // 入库登记
  2. <template>
  3. <div class="container">
  4. <el-row>
  5. <el-col :span="20">
  6. <h2 class="bg-left title">{{ information }}</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. >
  15. <img
  16. width="6"
  17. height="10"
  18. style="vertical-align: bottom; margin-right: 3px"
  19. src="../../../public/img/lujing.png"
  20. alt
  21. />返回
  22. </el-button>
  23. </el-col>
  24. </el-row>
  25. <ws-form ref="deptBudgetList" :model="deptBudgetList" :rules="rules">
  26. <div class="basicInformation">
  27. <h2>
  28. <img
  29. style="position: relative; top: 2px"
  30. width="19"
  31. height="19"
  32. src="../../../public/img/cangku.png"
  33. alt
  34. />
  35. {{ deptBudgetList.warehouseName }}
  36. <span class="position" v-show="this.$route.query.warehouseType == 1"
  37. >{{ deptBudgetList.binNumber }}仓位</span
  38. >
  39. <span v-show="this.$route.query.warehouseType == 2">(临)</span>
  40. </h2>
  41. <div class="top">
  42. <div class="car-type">毛重</div>
  43. <div class="weight">
  44. {{ deptBudgetList.grossWeight }} <span class="kg-style">kg</span>
  45. </div>
  46. <!-- <div v-else class="weight">{{weighingList.tare}} <span class="kg-style">kg</span></div> -->
  47. <div class="car-no">{{ deptBudgetList.carNo }}</div>
  48. </div>
  49. <ws-info-table>
  50. <!--任务编号-->
  51. <ws-form-item label="任务编号" span="1" prop="inOutTaskNo">
  52. <el-select
  53. filterable
  54. clearable
  55. v-model="deptBudgetList.inOutTaskNo"
  56. placeholder="请选择任务编号"
  57. class="typeselect"
  58. @change="contractNoChange"
  59. >
  60. <el-option
  61. v-for="item in deptBudgetList1"
  62. :key="item.inOutTaskNo"
  63. :label="item.inOutTaskNo"
  64. :value="item.inOutTaskNo"
  65. />
  66. </el-select>
  67. </ws-form-item>
  68. <!--合同编号-->
  69. <ws-form-item label="合同编号" span="1" prop="contractNo">
  70. <el-select
  71. disabled
  72. filterable
  73. clearable
  74. v-model="deptBudgetList.contractNo"
  75. class="typeselect"
  76. @change="contractNoChange1"
  77. >
  78. <el-option
  79. v-for="item in options1"
  80. :key="item.constKey"
  81. :label="item.contractNo"
  82. :value="item.contractNo"
  83. />
  84. </el-select>
  85. </ws-form-item>
  86. <ws-form-item label="提示" span="1" prop="tips">
  87. <ws-input
  88. onmouseover="this.title=this.value"
  89. v-model="deptBudgetList.tips"
  90. maxlength="20"
  91. size="small"
  92. />
  93. </ws-form-item>
  94. <!-- 货名 -->
  95. <ws-form-item label="货名" span="1">
  96. <ws-select
  97. disabled
  98. v-model="deptBudgetList.goodsName"
  99. placeholder
  100. class="typeselect"
  101. @change="selectgoodsName"
  102. >
  103. <ws-option
  104. v-for="item in goodnameList"
  105. :key="item.constKey"
  106. :label="item.constValue"
  107. :value="item.constValue"
  108. />
  109. </ws-select>
  110. </ws-form-item>
  111. <ws-form-item label="类型" span="1" prop="type">
  112. <ws-select
  113. disabled
  114. v-model="deptBudgetList.type"
  115. @change="typeChange"
  116. >
  117. <ws-option
  118. v-for="item in typeList"
  119. :key="item"
  120. :label="item"
  121. :value="item"
  122. />
  123. </ws-select>
  124. </ws-form-item>
  125. <!--毛重(公斤)-->
  126. <ws-form-item label="毛重(公斤)" span="1" prop="grossWeight">
  127. <ws-input
  128. :disabled="allowEdit"
  129. @input="grossWeightchange"
  130. v-model="deptBudgetList.grossWeight"
  131. placeholder="请输入毛重"
  132. maxlength="20"
  133. type="number"
  134. @mousewheel.native.prevent
  135. size="small"
  136. />
  137. <el-button
  138. type="primary"
  139. v-if="information == '毛重检斤'"
  140. @click="openPort"
  141. >重新获取</el-button
  142. >
  143. </ws-form-item>
  144. <!--皮重(公斤)-->
  145. <ws-form-item
  146. label="皮重(公斤)"
  147. span="1"
  148. prop="tare"
  149. class="readonly"
  150. >
  151. <ws-input
  152. :disabled="allowEdit"
  153. @input="tarechange"
  154. v-model="deptBudgetList.tare"
  155. placeholder="请输入皮重"
  156. type="number"
  157. @mousewheel.native.prevent
  158. maxlength="100"
  159. size="small"
  160. />
  161. <el-button
  162. type="primary"
  163. v-if="information == '皮重检斤'"
  164. @click="openPort"
  165. >重新获取</el-button
  166. >
  167. </ws-form-item>
  168. <ws-form-item
  169. label="扣重(公斤)"
  170. span="1"
  171. prop="deductionWeight"
  172. class="readonly"
  173. >
  174. <ws-input
  175. @input="tarechange"
  176. v-model="deptBudgetList.deductionWeight"
  177. placeholder="请输入扣重"
  178. type="number"
  179. @mousewheel.native.prevent
  180. maxlength="100"
  181. size="small"
  182. />
  183. </ws-form-item>
  184. <!--净重(公斤)-->
  185. <ws-form-item label="净重(公斤)" span="1" prop="netWeight">
  186. <ws-input
  187. disabled
  188. v-model="deptBudgetList.netWeight"
  189. placeholder="不可编辑,自动计算"
  190. maxlength="120"
  191. size="small"
  192. />
  193. </ws-form-item>
  194. <ws-form-item
  195. v-if="deptBudgetList.type == '潮粮'"
  196. label="扣重比"
  197. span="1"
  198. prop="buckleWeightRatio"
  199. class="readonly"
  200. >
  201. <ws-input
  202. @input="pureweight"
  203. v-model="deptBudgetList.buckleWeightRatio"
  204. placeholder="请输入扣重比"
  205. type="number"
  206. @mousewheel.native.prevent
  207. maxlength="100"
  208. size="small"
  209. />
  210. </ws-form-item>
  211. <ws-form-item
  212. v-if="deptBudgetList.type == '潮粮'"
  213. label="干粮水分占比"
  214. span="1"
  215. prop="solidGrainWater"
  216. class="readonly"
  217. >
  218. <ws-input
  219. @input="pureweight"
  220. v-model="deptBudgetList.solidGrainWater"
  221. placeholder="请输入干粮水分占比"
  222. maxlength="100"
  223. type="number"
  224. @mousewheel.native.prevent
  225. size="small"
  226. />
  227. </ws-form-item>
  228. <ws-form-item
  229. v-if="deptBudgetList.type == '潮粮'"
  230. label="潮粮水分占比"
  231. span="1"
  232. prop="tidalGrainWater"
  233. class="readonly"
  234. >
  235. <ws-input
  236. @input="pureweight(1)"
  237. v-model="deptBudgetList.tidalGrainWater"
  238. placeholder="请输入潮粮水分占比"
  239. maxlength="100"
  240. type="number"
  241. @mousewheel.native.prevent
  242. size="small"
  243. />
  244. </ws-form-item>
  245. <ws-form-item
  246. v-if="deptBudgetList.type == '潮粮'"
  247. label="纯重"
  248. span="1"
  249. prop="pureWeight"
  250. class="readonly"
  251. >
  252. <ws-input
  253. disabled
  254. v-model="deptBudgetList.pureWeight"
  255. placeholder="不可编辑,自动计算"
  256. maxlength="100"
  257. size="small"
  258. />
  259. </ws-form-item>
  260. <!--净重(公斤)-->
  261. <ws-form-item label="扣款(元/公斤)" span="1" prop="deductionAmount">
  262. <ws-input
  263. @input="kkInput(deptBudgetList.deductionAmount)"
  264. v-model="deptBudgetList.deductionAmount"
  265. placeholder="请输入扣款金额"
  266. maxlength="120"
  267. size="small"
  268. />
  269. </ws-form-item>
  270. <!-- 品级 -->
  271. <ws-form-item label="品级" span="1" class="readonly">
  272. <ws-select
  273. v-model="deptBudgetList.grade"
  274. placeholder
  275. class="typeselect"
  276. @change="selectpackingMethod"
  277. >
  278. <ws-option
  279. v-for="item in gradeList"
  280. :key="item.constKey"
  281. :label="item.constValue"
  282. :value="item.constValue"
  283. />
  284. </ws-select>
  285. </ws-form-item>
  286. <!--经办人-->
  287. <ws-form-item label="经办人" span="1" prop="agent">
  288. <el-select
  289. v-model="deptBudgetList.agent"
  290. placeholder="请选择经办人"
  291. filterable
  292. clearable
  293. @change="selectstaff"
  294. >
  295. <el-option
  296. v-for="item in options"
  297. :key="item.value"
  298. :label="item.staffName"
  299. :value="item.staffName"
  300. />
  301. </el-select>
  302. </ws-form-item>
  303. <!--出库日期-->
  304. <ws-form-item
  305. label="入库日期"
  306. span="1"
  307. prop="inOutDate"
  308. class="deliverydate"
  309. >
  310. <el-date-picker
  311. v-model="deptBudgetList.inOutDate"
  312. placeholder="请选择入库日期"
  313. type="date"
  314. value-format="yyyy-MM-dd"
  315. ></el-date-picker>
  316. </ws-form-item>
  317. <!-- 入库类型 -->
  318. <ws-form-item label="入库类型" span="1">
  319. <ws-select
  320. v-model="deptBudgetList.inOutType"
  321. placeholder
  322. class="typeselect"
  323. @change="selectstorageType"
  324. :disabled="isSelectType"
  325. >
  326. <ws-option
  327. v-for="item in storageType"
  328. :key="item.constKey"
  329. :label="item.constValue"
  330. :value="item.constValue"
  331. />
  332. </ws-select>
  333. </ws-form-item>
  334. <!--入库方式-->
  335. <ws-form-item label="入库方式" span="1" prop="outType">
  336. <el-select
  337. v-model="deptBudgetList.outType"
  338. placeholder="请选择入库方式"
  339. >
  340. <el-option
  341. v-for="item in multiSelector"
  342. :key="item.value"
  343. :label="item.name"
  344. :value="item.name"
  345. />
  346. </el-select>
  347. </ws-form-item>
  348. <!--车牌号 -->
  349. <ws-form-item
  350. label="车牌号"
  351. span="1"
  352. prop="carNo"
  353. v-if="
  354. deptBudgetList.outType == '汽运' ||
  355. deptBudgetList.outType == '集装箱船'
  356. "
  357. >
  358. <ws-input
  359. v-if="options2.length==0"
  360. v-model="deptBudgetList.carNo"
  361. placeholder="请输入车牌号"
  362. maxlength="7"
  363. size="small"
  364. />
  365. <el-select
  366. v-if='carstatus&&options2.length>0'
  367. filterable
  368. :filter-method="dataFilter2"
  369. v-model="deptBudgetList.carNo"
  370. placeholder="请选择车牌号"
  371. class="typeselect"
  372. @change="carChange"
  373. >
  374. <el-option
  375. v-for="item in options2"
  376. :key="item.constKey"
  377. :label="item.carNo + '(' + item.tranCarNo + ')'"
  378. :value="item.carNo"
  379. />
  380. </el-select>
  381. <el-select
  382. v-if='!carstatus&&options2.length>0'
  383. filterable
  384. :filter-method="dataFilter2"
  385. v-model="deptBudgetList.carNo"
  386. placeholder="请选择车牌号"
  387. class="typeselect"
  388. @change="carChange"
  389. >
  390. <el-option
  391. v-for="item in options2"
  392. :key="item.constKey"
  393. :label="item.carNo"
  394. :value="item.carNo"
  395. />
  396. </el-select>
  397. </ws-form-item>
  398. <!--船名 -->
  399. <ws-form-item
  400. label="船名"
  401. span="1"
  402. prop="carNo"
  403. v-if="deptBudgetList.outType == '散船'"
  404. >
  405. <ws-input
  406. v-model="deptBudgetList.carNo"
  407. placeholder="请输入船名"
  408. size="small"
  409. />
  410. </ws-form-item>
  411. <!--车号 -->
  412. <ws-form-item
  413. label="车号"
  414. span="1"
  415. prop="carNo"
  416. v-if="deptBudgetList.outType == '火运'"
  417. >
  418. <ws-input
  419. v-model="deptBudgetList.carNo"
  420. placeholder="请输入车号"
  421. size="small"
  422. />
  423. </ws-form-item>
  424. <ws-form-item
  425. label="箱号-1"
  426. span="1"
  427. prop="boxNo"
  428. v-if="
  429. deptBudgetList.outType == '汽运' ||
  430. deptBudgetList.outType == '集装箱船'
  431. "
  432. >
  433. <ws-input
  434. v-model="deptBudgetList.boxNo"
  435. placeholder="请输入箱号"
  436. maxlength="20"
  437. size="small"
  438. />
  439. </ws-form-item>
  440. <ws-form-item
  441. label="箱号-2"
  442. span="1"
  443. prop="boxNoOther"
  444. v-if="
  445. deptBudgetList.outType == '汽运' ||
  446. deptBudgetList.outType == '集装箱船'
  447. "
  448. >
  449. <ws-input
  450. v-model="deptBudgetList.boxNoOther"
  451. placeholder="请输入箱号"
  452. maxlength="20"
  453. size="small"
  454. />
  455. </ws-form-item>
  456. <ws-form-item
  457. label="封号-1"
  458. span="1"
  459. prop="titleNo"
  460. v-if="
  461. deptBudgetList.outType == '汽运' ||
  462. deptBudgetList.outType == '集装箱船'
  463. "
  464. >
  465. <ws-input
  466. v-model="deptBudgetList.titleNo"
  467. placeholder="请输入封号"
  468. maxlength="20"
  469. size="small"
  470. />
  471. </ws-form-item>
  472. <ws-form-item
  473. label="封号-2"
  474. span="1"
  475. prop="titleNoOther"
  476. v-if="
  477. deptBudgetList.outType == '汽运' ||
  478. deptBudgetList.outType == '集装箱船'
  479. "
  480. >
  481. <ws-input
  482. v-model="deptBudgetList.titleNoOther"
  483. placeholder="请输入封号"
  484. maxlength="20"
  485. size="small"
  486. />
  487. </ws-form-item>
  488. <ws-form-item
  489. label="车厢号-1"
  490. span="1"
  491. prop="wingNumber"
  492. v-if="deptBudgetList.outType == '火运'"
  493. >
  494. <ws-input
  495. v-model="deptBudgetList.wingNumber"
  496. placeholder="请输入车厢号"
  497. maxlength="20"
  498. size="small"
  499. />
  500. </ws-form-item>
  501. <ws-form-item
  502. label="车厢号-2"
  503. span="1"
  504. prop="wingNumberOther"
  505. v-if="deptBudgetList.outType == '火运'"
  506. >
  507. <ws-input
  508. v-model="deptBudgetList.wingNumberOther"
  509. placeholder="请输入车厢号"
  510. maxlength="20"
  511. size="small"
  512. />
  513. </ws-form-item>
  514. <ws-form-item label="成本" span="1" prop="cost">
  515. <ws-input
  516. :disabled="disabled1"
  517. v-model="deptBudgetList.cost"
  518. placeholder="请输入成本"
  519. size="small"
  520. type="number"
  521. @mousewheel.native.prevent
  522. />
  523. <img
  524. width="17"
  525. height="18"
  526. style="vertical-align: text-top; position: relative; top: -1px"
  527. src="../../../public/img/edit.png"
  528. @click="editClick(1)"
  529. alt=""
  530. />
  531. </ws-form-item>
  532. <ws-form-item label="运费" span="1" prop="freight">
  533. <ws-input
  534. :disabled="disabled2"
  535. v-model="deptBudgetList.freight"
  536. placeholder="请输入运费"
  537. size="small"
  538. type="number"
  539. @mousewheel.native.prevent
  540. />
  541. <img
  542. width="17"
  543. height="18"
  544. style="vertical-align: text-top; position: relative; top: -1px"
  545. src="../../../public/img/edit.png"
  546. @click="editClick(2)"
  547. alt=""
  548. />
  549. </ws-form-item>
  550. <!-- onkeyup="value=value.replace(/[^\A-\Z0-9\u4E00-\u9FA5\.]/g,'')" -->
  551. </ws-info-table>
  552. <div
  553. v-show="
  554. this.$route.query.warehouseType == 2 &&
  555. this.deptBudgetList.createType == 2
  556. "
  557. >
  558. <el-checkbox v-model="checked" checked>退库并出库</el-checkbox>
  559. <ws-info-table
  560. v-show="checked == true && this.deptBudgetList.createType == 2"
  561. >
  562. <!-- 出库类型 -->
  563. <ws-form-item label="出库类型" span="1" prop="temporaryOutType">
  564. <!-- v-model="deptBudgetList.deliveryType" -->
  565. <ws-select
  566. v-model="deptBudgetList.temporaryOutType"
  567. placeholder
  568. class="typeselect"
  569. >
  570. <ws-option
  571. v-for="item in deliveryType"
  572. :key="item.constKey"
  573. :label="item.constValue"
  574. :value="item.constValue"
  575. />
  576. </ws-select>
  577. </ws-form-item>
  578. <!-- 出库合同编号 -->
  579. <ws-form-item label="出库合同编号" span="1">
  580. <ws-select
  581. v-model="deptBudgetList.outContractNo"
  582. placeholder="请选择合同编号或移库任务编号"
  583. class="typeselect"
  584. >
  585. <ws-option
  586. v-for="item in outContractNo"
  587. :key="item.constKey"
  588. :label="item.contractNo"
  589. :value="item.contractNo"
  590. />
  591. </ws-select>
  592. </ws-form-item>
  593. </ws-info-table>
  594. </div>
  595. </div>
  596. <!-- <div class="small-title">上传磅单照片</div>
  597. <el-upload
  598. action="https://www.zthymaoyi.com/upload/admin"
  599. :show-file-list="false"
  600. :on-success="
  601. (res) => {
  602. uploadSuccessHandle1(res)
  603. }
  604. "
  605. class="avatar-uploader"
  606. accept=".jpg, .jpeg, .png, .gif"
  607. >
  608. <el-button size="small" type="primary">点击上传</el-button>
  609. </el-upload> -->
  610. <div v-if="deptBudgetList.addressUrl != ''">
  611. <img
  612. style="width: 100px; height: 100px"
  613. :src="deptBudgetList.addressUrl"
  614. alt=""
  615. />
  616. </div>
  617. <div class="small-title">化验数据(选填)</div>
  618. <div class="inspector">
  619. <!--自检员-->
  620. <!-- <ws-form-item label="质检员" span="1" prop="qualityInspector">
  621. <ws-input
  622. v-model="deptBudgetList.warehouseInOutDetail.qualityInspector"
  623. placeholder="请输入质检员姓名"
  624. maxlength="10"
  625. size="small"
  626. />
  627. </ws-form-item> -->
  628. <ws-form-item label="质检员" span="1" prop="qualityInspector">
  629. <el-select
  630. v-model="deptBudgetList.warehouseInOutDetail.qualityInspector"
  631. placeholder="请选择质检员"
  632. filterable
  633. clearable
  634. @change="qualityInspectorChange"
  635. >
  636. <el-option
  637. v-for="item in qualityInspectorList"
  638. :key="item.value"
  639. :label="item.staffName"
  640. :value="item.staffName"
  641. />
  642. </el-select>
  643. </ws-form-item>
  644. </div>
  645. <div class="neifor">
  646. <ws-info-table>
  647. <!--水分(%)<=-->
  648. <ws-form-item label="水分(%)" span="1" prop="waterContent">
  649. <ws-input
  650. v-model="deptBudgetList.warehouseInOutDetail.waterContent"
  651. type="number"
  652. @mousewheel.native.prevent
  653. placeholder="请输入水分占比"
  654. maxlength="40"
  655. size="small"
  656. />
  657. </ws-form-item>
  658. <!--杂质(%)<=-->
  659. <ws-form-item label="杂质(%)" span="1" prop="impurity">
  660. <ws-input
  661. v-model="deptBudgetList.warehouseInOutDetail.impurity"
  662. type="number"
  663. @mousewheel.native.prevent
  664. placeholder="请输入杂质占比"
  665. maxlength="40"
  666. size="small"
  667. />
  668. </ws-form-item>
  669. <!--容重(克/升)-->
  670. <ws-form-item label="容重(克/升)" span="1" prop="bulkDensity">
  671. <ws-input
  672. v-model="deptBudgetList.warehouseInOutDetail.bulkDensity"
  673. type="number"
  674. @mousewheel.native.prevent
  675. placeholder="请输入容重"
  676. maxlength="40"
  677. size="small"
  678. />
  679. </ws-form-item>
  680. <!--霉变粒(%)<=-->
  681. <ws-form-item label="霉变粒(%)" span="1" prop="mildewGrain">
  682. <ws-input
  683. v-model="deptBudgetList.warehouseInOutDetail.mildewGrain"
  684. type="number"
  685. @mousewheel.native.prevent
  686. placeholder="请输入霉变粒占比"
  687. maxlength="40"
  688. size="small"
  689. />
  690. </ws-form-item>
  691. <!--热损伤(%)<=-->
  692. <ws-form-item label="热损伤(%)" span="1" prop="jiaorenli">
  693. <ws-input
  694. v-model="deptBudgetList.warehouseInOutDetail.jiaorenli"
  695. type="number"
  696. @mousewheel.native.prevent
  697. placeholder="请输入热损伤占比"
  698. maxlength="40"
  699. size="small"
  700. />
  701. </ws-form-item>
  702. <!--不完善粒(%)<=-->
  703. <ws-form-item label="不完善粒(%)" span="1" prop="imperfectGrain">
  704. <ws-input
  705. v-model="deptBudgetList.warehouseInOutDetail.imperfectGrain"
  706. type="number"
  707. @mousewheel.native.prevent
  708. placeholder="请输入不完善粒占比"
  709. maxlength="40"
  710. size="small"
  711. />
  712. </ws-form-item>
  713. </ws-info-table>
  714. </div>
  715. <div style="text-align: right; padding: 10px">
  716. <el-button
  717. v-if="information == '毛重检斤'"
  718. class="bg-bottom-up"
  719. type="primary"
  720. size="small"
  721. @click="temporaryStorage()"
  722. >保存</el-button
  723. >
  724. <el-button
  725. v-if="!allowEdit"
  726. class="bg-bottom-up"
  727. type="primary"
  728. size="small"
  729. @click="submit()"
  730. >提交</el-button
  731. >
  732. </div>
  733. </ws-form>
  734. </div>
  735. </template>
  736. <script>
  737. import {
  738. pullDown,
  739. addstorageputList,
  740. xialaNo,
  741. getstaff,
  742. getReceiptTaskNo,
  743. } from '@/model/warehouse/index'
  744. import Pagination from '@/components/Pagination'
  745. import WsUpload from '@/components/WsUpload'
  746. // import { dayjs, fmoney, EventBus } from 'base-core-lib'
  747. import { dayjs, EventBus } from 'base-core-lib'
  748. export default {
  749. name: 'viewSpareMoney',
  750. components: {
  751. WsUpload,
  752. Pagination,
  753. },
  754. watch: {
  755. // vesselId(val) {
  756. // this.getList()
  757. // },
  758. isShow(val) {
  759. this.showType = val
  760. },
  761. },
  762. data() {
  763. return {
  764. deptBudgetList1: [],
  765. qualityInspectorList: [],
  766. isGetCost: false,
  767. isSelectType: true,
  768. //弹出框
  769. dialogViewSpareMoney: false,
  770. dialogApproveFormVisible: false,
  771. // 船舶类型
  772. monetaryKey: null,
  773. // 表格显示数据
  774. tableDate: [],
  775. // 是否显示
  776. showType: true,
  777. typeList: ['干粮', '潮粮'],
  778. // 年
  779. year: '',
  780. carstatus: false,
  781. deptBudgetTotal: 0,
  782. currentPage: 1,
  783. pageSize: 10,
  784. searchType: 1,
  785. searchKeyWord: '',
  786. contractType: 2,
  787. startDate: null,
  788. endDate: null,
  789. goodnameList: {},
  790. checked: true,
  791. agent: [],
  792. staffList: [],
  793. options: [],
  794. options1: [],
  795. options2: [],
  796. outContractNo1: [],
  797. outContractNo: [],
  798. // 提交类型
  799. submitType: true,
  800. storageType: [],
  801. deliveryType: [],
  802. readonly: true,
  803. appendixIdsAdd: '',
  804. uploadSuccess: {},
  805. onChange: {},
  806. gradeList: [],
  807. rules: {},
  808. size: 10,
  809. disabled1: true,
  810. disabled2: true,
  811. tranCarInfoList: [],
  812. compId: localStorage.getItem('ws-pf_compId'),
  813. secretaryWeigher: localStorage.getItem('ws-pf_staffName'),
  814. deptCircularPage: {},
  815. packtypeList: {},
  816. date: {
  817. year: dayjs().format('YYYY'),
  818. month: dayjs().format('MM'),
  819. },
  820. contractList: [],
  821. deptBudgetList: {
  822. type: '干粮',
  823. freight: 0,
  824. cost: '',
  825. addressUrl: '',
  826. warehouseInOutDetail: {},
  827. deductionAmount: 0,
  828. deductionWeight: 0,
  829. grossWeight: '',
  830. tare: '',
  831. inOutDate: '',
  832. },
  833. historyList: [],
  834. cost: '',
  835. pickerBeginDateBefore: {
  836. disabledDate: (time) => {
  837. return time.getTime() > Date.now()
  838. },
  839. },
  840. accessoryTFs: false,
  841. allowEdit: true,
  842. param: 9600,
  843. information: '',
  844. result1: '00',
  845. multiSelector: [
  846. {
  847. name: '汽运',
  848. value: '0',
  849. },
  850. {
  851. name: '火运',
  852. value: '1',
  853. },
  854. {
  855. name: '集装箱船',
  856. value: '2',
  857. },
  858. {
  859. name: '散船',
  860. value: '3',
  861. },
  862. ],
  863. }
  864. },
  865. mounted() {
  866. let date = new Date()
  867. var year = date.getFullYear()
  868. var month = date.getMonth() + 1
  869. var strDate = date.getDate()
  870. this.deptBudgetList.inOutDate = '' + year + '-' + month + '-' + strDate
  871. this.information = this.$route.query.information
  872. if (this.$route.query.allowEdit == 1) {
  873. this.allowEdit = false
  874. } else {
  875. this.allowEdit = true
  876. }
  877. this.deptBudgetList.baseId = this.$route.query.baseId
  878. this.deptBudgetList.positionId = this.$route.query.positionId
  879. this.deptBudgetList.warehouseName = this.$route.query.warehouseName
  880. this.deptBudgetList.binNumber = this.$route.query.binNumber
  881. this.deptBudgetList.warehouseType = this.$route.query.warehouseType
  882. this.deptBudgetList.createType = this.$route.query.createType
  883. this.getList()
  884. // this.deptBudgetList.grade = '一等品'
  885. // this.deptBudgetList.gradeKey = '1'
  886. this.deptBudgetList.inOutTypeFlag = 1
  887. if (this.deptBudgetList.cost) {
  888. if (this.deptBudgetList.cost > this.deptBudgetList.deductionAmount) {
  889. this.deptBudgetList.cost =
  890. this.cost - this.deptBudgetList.deductionAmount
  891. } else {
  892. }
  893. }
  894. getReceiptTaskNo({
  895. flag: 2,
  896. warehouseName: this.deptBudgetList.warehouseName,
  897. agentKey: localStorage.getItem('ws-pf_userId'),
  898. })
  899. .toPromise()
  900. .then((response) => {
  901. console.log(response)
  902. this.deptBudgetList1 = response
  903. })
  904. // if (this.deptBudgetList.warehouseType == 1) {
  905. // // this.deptBudgetList.inOutType = '采购入库'
  906. // this.deptBudgetList.inOutTypeKey = '1'
  907. // } else {
  908. // // this.deptBudgetList.inOutType = '退库'
  909. // this.deptBudgetList.inOutTypeKey = '1'
  910. // }
  911. if(this.$route.query.automaticWeightAcquisition == '1'){
  912. this.openPort()
  913. }
  914. },
  915. methods: {
  916. async closePort() {
  917. console.log('closePort')
  918. this.reader.cancel()
  919. },
  920. async openPort() {
  921. console.log('openPort', navigator)
  922. if ('serial' in navigator) {
  923. // if (!this.$store.state.app.reader) {
  924. // The Web Serial API is supported.
  925. console.log('the Web Serial API is supported.')
  926. console.log(this.param)
  927. const port = await navigator.serial.requestPort()
  928. await port.open({
  929. baudRate: this.param,
  930. }) // set baud rate
  931. this.reader = port.readable.getReader()
  932. console.log('beforeReader', port)
  933. console.log('beforeReader', this.reader)
  934. this.$store.dispatch('app/setReader', this.reader)
  935. // } else {
  936. // console.log('afterport', this.$store.state.app.reader)
  937. // this.reader = this.$store.state.app.reader
  938. // }
  939. // 监听来自串行设备的数据
  940. while (true) {
  941. const { value, done } = await this.reader.read()
  942. // console.log("value",value);
  943. if (done) {
  944. // 允许稍后关闭串口。
  945. this.reader.releaseLock()
  946. break
  947. }
  948. var result = ''
  949. //2。获取16进制字符串
  950. // var receData = HexConvert.ByteToString(value);
  951. // console.log("receData",receData);
  952. var flag = false
  953. var flag1 = false
  954. // for (var i = 0; i < value.length; i++) {
  955. // var tmp = String.fromCharCode(value[i])
  956. // if (tmp == '+') {
  957. // flag = true
  958. // }
  959. // if (flag && result.length < 6 && tmp != '+') {
  960. // result += tmp
  961. // }
  962. // }
  963. // if (this.information != '毛重检斤') {
  964. // if(parseInt(result)){
  965. // this.deptBudgetList.grossWeight = parseInt(result)
  966. // }
  967. // } else {
  968. // if(parseInt(result)){
  969. // this.deptBudgetList.tare = parseInt(result)
  970. // }
  971. // }
  972. console.log('value:', value)
  973. if (
  974. this.deptBudgetList.warehouseName &&
  975. (this.deptBudgetList.warehouseName == '山东诸城迈饶库' ||
  976. this.deptBudgetList.warehouseName == '克东千红库' ||
  977. this.deptBudgetList.warehouseName == '鲅鱼圈祥腾库' ||
  978. this.deptBudgetList.warehouseName == '哈尔滨依兰库'||
  979. this.deptBudgetList.warehouseName == '龙江金信库')
  980. ) {
  981. for (var i = 0; i < value.length; i++) {
  982. var tmp = String.fromCharCode(value[i])
  983. if (tmp == '+') {
  984. flag = true
  985. }
  986. if (flag && result.length < 6 && tmp != '+') {
  987. result += tmp
  988. }
  989. }
  990. if (this.information == '毛重检斤') {
  991. if (parseInt(result) || parseInt(result) == 0) {
  992. this.deptBudgetList.grossWeight = parseInt(result)
  993. }
  994. } else {
  995. if (parseInt(result) || parseInt(result) == 0) {
  996. this.deptBudgetList.tare = parseInt(result)
  997. }
  998. }
  999. } else if (
  1000. this.deptBudgetList.warehouseName &&
  1001. (this.deptBudgetList.warehouseName == '顺诚粮库' ||
  1002. this.deptBudgetList.warehouseName == '鲅鱼圈金信库')
  1003. ) {
  1004. for (var i = value.length - 1; i >= 0; i--) {
  1005. var tmp = String.fromCharCode(value[i])
  1006. console.log(tmp)
  1007. if (String.fromCharCode(value[0]) == '.') {
  1008. flag = true
  1009. }
  1010. if (flag && result.length < 9 && tmp != '=' && tmp != '.') {
  1011. result += tmp
  1012. }
  1013. }
  1014. if (this.information == '毛重检斤') {
  1015. if (parseInt(result) || parseInt(result) == 0) {
  1016. this.deptBudgetList.grossWeight = parseInt(result)
  1017. }
  1018. } else {
  1019. if (parseInt(result) || parseInt(result) == 0) {
  1020. this.deptBudgetList.tare = parseInt(result)
  1021. }
  1022. }
  1023. } else {
  1024. for (var i = 0; i < value.length; i++) {
  1025. var tmp = String.fromCharCode(value[i])
  1026. if (value[0] != 49 && value[0] != 2) {
  1027. if (
  1028. value[value.length - 1] == 48 &&
  1029. value[value.length - 2] == 48
  1030. ) {
  1031. flag1 = true
  1032. } else {
  1033. break
  1034. }
  1035. }
  1036. if (tmp == String.fromCharCode(32)) {
  1037. flag = true
  1038. }
  1039. if (
  1040. flag &&
  1041. result.length < 7 &&
  1042. tmp != String.fromCharCode(32) &&
  1043. !(
  1044. value[value.length - 1] == 48 && value[value.length - 2] == 48
  1045. )
  1046. ) {
  1047. result += tmp
  1048. }
  1049. if (flag1 && tmp != String.fromCharCode(32)) {
  1050. if (
  1051. value[value.length - 1] == 48 &&
  1052. value[value.length - 2] == 48
  1053. ) {
  1054. if (i == 0) {
  1055. this.result1 = tmp + '0'
  1056. }
  1057. }
  1058. }
  1059. }
  1060. if (this.information == '毛重检斤') {
  1061. if (parseInt(result) || parseInt(result) == 0) {
  1062. this.deptBudgetList.grossWeight = parseInt(
  1063. result + this.result1
  1064. )
  1065. }
  1066. } else {
  1067. if (parseInt(result) || parseInt(result) == 0) {
  1068. this.deptBudgetList.tare = parseInt(result + this.result1)
  1069. }
  1070. }
  1071. }
  1072. // setTimeout(1000)
  1073. // value 是一个 Uint8Array
  1074. }
  1075. await port.close()
  1076. } else {
  1077. console.log('the Web Serial API is not supported.', navigator)
  1078. }
  1079. },
  1080. qualityInspectorChange(e) {
  1081. console.log(e)
  1082. },
  1083. kkInput(val) {
  1084. console.log(val)
  1085. if (this.isGetCost) {
  1086. if (this.deptBudgetList.cost > val) {
  1087. this.deptBudgetList.cost =
  1088. this.cost - this.deptBudgetList.deductionAmount
  1089. }
  1090. }
  1091. },
  1092. uploadSuccessHandle1(res) {
  1093. this.deptBudgetList.addressUrl = res.url
  1094. console.log(this.deptBudgetList.addressUrl)
  1095. },
  1096. dataFilter1(val) {
  1097. console.log(val)
  1098. this.deptBudgetList.contractNo = val
  1099. if (val) {
  1100. //val存在
  1101. this.options1 = this.outContractNo1.filter((item) => {
  1102. if (
  1103. !!~item.contractNo.indexOf(val) ||
  1104. !!~item.contractNo.toUpperCase().indexOf(val.toUpperCase())
  1105. ) {
  1106. return true
  1107. }
  1108. })
  1109. } else {
  1110. //val为空时,还原数组
  1111. this.options1 = this.outContractNo
  1112. }
  1113. },
  1114. dataFilter2(val) {
  1115. this.deptBudgetList.carNo = val
  1116. if (val) {
  1117. //val存在
  1118. this.options1 = this.outContractNo1.filter((item) => {
  1119. if (
  1120. !!~item.carNo.indexOf(val) ||
  1121. !!~item.carNo.toUpperCase().indexOf(val.toUpperCase())
  1122. ) {
  1123. return true
  1124. }
  1125. })
  1126. } else {
  1127. //val为空时,还原数组
  1128. this.options2 = this.tranCarInfoList
  1129. }
  1130. },
  1131. editClick(status) {
  1132. this.isGetCost = false
  1133. if (status == 1) {
  1134. this.disabled1 = !this.disabled1
  1135. } else {
  1136. this.disabled2 = !this.disabled2
  1137. }
  1138. },
  1139. //返回按钮
  1140. revert() {
  1141. this.$router.push({
  1142. path: 'warehouseManagementList',
  1143. })
  1144. },
  1145. carChange(e) {
  1146. for (let i = 0; i < this.tranCarInfoList.length; i++) {
  1147. if (this.tranCarInfoList[i].carNo == this.deptBudgetList.carNo) {
  1148. this.deptBudgetList.tranCarNo = this.tranCarInfoList[i].tranCarNo
  1149. this.deptBudgetList.freight = Math.round(
  1150. this.tranCarInfoList[i].tranPrice
  1151. )
  1152. }
  1153. }
  1154. },
  1155. dataFilter(val) {
  1156. // console.log(val,"名")
  1157. this.deptBudgetList.staffList = val
  1158. if (val) {
  1159. //val存在
  1160. this.options = this.staffList.filter((item) => {
  1161. if (
  1162. !!~item.staffName.indexOf(val) ||
  1163. !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
  1164. ) {
  1165. return true
  1166. }
  1167. })
  1168. } else {
  1169. //val为空时,还原数组
  1170. this.options = this.staffList
  1171. }
  1172. },
  1173. selectstaff(e) {
  1174. for (var i = 0; i < this.staffList.length; i++) {
  1175. if (this.staffList[i].staffName == e) {
  1176. this.deptBudgetList.personChargeKey = this.staffList[i].staffId
  1177. }
  1178. }
  1179. },
  1180. //提交按钮
  1181. submit() {
  1182. if(this.reader){
  1183. this.reader.cancel()
  1184. }
  1185. if (!this.deptBudgetList.goodsName) {
  1186. this.$message({
  1187. message: '货名不能为空',
  1188. type: 'warning',
  1189. })
  1190. return
  1191. }
  1192. if (!this.deptBudgetList.grossWeight) {
  1193. this.$message({
  1194. message: '毛重不能为空',
  1195. type: 'warning',
  1196. })
  1197. return
  1198. }
  1199. if (
  1200. this.deptBudgetList.grossWeight < 100 ||
  1201. this.deptBudgetList.grossWeight > 500000 ||
  1202. (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
  1203. String(this.deptBudgetList.grossWeight).length -
  1204. (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
  1205. 3)
  1206. ) {
  1207. this.$message({
  1208. message: '毛重输入错误(单位:公斤)',
  1209. type: 'warning',
  1210. })
  1211. return
  1212. }
  1213. if (!String(this.deptBudgetList.tare)) {
  1214. this.$message({
  1215. message: '皮重不能为空',
  1216. type: 'warning',
  1217. })
  1218. return
  1219. }
  1220. if (
  1221. this.deptBudgetList.tare < 0 ||
  1222. this.deptBudgetList.tare > 5000000 ||
  1223. (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
  1224. String(this.deptBudgetList.tare).length -
  1225. (String(this.deptBudgetList.tare).indexOf('.') + 1) >
  1226. 3)
  1227. ) {
  1228. this.$message({
  1229. message: '皮重输入错误(单位:公斤)',
  1230. type: 'warning',
  1231. })
  1232. return
  1233. }
  1234. if (!String(this.deptBudgetList.deductionWeight)) {
  1235. this.$message({
  1236. message: '扣重不能为空',
  1237. type: 'warning',
  1238. })
  1239. return
  1240. }
  1241. if (
  1242. this.deptBudgetList.deductionWeight < 0 ||
  1243. this.deptBudgetList.deductionWeight > 1000 ||
  1244. (String(this.deptBudgetList.deductionWeight).indexOf('.') != -1 &&
  1245. String(this.deptBudgetList.deductionWeight).length -
  1246. (String(this.deptBudgetList.deductionWeight).indexOf('.') + 1) >
  1247. 3)
  1248. ) {
  1249. this.$message({
  1250. message: '扣重输入错误',
  1251. type: 'warning',
  1252. })
  1253. return
  1254. }
  1255. if (
  1256. this.deptBudgetList.type == '潮粮' &&
  1257. !this.deptBudgetList.buckleWeightRatio
  1258. ) {
  1259. this.$message({
  1260. message: '扣重比不能为空',
  1261. type: 'warning',
  1262. })
  1263. return
  1264. }
  1265. if (
  1266. (this.deptBudgetList.type == '潮粮' &&
  1267. this.deptBudgetList.buckleWeightRatio < 0) ||
  1268. (this.deptBudgetList.type == '潮粮' &&
  1269. this.deptBudgetList.buckleWeightRatio > 3) ||
  1270. (this.deptBudgetList.type == '潮粮' &&
  1271. String(this.deptBudgetList.buckleWeightRatio).indexOf('.') != -1 &&
  1272. String(this.deptBudgetList.buckleWeightRatio).length -
  1273. (String(this.deptBudgetList.buckleWeightRatio).indexOf('.') + 1) >
  1274. 2)
  1275. ) {
  1276. this.$message({
  1277. message: '扣重比输入错误',
  1278. type: 'warning',
  1279. })
  1280. return
  1281. }
  1282. if (
  1283. this.deptBudgetList.type == '潮粮' &&
  1284. !this.deptBudgetList.tidalGrainWater
  1285. ) {
  1286. this.$message({
  1287. message: '潮粮水分不能为空',
  1288. type: 'warning',
  1289. })
  1290. return
  1291. }
  1292. if (
  1293. (this.deptBudgetList.type == '潮粮' &&
  1294. this.deptBudgetList.tidalGrainWater < 1) ||
  1295. (this.deptBudgetList.type == '潮粮' &&
  1296. this.deptBudgetList.tidalGrainWater > 40) ||
  1297. (this.deptBudgetList.type == '潮粮' &&
  1298. String(this.deptBudgetList.tidalGrainWater).indexOf('.') != -1 &&
  1299. String(this.deptBudgetList.tidalGrainWater).length -
  1300. (String(this.deptBudgetList.tidalGrainWater).indexOf('.') + 1) >
  1301. 2)
  1302. ) {
  1303. this.$message({
  1304. message: '潮粮水分输入错误',
  1305. type: 'warning',
  1306. })
  1307. return
  1308. }
  1309. if (
  1310. this.deptBudgetList.type == '潮粮' &&
  1311. !this.deptBudgetList.solidGrainWater
  1312. ) {
  1313. this.$message({
  1314. message: '干粮水分不能为空',
  1315. type: 'warning',
  1316. })
  1317. return
  1318. }
  1319. if (
  1320. (this.deptBudgetList.type == '潮粮' &&
  1321. this.deptBudgetList.solidGrainWater < 1) ||
  1322. (this.deptBudgetList.type == '潮粮' &&
  1323. this.deptBudgetList.solidGrainWater > 40) ||
  1324. (this.deptBudgetList.type == '潮粮' &&
  1325. String(this.deptBudgetList.solidGrainWater).indexOf('.') != -1 &&
  1326. String(this.deptBudgetList.solidGrainWater).length -
  1327. (String(this.deptBudgetList.solidGrainWater).indexOf('.') + 1) >
  1328. 1)
  1329. ) {
  1330. this.$message({
  1331. message: '干粮水分输入错误',
  1332. type: 'warning',
  1333. })
  1334. return
  1335. }
  1336. if (!String(this.deptBudgetList.deductionAmount)) {
  1337. this.$message({
  1338. message: '扣款不能为空',
  1339. type: 'warning',
  1340. })
  1341. return
  1342. }
  1343. if (
  1344. this.deptBudgetList.deductionAmount < 0 ||
  1345. this.deptBudgetList.deductionAmount > 10000 ||
  1346. (String(this.deptBudgetList.deductionAmount).indexOf('.') != -1 &&
  1347. String(this.deptBudgetList.deductionAmount).length -
  1348. (String(this.deptBudgetList.deductionAmount).indexOf('.') + 1) >
  1349. 2)
  1350. ) {
  1351. this.$message({
  1352. message: '扣款输入错误',
  1353. type: 'warning',
  1354. })
  1355. return
  1356. }
  1357. if (!this.deptBudgetList.cost) {
  1358. this.$message({
  1359. message: '未获取到成本,请编辑后提交',
  1360. type: 'warning',
  1361. })
  1362. return
  1363. }
  1364. if (
  1365. this.deptBudgetList.cost < 0 ||
  1366. this.deptBudgetList.cost > 20000 ||
  1367. (String(this.deptBudgetList.cost).indexOf('.') != -1 &&
  1368. String(this.deptBudgetList.cost).length -
  1369. (String(this.deptBudgetList.cost).indexOf('.') + 1) >
  1370. 2)
  1371. ) {
  1372. this.$message({
  1373. message: '成本输入错误',
  1374. type: 'warning',
  1375. })
  1376. return
  1377. }
  1378. if (!String(this.deptBudgetList.freight)) {
  1379. this.$message({
  1380. message: '运费不能为空',
  1381. type: 'warning',
  1382. })
  1383. return
  1384. }
  1385. if (
  1386. this.deptBudgetList.freight < 0 ||
  1387. this.deptBudgetList.freight > 100000 ||
  1388. (String(this.deptBudgetList.freight).indexOf('.') != -1 &&
  1389. String(this.deptBudgetList.freight).length -
  1390. (String(this.deptBudgetList.freight).indexOf('.') + 1) >
  1391. 2)
  1392. ) {
  1393. this.$message({
  1394. message: '运费输入错误',
  1395. type: 'warning',
  1396. })
  1397. return
  1398. }
  1399. if (!this.deptBudgetList.agent) {
  1400. this.$message({
  1401. message: '经办人不能为空',
  1402. type: 'warning',
  1403. })
  1404. return
  1405. }
  1406. if (
  1407. this.deptBudgetList.agent.length < 2 ||
  1408. this.deptBudgetList.agent.length > 10
  1409. ) {
  1410. this.$message({
  1411. message: '经办人输入有误',
  1412. type: 'warning',
  1413. })
  1414. return
  1415. }
  1416. if (!this.deptBudgetList.grade) {
  1417. this.$message({
  1418. message: '品级不能为空!',
  1419. type: 'warning',
  1420. })
  1421. return
  1422. }
  1423. if (!this.deptBudgetList.inOutDate) {
  1424. this.$message({
  1425. message: '入库日期不能为空!',
  1426. type: 'warning',
  1427. })
  1428. return
  1429. }
  1430. if (!this.deptBudgetList.inOutType) {
  1431. this.$message({
  1432. message: '入库类型不能为空!',
  1433. type: 'warning',
  1434. })
  1435. return
  1436. }
  1437. if (!this.deptBudgetList.carNo) {
  1438. this.$message({
  1439. message: '车牌号不能为空',
  1440. type: 'warning',
  1441. })
  1442. return
  1443. }
  1444. if (this.deptBudgetList.carNo.length > 7) {
  1445. this.$message({
  1446. message: '车牌号输入错误,请输入7个字符之内',
  1447. type: 'warning',
  1448. })
  1449. return
  1450. }
  1451. if (this.deptBudgetList.boxNo && this.deptBudgetList.boxNo.length > 20) {
  1452. this.$message({
  1453. message: '箱号-1输入错误',
  1454. type: 'warning',
  1455. })
  1456. return
  1457. }
  1458. if (
  1459. this.deptBudgetList.boxNoOther &&
  1460. this.deptBudgetList.boxNoOther.length > 20
  1461. ) {
  1462. this.$message({
  1463. message: '箱号-2输入错误',
  1464. type: 'warning',
  1465. })
  1466. return
  1467. }
  1468. if (
  1469. this.deptBudgetList.titleNo &&
  1470. this.deptBudgetList.titleNo.length > 20
  1471. ) {
  1472. this.$message({
  1473. message: '封号-1输入错误',
  1474. type: 'warning',
  1475. })
  1476. return
  1477. }
  1478. if (
  1479. this.deptBudgetList.titleNoOther &&
  1480. this.deptBudgetList.titleNoOther.length > 20
  1481. ) {
  1482. this.$message({
  1483. message: '封号-2输入错误',
  1484. type: 'warning',
  1485. })
  1486. return
  1487. }
  1488. if (!this.deptBudgetList.contractNo) {
  1489. this.$message({
  1490. message: '合同编号不能为空',
  1491. type: 'warning',
  1492. })
  1493. return
  1494. }
  1495. // if (
  1496. // this.deptBudgetList.contractNo.length < 6 ||
  1497. // this.deptBudgetList.contractNo.length > 20
  1498. // ) {
  1499. // this.$message({
  1500. // message: '合同编号长度不符合要求,请输入6-20个字符之内',
  1501. // type: 'warning',
  1502. // })
  1503. // return
  1504. // }
  1505. // if (!this.deptBudgetList.addressUrl) {
  1506. // this.$message({
  1507. // message: '附件不能为空',
  1508. // type: 'warning',
  1509. // })
  1510. // return
  1511. // }
  1512. //自检员
  1513. if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
  1514. if (
  1515. this.deptBudgetList.warehouseInOutDetail.qualityInspector.length <
  1516. 2 ||
  1517. this.deptBudgetList.warehouseInOutDetail.qualityInspector.length > 10
  1518. ) {
  1519. this.$message({
  1520. message: '质检员姓名长度错误!',
  1521. type: 'warning',
  1522. })
  1523. return
  1524. }
  1525. }
  1526. if (this.deptBudgetList.warehouseInOutDetail.waterContent) {
  1527. if (isNaN(this.deptBudgetList.warehouseInOutDetail.waterContent)) {
  1528. this.$message({
  1529. message: '水分(%)非数字!',
  1530. type: 'warning',
  1531. })
  1532. return
  1533. }
  1534. if (
  1535. this.deptBudgetList.warehouseInOutDetail.waterContent < 1 ||
  1536. this.deptBudgetList.warehouseInOutDetail.waterContent > 40 ||
  1537. (String(
  1538. this.deptBudgetList.warehouseInOutDetail.waterContent
  1539. ).indexOf('.') != -1 &&
  1540. String(this.deptBudgetList.warehouseInOutDetail.waterContent)
  1541. .length -
  1542. (String(
  1543. this.deptBudgetList.warehouseInOutDetail.waterContent
  1544. ).indexOf('.') +
  1545. 1) >
  1546. 2)
  1547. ) {
  1548. this.$message({
  1549. message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1550. type: 'warning',
  1551. })
  1552. return
  1553. }
  1554. }
  1555. //杂质
  1556. if (this.deptBudgetList.warehouseInOutDetail.impurity) {
  1557. if (isNaN(this.deptBudgetList.warehouseInOutDetail.impurity)) {
  1558. this.$message({
  1559. message: '杂质(%)非数字!',
  1560. type: 'warning',
  1561. })
  1562. return
  1563. }
  1564. if (
  1565. this.deptBudgetList.warehouseInOutDetail.impurity < 1 ||
  1566. this.deptBudgetList.warehouseInOutDetail.impurity > 40 ||
  1567. (String(this.deptBudgetList.warehouseInOutDetail.impurity).indexOf(
  1568. '.'
  1569. ) != -1 &&
  1570. String(this.deptBudgetList.warehouseInOutDetail.impurity).length -
  1571. (String(
  1572. this.deptBudgetList.warehouseInOutDetail.impurity
  1573. ).indexOf('.') +
  1574. 1) >
  1575. 2)
  1576. ) {
  1577. this.$message({
  1578. message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1579. type: 'warning',
  1580. })
  1581. return
  1582. }
  1583. }
  1584. //霉变
  1585. if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
  1586. if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
  1587. this.$message({
  1588. message: '霉变粒(%)非数字!',
  1589. type: 'warning',
  1590. })
  1591. return
  1592. }
  1593. if (
  1594. this.deptBudgetList.warehouseInOutDetail.mildewGrain < 1 ||
  1595. this.deptBudgetList.warehouseInOutDetail.mildewGrain > 40 ||
  1596. (String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
  1597. '.'
  1598. ) != -1 &&
  1599. String(this.deptBudgetList.warehouseInOutDetail.mildewGrain)
  1600. .length -
  1601. (String(
  1602. this.deptBudgetList.warehouseInOutDetail.mildewGrain
  1603. ).indexOf('.') +
  1604. 1) >
  1605. 2)
  1606. ) {
  1607. this.$message({
  1608. message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1609. type: 'warning',
  1610. })
  1611. return
  1612. }
  1613. }
  1614. //热损伤
  1615. if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
  1616. if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
  1617. this.$message({
  1618. message: '热损伤(%)非数字!',
  1619. type: 'warning',
  1620. })
  1621. return
  1622. }
  1623. if (
  1624. this.deptBudgetList.warehouseInOutDetail.jiaorenli < 1 ||
  1625. this.deptBudgetList.warehouseInOutDetail.jiaorenli > 40 ||
  1626. (String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).indexOf(
  1627. '.'
  1628. ) != -1 &&
  1629. String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).length -
  1630. (String(
  1631. this.deptBudgetList.warehouseInOutDetail.jiaorenli
  1632. ).indexOf('.') +
  1633. 1) >
  1634. 2)
  1635. ) {
  1636. this.$message({
  1637. message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1638. type: 'warning',
  1639. })
  1640. return
  1641. }
  1642. }
  1643. //不完善粒(%)
  1644. if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
  1645. if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
  1646. this.$message({
  1647. message: '不完善粒(%)非数字!',
  1648. type: 'warning',
  1649. })
  1650. return
  1651. }
  1652. if (
  1653. this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 1 ||
  1654. this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
  1655. (String(
  1656. this.deptBudgetList.warehouseInOutDetail.imperfectGrain
  1657. ).indexOf('.') != -1 &&
  1658. String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)
  1659. .length -
  1660. (String(
  1661. this.deptBudgetList.warehouseInOutDetail.imperfectGrain
  1662. ).indexOf('.') +
  1663. 1) >
  1664. 2)
  1665. ) {
  1666. this.$message({
  1667. message: '不完善粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1668. type: 'warning',
  1669. })
  1670. return
  1671. }
  1672. }
  1673. //容重
  1674. if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
  1675. if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
  1676. this.$message({
  1677. message: '容重(克/升)非数字!',
  1678. type: 'warning',
  1679. })
  1680. return
  1681. }
  1682. if (
  1683. (this.deptBudgetList.warehouseInOutDetail.bulkDensity &&
  1684. String(
  1685. this.deptBudgetList.warehouseInOutDetail.bulkDensity
  1686. ).indexOf('.') != -1 &&
  1687. String(this.deptBudgetList.warehouseInOutDetail.bulkDensity)
  1688. .length -
  1689. (String(
  1690. this.deptBudgetList.warehouseInOutDetail.bulkDensity
  1691. ).indexOf('.') +
  1692. 1) >
  1693. 2) ||
  1694. this.deptBudgetList.warehouseInOutDetail.bulkDensity > 1000 ||
  1695. this.deptBudgetList.warehouseInOutDetail.bulkDensity < 0
  1696. ) {
  1697. this.$message({
  1698. message: '容重输入错误',
  1699. type: 'warning',
  1700. })
  1701. return
  1702. }
  1703. }
  1704. console.log(this.deptBudgetList, '入库对象')
  1705. this.$confirm(`确定提交入库信息`, {
  1706. cancelButtonText: '取消',
  1707. confirmButtonText: '确定',
  1708. type: 'warning',
  1709. })
  1710. .then(() => {
  1711. this.$refs.deptBudgetList.validate((valid) => {
  1712. if (valid) {
  1713. this.deptBudgetList.compId = localStorage.getItem('ws-pf_compId')
  1714. this.deptBudgetList.secretaryWeigher =
  1715. localStorage.getItem('ws-pf_staffName')
  1716. this.deptBudgetList.inOutFlag = 2
  1717. this.deptBudgetList.pcFlag = 1
  1718. this.deptBudgetList.statusFlag = 3
  1719. this.deptBudgetList.grossWeight = (
  1720. this.deptBudgetList.grossWeight / 1000
  1721. ).toFixed(2)
  1722. this.deptBudgetList.tare = (
  1723. this.deptBudgetList.tare / 1000
  1724. ).toFixed(2)
  1725. this.deptBudgetList.netWeight = (
  1726. this.deptBudgetList.netWeight / 1000
  1727. ).toFixed(2)
  1728. if (!this.deptBudgetList.pureWeight) {
  1729. this.deptBudgetList.pureWeight = 0
  1730. }
  1731. this.deptBudgetList.pureWeight = (
  1732. this.deptBudgetList.pureWeight / 1000
  1733. ).toFixed(2)
  1734. if (!this.deptBudgetList.deductionWeight) {
  1735. this.deptBudgetList.deductionWeight = 0
  1736. }
  1737. if (!this.deptBudgetList.deductionAmount) {
  1738. this.deptBudgetList.deductionAmount = 0
  1739. }
  1740. this.deptBudgetList.deductionWeight = (
  1741. this.deptBudgetList.deductionWeight / 1000
  1742. ).toFixed(2)
  1743. this.deptBudgetList.deductionAmount = Math.round(
  1744. this.deptBudgetList.deductionAmount * 1000
  1745. )
  1746. // this.deptBudgetList.grossWeight /= 1000
  1747. // this.deptBudgetList.tare /= 1000
  1748. // this.deptBudgetList.netWeight /= 1000
  1749. // this.deptBudgetList.pureWeight /= 1000
  1750. // this.deptBudgetList.deductionAmount *= 1000
  1751. // this.deptBudgetList.deductionWeight /= 1000
  1752. addstorageputList(this.deptBudgetList)
  1753. .toPromise()
  1754. .then((response) => {
  1755. // this.deptBudgetList.grossWeight = Math.round(this.dataList.grossWeight*1000)
  1756. // this.deptBudgetList.tare = Math.round(this.dataList.tare*1000)
  1757. // this.deptBudgetList.netWeight = Math.round(this.dataList.netWeight*1000)
  1758. // this.deptBudgetList.pureWeight = Math.round(this.dataList.pureWeight*1000)
  1759. // this.deptBudgetList.deductionWeight = Math.round(this.dataList.deductionWeight*1000)
  1760. if (this.reader) {
  1761. this.reader.cancel()
  1762. }
  1763. this.$message.success('添加成功')
  1764. this.$router.push({
  1765. path: 'warehouseManagementList',
  1766. })
  1767. })
  1768. .catch((response) => {
  1769. this.deptBudgetList.grossWeight = Math.round(
  1770. this.deptBudgetList.grossWeight * 1000
  1771. )
  1772. this.deptBudgetList.tare = Math.round(
  1773. this.deptBudgetList.tare * 1000
  1774. )
  1775. this.deptBudgetList.netWeight = Math.round(
  1776. this.deptBudgetList.netWeight * 1000
  1777. )
  1778. this.deptBudgetList.pureWeight = Math.round(
  1779. this.deptBudgetList.pureWeight * 1000
  1780. )
  1781. this.deptBudgetList.deductionWeight = Math.round(
  1782. this.deptBudgetList.deductionWeight * 1000
  1783. )
  1784. })
  1785. } else {
  1786. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  1787. return false
  1788. }
  1789. })
  1790. })
  1791. .catch(() => {
  1792. return false
  1793. })
  1794. },
  1795. temporaryStorage() {
  1796. if(this.reader){
  1797. this.reader.cancel()
  1798. }
  1799. if (!this.deptBudgetList.goodsName) {
  1800. this.$message({
  1801. message: '货名不能为空',
  1802. type: 'warning',
  1803. })
  1804. return
  1805. }
  1806. if (this.information == '毛重检斤' && !this.deptBudgetList.grossWeight) {
  1807. this.$message({
  1808. message: '毛重不能为空',
  1809. type: 'warning',
  1810. })
  1811. return
  1812. }
  1813. if (
  1814. this.information == '毛重检斤' &&
  1815. (this.deptBudgetList.grossWeight < 0 ||
  1816. this.deptBudgetList.grossWeight > 2000000 ||
  1817. (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
  1818. String(this.deptBudgetList.grossWeight).length -
  1819. (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
  1820. 3))
  1821. ) {
  1822. this.$message({
  1823. message: '毛重输入错误',
  1824. type: 'warning',
  1825. })
  1826. return
  1827. }
  1828. if (this.information == '皮重检斤' && !this.deptBudgetList.tare) {
  1829. this.$message({
  1830. message: '皮重不能为空',
  1831. type: 'warning',
  1832. })
  1833. return
  1834. }
  1835. if (
  1836. this.information == '皮重检斤' &&
  1837. (this.deptBudgetList.tare < 0 ||
  1838. this.deptBudgetList.tare > 1000000 ||
  1839. (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
  1840. String(this.deptBudgetList.tare).length -
  1841. (String(this.deptBudgetList.tare).indexOf('.') + 1) >
  1842. 3))
  1843. ) {
  1844. this.$message({
  1845. message: '皮重输入错误',
  1846. type: 'warning',
  1847. })
  1848. return
  1849. }
  1850. // if (!this.deptBudgetList.deductionWeight) {
  1851. // this.$message({
  1852. // message: '扣重不能为空',
  1853. // type: 'warning',
  1854. // })
  1855. // return
  1856. // }
  1857. // if (
  1858. // this.deptBudgetList.deductionWeight < 0 ||
  1859. // this.deptBudgetList.deductionWeight > 10 ||
  1860. // (String(this.deptBudgetList.deductionWeight).indexOf('.') != -1 &&
  1861. // String(this.deptBudgetList.deductionWeight).length -
  1862. // (String(this.deptBudgetList.deductionWeight).indexOf('.') + 1) >
  1863. // 3)
  1864. // ) {
  1865. // this.$message({
  1866. // message: '扣重输入错误',
  1867. // type: 'warning',
  1868. // })
  1869. // return
  1870. // }
  1871. // if (
  1872. // this.deptBudgetList.type == '潮粮' &&
  1873. // !this.deptBudgetList.buckleWeightRatio
  1874. // ) {
  1875. // this.$message({
  1876. // message: '扣重比不能为空',
  1877. // type: 'warning',
  1878. // })
  1879. // return
  1880. // }
  1881. // if (
  1882. // (this.deptBudgetList.type == '潮粮' &&
  1883. // this.deptBudgetList.buckleWeightRatio < 0) ||
  1884. // (this.deptBudgetList.type == '潮粮' &&
  1885. // this.deptBudgetList.buckleWeightRatio > 3) ||
  1886. // (this.deptBudgetList.type == '潮粮' &&
  1887. // String(this.deptBudgetList.buckleWeightRatio).indexOf('.') != -1 &&
  1888. // String(this.deptBudgetList.buckleWeightRatio).length -
  1889. // (String(this.deptBudgetList.buckleWeightRatio).indexOf('.') + 1) >
  1890. // 2)
  1891. // ) {
  1892. // this.$message({
  1893. // message: '扣重比输入错误',
  1894. // type: 'warning',
  1895. // })
  1896. // return
  1897. // }
  1898. // if (
  1899. // this.deptBudgetList.type == '潮粮' &&
  1900. // !this.deptBudgetList.tidalGrainWater
  1901. // ) {
  1902. // this.$message({
  1903. // message: '潮粮水分不能为空',
  1904. // type: 'warning',
  1905. // })
  1906. // return
  1907. // }
  1908. // if (
  1909. // (this.deptBudgetList.type == '潮粮' &&
  1910. // this.deptBudgetList.tidalGrainWater < 1) ||
  1911. // (this.deptBudgetList.type == '潮粮' &&
  1912. // this.deptBudgetList.tidalGrainWater > 40) ||
  1913. // (this.deptBudgetList.type == '潮粮' &&
  1914. // String(this.deptBudgetList.tidalGrainWater).indexOf('.') != -1 &&
  1915. // String(this.deptBudgetList.tidalGrainWater).length -
  1916. // (String(this.deptBudgetList.tidalGrainWater).indexOf('.') + 1) >
  1917. // 2)
  1918. // ) {
  1919. // this.$message({
  1920. // message: '潮粮水分输入错误',
  1921. // type: 'warning',
  1922. // })
  1923. // return
  1924. // }
  1925. // if (
  1926. // this.deptBudgetList.type == '潮粮' &&
  1927. // !this.deptBudgetList.solidGrainWater
  1928. // ) {
  1929. // this.$message({
  1930. // message: '干粮水分不能为空',
  1931. // type: 'warning',
  1932. // })
  1933. // return
  1934. // }
  1935. // if (
  1936. // (this.deptBudgetList.type == '潮粮' &&
  1937. // this.deptBudgetList.solidGrainWater < 1) ||
  1938. // (this.deptBudgetList.type == '潮粮' &&
  1939. // this.deptBudgetList.solidGrainWater > 40) ||
  1940. // (this.deptBudgetList.type == '潮粮' &&
  1941. // String(this.deptBudgetList.solidGrainWater).indexOf('.') != -1 &&
  1942. // String(this.deptBudgetList.solidGrainWater).length -
  1943. // (String(this.deptBudgetList.solidGrainWater).indexOf('.') + 1) >
  1944. // 1)
  1945. // ) {
  1946. // this.$message({
  1947. // message: '干粮水分输入错误',
  1948. // type: 'warning',
  1949. // })
  1950. // return
  1951. // }
  1952. // if (!this.deptBudgetList.deductionAmount) {
  1953. // this.$message({
  1954. // message: '扣款不能为空',
  1955. // type: 'warning',
  1956. // })
  1957. // return
  1958. // }
  1959. // if (
  1960. // this.deptBudgetList.deductionAmount < 0 ||
  1961. // this.deptBudgetList.deductionAmount > 10000 ||
  1962. // (String(this.deptBudgetList.deductionAmount).indexOf('.') != -1 &&
  1963. // String(this.deptBudgetList.deductionAmount).length -
  1964. // (String(this.deptBudgetList.deductionAmount).indexOf('.') + 1) >
  1965. // 2)
  1966. // ) {
  1967. // this.$message({
  1968. // message: '扣款输入错误',
  1969. // type: 'warning',
  1970. // })
  1971. // return
  1972. // }
  1973. // if (!this.deptBudgetList.cost) {
  1974. // this.$message({
  1975. // message: '未获取到成本,请编辑后提交',
  1976. // type: 'warning',
  1977. // })
  1978. // return
  1979. // }
  1980. // if (
  1981. // this.deptBudgetList.cost < 0 ||
  1982. // this.deptBudgetList.cost > 20000 ||
  1983. // (String(this.deptBudgetList.cost).indexOf('.') != -1 &&
  1984. // String(this.deptBudgetList.cost).length -
  1985. // (String(this.deptBudgetList.cost).indexOf('.') + 1) >
  1986. // 2)
  1987. // ) {
  1988. // this.$message({
  1989. // message: '成本输入错误',
  1990. // type: 'warning',
  1991. // })
  1992. // return
  1993. // }
  1994. // if (!this.deptBudgetList.freight) {
  1995. // this.$message({
  1996. // message: '运费不能为空',
  1997. // type: 'warning',
  1998. // })
  1999. // return
  2000. // }
  2001. // if (
  2002. // this.deptBudgetList.freight < 0 ||
  2003. // this.deptBudgetList.freight > 100000 ||
  2004. // (String(this.deptBudgetList.freight).indexOf('.') != -1 &&
  2005. // String(this.deptBudgetList.freight).length -
  2006. // (String(this.deptBudgetList.freight).indexOf('.') + 1) >
  2007. // 2)
  2008. // ) {
  2009. // this.$message({
  2010. // message: '运费输入错误',
  2011. // type: 'warning',
  2012. // })
  2013. // return
  2014. // }
  2015. // if (!this.deptBudgetList.agent) {
  2016. // this.$message({
  2017. // message: '经办人不能为空',
  2018. // type: 'warning',
  2019. // })
  2020. // return
  2021. // }
  2022. // if (
  2023. // this.deptBudgetList.agent.length < 2 ||
  2024. // this.deptBudgetList.agent.length > 10
  2025. // ) {
  2026. // this.$message({
  2027. // message: '经办人输入有误',
  2028. // type: 'warning',
  2029. // })
  2030. // return
  2031. // }
  2032. // if (!this.deptBudgetList.carNo) {
  2033. // this.$message({
  2034. // message: '车牌号不能为空',
  2035. // type: 'warning'
  2036. // })
  2037. // return
  2038. // }
  2039. // if (this.deptBudgetList.carNo.length > 7) {
  2040. // this.$message({
  2041. // message: '车牌号输入错误,请输入7个字符之内',
  2042. // type: 'warning'
  2043. // })
  2044. // return
  2045. // }
  2046. if (!this.deptBudgetList.contractNo) {
  2047. this.$message({
  2048. message: '合同编号不能为空',
  2049. type: 'warning',
  2050. })
  2051. return
  2052. }
  2053. // if (
  2054. // this.deptBudgetList.contractNo.length < 6 ||
  2055. // this.deptBudgetList.contractNo.length > 20
  2056. // ) {
  2057. // this.$message({
  2058. // message: '合同编号长度不符合要求,请输入6-20个字符之内',
  2059. // type: 'warning',
  2060. // })
  2061. // return
  2062. // }
  2063. // if (this.deptBudgetList.netWeight > this.$route.query.capacity) {
  2064. // this.$message({
  2065. // message: '入库量大于该仓库容量!',
  2066. // type: 'warning',
  2067. // })
  2068. // return
  2069. // }
  2070. //自检员
  2071. if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
  2072. if (
  2073. this.deptBudgetList.warehouseInOutDetail.qualityInspector.length <
  2074. 2 ||
  2075. this.deptBudgetList.warehouseInOutDetail.qualityInspector.length > 10
  2076. ) {
  2077. this.$message({
  2078. message: '质检员姓名长度错误!',
  2079. type: 'warning',
  2080. })
  2081. return
  2082. }
  2083. }
  2084. if (this.deptBudgetList.warehouseInOutDetail.waterContent) {
  2085. if (isNaN(this.deptBudgetList.warehouseInOutDetail.waterContent)) {
  2086. this.$message({
  2087. message: '水分(%)非数字!',
  2088. type: 'warning',
  2089. })
  2090. return
  2091. }
  2092. if (
  2093. this.deptBudgetList.warehouseInOutDetail.waterContent < 1 ||
  2094. this.deptBudgetList.warehouseInOutDetail.waterContent > 40 ||
  2095. (String(
  2096. this.deptBudgetList.warehouseInOutDetail.waterContent
  2097. ).indexOf('.') != -1 &&
  2098. String(this.deptBudgetList.warehouseInOutDetail.waterContent)
  2099. .length -
  2100. (String(
  2101. this.deptBudgetList.warehouseInOutDetail.waterContent
  2102. ).indexOf('.') +
  2103. 1) >
  2104. 2)
  2105. ) {
  2106. this.$message({
  2107. message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
  2108. type: 'warning',
  2109. })
  2110. return
  2111. }
  2112. }
  2113. //杂质
  2114. if (this.deptBudgetList.warehouseInOutDetail.impurity) {
  2115. if (isNaN(this.deptBudgetList.warehouseInOutDetail.impurity)) {
  2116. this.$message({
  2117. message: '杂质(%)非数字!',
  2118. type: 'warning',
  2119. })
  2120. return
  2121. }
  2122. if (
  2123. this.deptBudgetList.warehouseInOutDetail.impurity < 1 ||
  2124. this.deptBudgetList.warehouseInOutDetail.impurity > 40 ||
  2125. (String(this.deptBudgetList.warehouseInOutDetail.impurity).indexOf(
  2126. '.'
  2127. ) != -1 &&
  2128. String(this.deptBudgetList.warehouseInOutDetail.impurity).length -
  2129. (String(
  2130. this.deptBudgetList.warehouseInOutDetail.impurity
  2131. ).indexOf('.') +
  2132. 1) >
  2133. 2)
  2134. ) {
  2135. this.$message({
  2136. message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
  2137. type: 'warning',
  2138. })
  2139. return
  2140. }
  2141. }
  2142. //霉变
  2143. if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
  2144. if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
  2145. this.$message({
  2146. message: '霉变粒(%)非数字!',
  2147. type: 'warning',
  2148. })
  2149. return
  2150. }
  2151. if (
  2152. this.deptBudgetList.warehouseInOutDetail.mildewGrain < 1 ||
  2153. this.deptBudgetList.warehouseInOutDetail.mildewGrain > 40 ||
  2154. (String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
  2155. '.'
  2156. ) != -1 &&
  2157. String(this.deptBudgetList.warehouseInOutDetail.mildewGrain)
  2158. .length -
  2159. (String(
  2160. this.deptBudgetList.warehouseInOutDetail.mildewGrain
  2161. ).indexOf('.') +
  2162. 1) >
  2163. 2)
  2164. ) {
  2165. this.$message({
  2166. message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
  2167. type: 'warning',
  2168. })
  2169. return
  2170. }
  2171. }
  2172. //热损伤
  2173. if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
  2174. if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
  2175. this.$message({
  2176. message: '热损伤(%)非数字!',
  2177. type: 'warning',
  2178. })
  2179. return
  2180. }
  2181. if (
  2182. this.deptBudgetList.warehouseInOutDetail.jiaorenli < 1 ||
  2183. this.deptBudgetList.warehouseInOutDetail.jiaorenli > 40 ||
  2184. (String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).indexOf(
  2185. '.'
  2186. ) != -1 &&
  2187. String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).length -
  2188. (String(
  2189. this.deptBudgetList.warehouseInOutDetail.jiaorenli
  2190. ).indexOf('.') +
  2191. 1) >
  2192. 2)
  2193. ) {
  2194. this.$message({
  2195. message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
  2196. type: 'warning',
  2197. })
  2198. return
  2199. }
  2200. }
  2201. //不完善粒(%)
  2202. if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
  2203. if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
  2204. this.$message({
  2205. message: '不完善粒(%)非数字!',
  2206. type: 'warning',
  2207. })
  2208. return
  2209. }
  2210. if (
  2211. this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 1 ||
  2212. this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
  2213. (String(
  2214. this.deptBudgetList.warehouseInOutDetail.imperfectGrain
  2215. ).indexOf('.') != -1 &&
  2216. String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)
  2217. .length -
  2218. (String(
  2219. this.deptBudgetList.warehouseInOutDetail.imperfectGrain
  2220. ).indexOf('.') +
  2221. 1) >
  2222. 2)
  2223. ) {
  2224. this.$message({
  2225. message: '不完善粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
  2226. type: 'warning',
  2227. })
  2228. return
  2229. }
  2230. }
  2231. //容重
  2232. if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
  2233. if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
  2234. this.$message({
  2235. message: '容重(克/升)非数字!',
  2236. type: 'warning',
  2237. })
  2238. return
  2239. }
  2240. if (
  2241. (this.deptBudgetList.warehouseInOutDetail.bulkDensity &&
  2242. String(
  2243. this.deptBudgetList.warehouseInOutDetail.bulkDensity
  2244. ).indexOf('.') != -1 &&
  2245. String(this.deptBudgetList.warehouseInOutDetail.bulkDensity)
  2246. .length -
  2247. (String(
  2248. this.deptBudgetList.warehouseInOutDetail.bulkDensity
  2249. ).indexOf('.') +
  2250. 1) >
  2251. 2) ||
  2252. this.deptBudgetList.warehouseInOutDetail.bulkDensity > 1000 ||
  2253. this.deptBudgetList.warehouseInOutDetail.bulkDensity < 0
  2254. ) {
  2255. this.$message({
  2256. message: '容重输入错误',
  2257. type: 'warning',
  2258. })
  2259. return
  2260. }
  2261. }
  2262. this.$confirm(`是否保存毛重检斤`, {
  2263. cancelButtonText: '取消',
  2264. confirmButtonText: '确定',
  2265. type: 'warning',
  2266. })
  2267. .then(() => {
  2268. this.$refs.deptBudgetList.validate((valid) => {
  2269. if (valid) {
  2270. this.deptBudgetList.compId = localStorage.getItem('ws-pf_compId')
  2271. this.deptBudgetList.secretaryWeigher =
  2272. localStorage.getItem('ws-pf_staffName')
  2273. this.deptBudgetList.inOutFlag = 2
  2274. this.deptBudgetList.statusFlag = 1
  2275. let _data = JSON.parse(
  2276. localStorage.getItem('winseaview-userInfo')
  2277. )
  2278. this.deptBudgetList.backOffice =
  2279. _data.content.showCompName + '-' + _data.content.staffName
  2280. this.deptBudgetList.grossWeight /= 1000
  2281. this.deptBudgetList.tare /= 1000
  2282. this.deptBudgetList.netWeight /= 1000
  2283. this.deptBudgetList.pureWeight /= 1000
  2284. this.deptBudgetList.deductionAmount *= 1000
  2285. this.deptBudgetList.deductionWeight /= 1000
  2286. addstorageputList(this.deptBudgetList)
  2287. .toPromise()
  2288. .then((response) => {
  2289. if (this.reader) {
  2290. this.reader.cancel()
  2291. }
  2292. this.$message.success('保存成功')
  2293. this.$router.push({
  2294. path: 'warehouseManagementList',
  2295. })
  2296. })
  2297. } else {
  2298. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  2299. return false
  2300. }
  2301. })
  2302. })
  2303. .catch(() => {
  2304. return false
  2305. })
  2306. },
  2307. tarechange(e) {
  2308. if (
  2309. this.deptBudgetList.grossWeight &&
  2310. this.deptBudgetList.tare &&
  2311. (this.deptBudgetList.deductionWeight ||
  2312. this.deptBudgetList.deductionWeight == 0)
  2313. ) {
  2314. this.deptBudgetList.netWeight = Number(
  2315. this.deptBudgetList.grossWeight -
  2316. this.deptBudgetList.tare -
  2317. this.deptBudgetList.deductionWeight
  2318. ).toFixed(2)
  2319. }
  2320. },
  2321. grossWeightchange(e) {
  2322. if (
  2323. this.deptBudgetList.grossWeight &&
  2324. this.deptBudgetList.tare &&
  2325. (this.deptBudgetList.deductionWeight ||
  2326. this.deptBudgetList.deductionWeight == 0)
  2327. ) {
  2328. this.deptBudgetList.netWeight = Number(
  2329. this.deptBudgetList.grossWeight -
  2330. this.deptBudgetList.tare -
  2331. this.deptBudgetList.deductionWeight
  2332. ).toFixed(2)
  2333. }
  2334. },
  2335. contractNoChange(e) {
  2336. for (let i = 0; i < this.deptBudgetList1.length; i++) {
  2337. console.log(this.deptBudgetList1[i])
  2338. if (this.deptBudgetList1[i].inOutTaskNo == e) {
  2339. var data = this.deptBudgetList1[i]
  2340. if (this.deptBudgetList1[i].contractNo) {
  2341. this.deptBudgetList.contractNo = this.deptBudgetList1[i].contractNo
  2342. } else {
  2343. this.deptBudgetList.contractNo = this.deptBudgetList1[i].moveTaskNo
  2344. }
  2345. }
  2346. }
  2347. for (var i = 0; i < this.outContractNo.length; i++) {
  2348. if (
  2349. this.outContractNo[i].contractNo == this.deptBudgetList.contractNo
  2350. ) {
  2351. this.deptBudgetList.goodsName = this.outContractNo[i].goodsName
  2352. this.deptBudgetList.goodsNameKey = this.outContractNo[i].goodsNameKey
  2353. this.deptBudgetList.grade = this.outContractNo[i].grade
  2354. if (this.outContractNo[i].inOutType == '采购入库') {
  2355. this.deptBudgetList.tips =
  2356. '卖方' +
  2357. this.outContractNo[i].seller +
  2358. '( ' +
  2359. this.outContractNo[i].unitContractPrice +
  2360. '元/吨)'
  2361. this.deptBudgetList.inOutTypeKey = 1
  2362. } else if (this.outContractNo[i].inOutType == '移库入库') {
  2363. this.deptBudgetList.goodsName = data.goodsName
  2364. this.deptBudgetList.goodsNameKey = data.goodsNameKey
  2365. this.deptBudgetList.grade = data.grade
  2366. if (this.outContractNo[i].unitContractPrice) {
  2367. this.deptBudgetList.tips =
  2368. '出货库' +
  2369. data.sendWarehouse +
  2370. ' (' +
  2371. this.outContractNo[i].unitContractPrice +
  2372. '元/吨)'
  2373. } else {
  2374. this.deptBudgetList.tips = '出货库' + data.sendWarehouse
  2375. }
  2376. this.deptBudgetList.inOutTypeKey = 3
  2377. } else if (this.outContractNo[i].inOutType == '移库出库') {
  2378. this.deptBudgetList.tips = '入货库' + data.receiveWarehouse
  2379. } else if (this.outContractNo[i].inOutType == '暂存入库') {
  2380. this.deptBudgetList.inOutTypeKey = 4
  2381. } else if (this.outContractNo[i].inOutType == '贸易服务入库') {
  2382. this.deptBudgetList.inOutTypeKey = 5
  2383. } else if (this.outContractNo[i].inOutType == '退库') {
  2384. if (this.outContractNo[i].contractNo) {
  2385. this.deptBudgetList.tips = '买方' + this.outContractNo[i].buyer
  2386. } else {
  2387. this.deptBudgetList.tips = '出货库' + data.sendWarehouse
  2388. }
  2389. this.deptBudgetList.inOutTypeKey = 6
  2390. }
  2391. console.log(this.outContractNo[i])
  2392. // this.deptBudgetList.cost = this.outContractNo[i].contractPrice
  2393. this.cost = this.outContractNo[i].contractPrice
  2394. if (this.cost) {
  2395. this.isGetCost = true
  2396. this.deptBudgetList.cost =
  2397. this.cost - this.deptBudgetList.deductionAmount
  2398. } else {
  2399. this.isGetCost = false
  2400. this.deptBudgetList.cost = this.deptBudgetList.cost
  2401. }
  2402. this.deptBudgetList.inOutType = this.outContractNo[i].inOutType
  2403. if (this.outContractNo[i].inOutType == '移库入库') {
  2404. this.isSelectType = false
  2405. } else {
  2406. this.isSelectType = true
  2407. }
  2408. if (this.outContractNo[i].deliverType == '1') {
  2409. this.carstatus = true
  2410. } else {
  2411. this.carstatus = false
  2412. }
  2413. if (this.outContractNo[i].tranCarInfoList) {
  2414. this.options2 = this.outContractNo[i].tranCarInfoList
  2415. this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
  2416. // this.carstatus = true
  2417. }
  2418. }
  2419. }
  2420. },
  2421. contractNoChange1(e) {
  2422. for (var i = 0; i < this.outContractNo.length; i++) {
  2423. if (this.outContractNo[i].contractNo == e) {
  2424. console.log(this.outContractNo[i])
  2425. if (this.outContractNo[i].inOutType == '采购入库') {
  2426. this.deptBudgetList.inOutTypeKey = 1
  2427. } else if (this.outContractNo[i].inOutType == '移库入库') {
  2428. this.deptBudgetList.inOutTypeKey = 3
  2429. } else if (this.outContractNo[i].inOutType == '暂存入库') {
  2430. this.deptBudgetList.inOutTypeKey = 4
  2431. } else if (this.outContractNo[i].inOutType == '贸易服务入库') {
  2432. this.deptBudgetList.inOutTypeKey = 5
  2433. } else if (this.outContractNo[i].inOutType == '退库') {
  2434. this.deptBudgetList.inOutTypeKey = 6
  2435. }
  2436. this.deptBudgetList.goodsName = this.outContractNo[i].goodsName
  2437. this.deptBudgetList.goodsNameKey = this.outContractNo[i].goodsNameKey
  2438. this.deptBudgetList.grade = this.outContractNo[i].grade
  2439. // this.deptBudgetList.cost = this.outContractNo[i].contractPrice
  2440. this.cost = this.outContractNo[i].contractPrice
  2441. if (this.cost) {
  2442. this.isGetCost = true
  2443. this.deptBudgetList.cost =
  2444. this.cost - this.deptBudgetList.deductionAmount
  2445. } else {
  2446. this.isGetCost = false
  2447. this.deptBudgetList.cost = this.deptBudgetList.cost
  2448. }
  2449. this.deptBudgetList.inOutType = this.outContractNo[i].inOutType
  2450. if (this.outContractNo[i].inOutType == '移库入库') {
  2451. this.isSelectType = false
  2452. } else {
  2453. this.isSelectType = true
  2454. }
  2455. if(this.outContractNo[i].priceType=='随行就市'){
  2456. this.isGetCost = false
  2457. this.deptBudgetList.cost = this.deptBudgetList.cost
  2458. }else{
  2459. this.isGetCost = true
  2460. }
  2461. if (this.outContractNo[i].deliverType == '1') {
  2462. this.carstatus = true
  2463. } else {
  2464. this.carstatus = false
  2465. }
  2466. if (this.outContractNo[i].tranCarInfoList) {
  2467. this.options2 = this.outContractNo[i].tranCarInfoList
  2468. this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
  2469. this.carstatus = true
  2470. }
  2471. }
  2472. }
  2473. },
  2474. typeChange(e) {},
  2475. pureweight(status) {
  2476. console.log(this.deptBudgetList)
  2477. if (
  2478. this.deptBudgetList.netWeight &&
  2479. this.deptBudgetList.tidalGrainWater &&
  2480. this.deptBudgetList.solidGrainWater &&
  2481. this.deptBudgetList.buckleWeightRatio
  2482. ) {
  2483. this.deptBudgetList.pureWeight =
  2484. (this.deptBudgetList.netWeight *
  2485. (100 -
  2486. (this.deptBudgetList.tidalGrainWater -
  2487. this.deptBudgetList.solidGrainWater) *
  2488. this.deptBudgetList.buckleWeightRatio)) /
  2489. 100
  2490. }
  2491. },
  2492. selectgoodsName(e) {
  2493. for (var i = 0; i < this.goodnameList.length; i++) {
  2494. if (this.goodnameList[i].constValue == e) {
  2495. this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
  2496. if (e == '玉米(潮粮)') {
  2497. this.deptBudgetList.type = '潮粮'
  2498. } else {
  2499. this.deptBudgetList.type = '干粮'
  2500. }
  2501. }
  2502. }
  2503. },
  2504. selectpackingMethod(e) {
  2505. for (var i = 0; i < this.packtypeList.length; i++) {
  2506. if (this.packtypeList[i].constValue == e) {
  2507. this.deptBudgetList.packingMethodKey = this.packtypeList[i].constKey
  2508. }
  2509. }
  2510. },
  2511. selectstorageType(e) {
  2512. for (var i = 0; i < this.storageType.length; i++) {
  2513. if (this.storageType[i].constValue == e) {
  2514. this.deptBudgetList.inOutTypeKey = this.storageType[i].constKey
  2515. }
  2516. }
  2517. },
  2518. handleClose() {
  2519. this.accessoryTFs = false
  2520. },
  2521. handleSizeChange(val) {
  2522. console.log(`每页 ${val} 条`)
  2523. this.pageSize = val
  2524. this.getList()
  2525. },
  2526. handleCurrentChange(val) {
  2527. this.currentPage = val
  2528. console.log(`当前页: ${val}`)
  2529. this.getList()
  2530. },
  2531. getList() {
  2532. // 货名
  2533. pullDown({
  2534. constId: 'CON2',
  2535. })
  2536. .toPromise()
  2537. .then((response) => {
  2538. this.goodnameList = response
  2539. })
  2540. // 品级
  2541. pullDown({
  2542. constId: 'CON3',
  2543. })
  2544. .toPromise()
  2545. .then((response) => {
  2546. this.gradeList = response
  2547. })
  2548. // 类型
  2549. if (this.deptBudgetList.warehouseType == '1') {
  2550. this.storageType = []
  2551. pullDown({
  2552. constId: 'CON5',
  2553. })
  2554. .toPromise()
  2555. .then((response) => {
  2556. // this.storageType = response
  2557. for (let i = 0; i < response.length; i++) {
  2558. if (
  2559. response[i].constValue == '移库入库' ||
  2560. response[i].constValue == '退库'
  2561. ) {
  2562. this.storageType.push(response[i])
  2563. }
  2564. }
  2565. })
  2566. } else if (this.deptBudgetList.warehouseType == '2') {
  2567. pullDown({
  2568. constId: 'WARE1',
  2569. })
  2570. .toPromise()
  2571. .then((response) => {
  2572. this.storageType = response
  2573. })
  2574. pullDown({
  2575. constId: 'WARE2',
  2576. })
  2577. .toPromise()
  2578. .then((response) => {
  2579. this.deliveryType = response
  2580. })
  2581. }
  2582. //合同编号
  2583. xialaNo({
  2584. compId: localStorage.getItem('ws-pf_compId'),
  2585. flag: 7,
  2586. })
  2587. .toPromise()
  2588. .then((response) => {
  2589. this.options1 = response
  2590. this.outContractNo = response
  2591. })
  2592. //经办人
  2593. getstaff({
  2594. compId: localStorage.getItem('ws-pf_compId'),
  2595. warehouseId: this.deptBudgetList.baseId,
  2596. })
  2597. .toPromise()
  2598. .then((response) => {
  2599. this.options = response
  2600. this.qualityInspectorList = response
  2601. this.staffList = response
  2602. // this.agent = response
  2603. })
  2604. },
  2605. selecttaskType(e) {
  2606. for (var i = 0; i < this.taskTypeList.length; i++) {
  2607. if (this.taskTypeList[i].value == e) {
  2608. this.searchType = this.taskTypeList[i].type
  2609. }
  2610. }
  2611. },
  2612. fujian(row) {
  2613. if (
  2614. row.receiveAttachmentPath === null ||
  2615. row.receiveAttachmentPath === ''
  2616. ) {
  2617. EventBus.$emit(
  2618. 'warning',
  2619. this.$t('system.noticeCircular.NoInformation')
  2620. )
  2621. } else {
  2622. this.accessoryTFs = true
  2623. }
  2624. this.appendixIdss = row.receiveAttachmentPath
  2625. },
  2626. handleExamine(row) {
  2627. this.$router.push({
  2628. name: 'salesContractExamine',
  2629. query: {
  2630. id: row.id,
  2631. },
  2632. })
  2633. },
  2634. },
  2635. }
  2636. </script>
  2637. <style lang="scss" scoped>
  2638. /deep/.basicInformation {
  2639. .ws-info-table {
  2640. border: none;
  2641. }
  2642. .el-form-item {
  2643. width: 33.3333%;
  2644. border: none;
  2645. .el-form-item__label {
  2646. background: transparent;
  2647. border: none;
  2648. }
  2649. .el-form-item__content {
  2650. border: none;
  2651. }
  2652. }
  2653. }
  2654. .title {
  2655. position: relative;
  2656. padding-left: 10px;
  2657. }
  2658. .title::before {
  2659. content: '';
  2660. display: inline-block;
  2661. width: 5px;
  2662. height: 30px;
  2663. background: #5473e8;
  2664. position: absolute;
  2665. left: 0;
  2666. }
  2667. .el-form {
  2668. padding: 0 10%;
  2669. }
  2670. .el-button--primary {
  2671. background-color: #5878e8;
  2672. border-color: #5878e8;
  2673. }
  2674. .el-col {
  2675. background: #f6f7fc;
  2676. }
  2677. .bg-right {
  2678. text-align: right;
  2679. padding: 16px 20px;
  2680. }
  2681. .center {
  2682. position: relative;
  2683. top: 50px;
  2684. width: 40%;
  2685. height: 2000px;
  2686. margin: 0 auto;
  2687. }
  2688. //选填
  2689. /deep/.el-form-item {
  2690. width: 50%;
  2691. }
  2692. .container {
  2693. overflow: scroll;
  2694. height: 120vh;
  2695. }
  2696. /deep/.ws-info-table .el-form-item .el-form-item__label {
  2697. text-align: center;
  2698. }
  2699. .deliverydate {
  2700. display: inline-block;
  2701. width: 10%;
  2702. }
  2703. .center {
  2704. margin-top: -60px;
  2705. width: 80%;
  2706. }
  2707. //仓位
  2708. .position {
  2709. background: #afb5cb;
  2710. border-radius: 2px;
  2711. font-size: 12px;
  2712. color: #ffffff;
  2713. line-height: 20px;
  2714. display: inline-grid;
  2715. padding: 2px 4px;
  2716. }
  2717. //表格文字
  2718. /deep/.ws-info-table .el-form-item .el-form-item__label {
  2719. text-align: left;
  2720. font-size: 14px;
  2721. font-family: PingFangSC-Regular, PingFang SC;
  2722. font-weight: 400;
  2723. color: #8890b1;
  2724. line-height: 16px;
  2725. }
  2726. .inspector {
  2727. width: 50%;
  2728. }
  2729. //质检员
  2730. .inspector .el-form-item__content {
  2731. text-align: left;
  2732. margin-left: 0px;
  2733. }
  2734. .small-title {
  2735. position: relative;
  2736. padding: 10px;
  2737. font-weight: 600;
  2738. }
  2739. .small-title::before {
  2740. position: absolute;
  2741. content: '';
  2742. display: block;
  2743. background: #5473e8;
  2744. width: 4px;
  2745. height: 14px;
  2746. left: 0px;
  2747. top: 13px;
  2748. padding: 4px 2px;
  2749. }
  2750. .top {
  2751. background: black;
  2752. color: #2aff7c;
  2753. font-size: 32px;
  2754. text-align: right;
  2755. padding: 20px;
  2756. border-radius: 10px;
  2757. margin: 0 20px 20px 20px;
  2758. .car-type {
  2759. text-align: left;
  2760. }
  2761. .kg-style {
  2762. font-size: 30px;
  2763. }
  2764. }
  2765. .weight {
  2766. font-size: 68px;
  2767. }
  2768. //下面列表
  2769. .neifor {
  2770. width: 80%;
  2771. background-color: #f6f7fc;
  2772. }
  2773. /deep/.neifor .ws-info-table .el-form-item .el-form-item__label {
  2774. width: 35%;
  2775. text-align: center;
  2776. }
  2777. /deep/.neifor .ws-info-table .el-form-item .el-form-item__content {
  2778. width: 60%;
  2779. background-color: #f6f7fc;
  2780. }
  2781. /deep/.neifor .el-input--small .el-input__inner {
  2782. width: 100%;
  2783. }
  2784. </style>