warehouseManagementGross.vue 87 KB

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