warehouseManagementGross.vue 86 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790
  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. },
  896. methods: {
  897. async closePort() {
  898. console.log('closePort')
  899. this.reader.cancel()
  900. },
  901. async openPort() {
  902. console.log('openPort', navigator)
  903. if ('serial' in navigator) {
  904. // The Web Serial API is supported.
  905. console.log('the Web Serial API is supported.')
  906. console.log(this.param)
  907. const port = await navigator.serial.requestPort()
  908. await port.open({
  909. baudRate: this.param,
  910. }) // set baud rate
  911. this.reader = port.readable.getReader()
  912. // 监听来自串行设备的数据
  913. while (true) {
  914. const { value, done } = await this.reader.read()
  915. // console.log("value",value);
  916. if (done) {
  917. // 允许稍后关闭串口。
  918. this.reader.releaseLock()
  919. break
  920. }
  921. var result = ''
  922. //2。获取16进制字符串
  923. // var receData = HexConvert.ByteToString(value);
  924. // console.log("receData",receData);
  925. var flag = false
  926. var flag1 = false
  927. // for (var i = 0; i < value.length; i++) {
  928. // var tmp = String.fromCharCode(value[i])
  929. // if (tmp == '+') {
  930. // flag = true
  931. // }
  932. // if (flag && result.length < 6 && tmp != '+') {
  933. // result += tmp
  934. // }
  935. // }
  936. // if (this.information != '毛重检斤') {
  937. // if(parseInt(result)){
  938. // this.deptBudgetList.grossWeight = parseInt(result)
  939. // }
  940. // } else {
  941. // if(parseInt(result)){
  942. // this.deptBudgetList.tare = parseInt(result)
  943. // }
  944. // }
  945. console.log('value:', value)
  946. if (
  947. this.deptBudgetList.warehouseName &&
  948. (this.deptBudgetList.warehouseName == '山东诸城迈饶库' ||
  949. this.deptBudgetList.warehouseName == '克东千红库' ||
  950. this.deptBudgetList.warehouseName == '鲅鱼圈祥腾库' ||
  951. this.deptBudgetList.warehouseName == '哈尔滨依兰库')
  952. ) {
  953. for (var i = 0; i < value.length; i++) {
  954. var tmp = String.fromCharCode(value[i])
  955. if (tmp == '+') {
  956. flag = true
  957. }
  958. if (flag && result.length < 6 && tmp != '+') {
  959. result += tmp
  960. }
  961. }
  962. if (this.information == '毛重检斤') {
  963. if (parseInt(result) || parseInt(result) == 0) {
  964. this.deptBudgetList.grossWeight = parseInt(result)
  965. }
  966. } else {
  967. if (parseInt(result) || parseInt(result) == 0) {
  968. this.deptBudgetList.tare = parseInt(result)
  969. }
  970. }
  971. } else if (
  972. this.deptBudgetList.warehouseName &&
  973. (this.deptBudgetList.warehouseName == '顺诚粮库' ||
  974. this.deptBudgetList.warehouseName == '鲅鱼圈金信库')
  975. ) {
  976. for (var i = value.length - 1; i >= 0; i--) {
  977. var tmp = String.fromCharCode(value[i])
  978. console.log(tmp)
  979. if (String.fromCharCode(value[0]) == '.') {
  980. flag = true
  981. }
  982. if (flag && result.length < 9 && tmp != '=' && tmp != '.') {
  983. result += tmp
  984. }
  985. }
  986. if (this.information == '毛重检斤') {
  987. if (parseInt(result) || parseInt(result) == 0) {
  988. this.deptBudgetList.grossWeight = parseInt(result)
  989. }
  990. } else {
  991. if (parseInt(result) || parseInt(result) == 0) {
  992. this.deptBudgetList.tare = parseInt(result)
  993. }
  994. }
  995. } else {
  996. for (var i = 0; i < value.length; i++) {
  997. var tmp = String.fromCharCode(value[i])
  998. if (value[0] != 49 && value[0] != 2) {
  999. if (
  1000. value[value.length - 1] == 48 &&
  1001. value[value.length - 2] == 48
  1002. ) {
  1003. flag1 = true
  1004. } else {
  1005. break
  1006. }
  1007. }
  1008. if (tmp == String.fromCharCode(32)) {
  1009. flag = true
  1010. }
  1011. if (
  1012. flag &&
  1013. result.length < 7 &&
  1014. tmp != String.fromCharCode(32) &&
  1015. !(
  1016. value[value.length - 1] == 48 && value[value.length - 2] == 48
  1017. )
  1018. ) {
  1019. result += tmp
  1020. }
  1021. if (flag1 && tmp != String.fromCharCode(32)) {
  1022. if (
  1023. value[value.length - 1] == 48 &&
  1024. value[value.length - 2] == 48
  1025. ) {
  1026. if (i == 0) {
  1027. this.result1 = tmp + '0'
  1028. }
  1029. }
  1030. }
  1031. }
  1032. if (this.information == '毛重检斤') {
  1033. if (parseInt(result) || parseInt(result) == 0) {
  1034. this.deptBudgetList.grossWeight = parseInt(
  1035. result + this.result1
  1036. )
  1037. }
  1038. } else {
  1039. if (parseInt(result) || parseInt(result) == 0) {
  1040. this.deptBudgetList.tare = parseInt(result + this.result1)
  1041. }
  1042. }
  1043. }
  1044. // setTimeout(1000)
  1045. // value 是一个 Uint8Array
  1046. }
  1047. await port.close()
  1048. } else {
  1049. console.log('the Web Serial API is not supported.', navigator)
  1050. }
  1051. },
  1052. qualityInspectorChange(e) {
  1053. console.log(e)
  1054. },
  1055. kkInput(val) {
  1056. console.log(val)
  1057. if (this.isGetCost) {
  1058. if (this.deptBudgetList.cost > val) {
  1059. this.deptBudgetList.cost =
  1060. this.cost - this.deptBudgetList.deductionAmount
  1061. }
  1062. }
  1063. },
  1064. uploadSuccessHandle1(res) {
  1065. this.deptBudgetList.addressUrl = res.url
  1066. console.log(this.deptBudgetList.addressUrl)
  1067. },
  1068. dataFilter1(val) {
  1069. console.log(val)
  1070. this.deptBudgetList.contractNo = val
  1071. if (val) {
  1072. //val存在
  1073. this.options1 = this.outContractNo1.filter((item) => {
  1074. if (
  1075. !!~item.contractNo.indexOf(val) ||
  1076. !!~item.contractNo.toUpperCase().indexOf(val.toUpperCase())
  1077. ) {
  1078. return true
  1079. }
  1080. })
  1081. } else {
  1082. //val为空时,还原数组
  1083. this.options1 = this.outContractNo
  1084. }
  1085. },
  1086. dataFilter2(val) {
  1087. this.deptBudgetList.carNo = val
  1088. if (val) {
  1089. //val存在
  1090. this.options1 = this.outContractNo1.filter((item) => {
  1091. if (
  1092. !!~item.carNo.indexOf(val) ||
  1093. !!~item.carNo.toUpperCase().indexOf(val.toUpperCase())
  1094. ) {
  1095. return true
  1096. }
  1097. })
  1098. } else {
  1099. //val为空时,还原数组
  1100. this.options2 = this.tranCarInfoList
  1101. }
  1102. },
  1103. editClick(status) {
  1104. this.isGetCost = false
  1105. if (status == 1) {
  1106. this.disabled1 = !this.disabled1
  1107. } else {
  1108. this.disabled2 = !this.disabled2
  1109. }
  1110. },
  1111. //返回按钮
  1112. revert() {
  1113. this.$router.push({
  1114. path: 'warehouseManagementList',
  1115. })
  1116. },
  1117. carChange(e) {
  1118. for (let i = 0; i < this.tranCarInfoList.length; i++) {
  1119. if (this.tranCarInfoList[i].carNo == this.deptBudgetList.carNo) {
  1120. this.deptBudgetList.tranCarNo = this.tranCarInfoList[i].tranCarNo
  1121. this.deptBudgetList.freight = Math.round(
  1122. this.tranCarInfoList[i].tranPrice
  1123. )
  1124. }
  1125. }
  1126. },
  1127. dataFilter(val) {
  1128. // console.log(val,"名")
  1129. this.deptBudgetList.staffList = val
  1130. if (val) {
  1131. //val存在
  1132. this.options = this.staffList.filter((item) => {
  1133. if (
  1134. !!~item.staffName.indexOf(val) ||
  1135. !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
  1136. ) {
  1137. return true
  1138. }
  1139. })
  1140. } else {
  1141. //val为空时,还原数组
  1142. this.options = this.staffList
  1143. }
  1144. },
  1145. selectstaff(e) {
  1146. for (var i = 0; i < this.staffList.length; i++) {
  1147. if (this.staffList[i].staffName == e) {
  1148. this.deptBudgetList.personChargeKey = this.staffList[i].staffId
  1149. }
  1150. }
  1151. },
  1152. //提交按钮
  1153. submit() {
  1154. if (!this.deptBudgetList.goodsName) {
  1155. this.$message({
  1156. message: '货名不能为空',
  1157. type: 'warning',
  1158. })
  1159. return
  1160. }
  1161. if (!this.deptBudgetList.grossWeight) {
  1162. this.$message({
  1163. message: '毛重不能为空',
  1164. type: 'warning',
  1165. })
  1166. return
  1167. }
  1168. if (
  1169. this.deptBudgetList.grossWeight < 100 ||
  1170. this.deptBudgetList.grossWeight > 500000 ||
  1171. (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
  1172. String(this.deptBudgetList.grossWeight).length -
  1173. (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
  1174. 3)
  1175. ) {
  1176. this.$message({
  1177. message: '毛重输入错误(单位:公斤)',
  1178. type: 'warning',
  1179. })
  1180. return
  1181. }
  1182. if (!String(this.deptBudgetList.tare)) {
  1183. this.$message({
  1184. message: '皮重不能为空',
  1185. type: 'warning',
  1186. })
  1187. return
  1188. }
  1189. if (
  1190. this.deptBudgetList.tare < 0 ||
  1191. this.deptBudgetList.tare > 5000000 ||
  1192. (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
  1193. String(this.deptBudgetList.tare).length -
  1194. (String(this.deptBudgetList.tare).indexOf('.') + 1) >
  1195. 3)
  1196. ) {
  1197. this.$message({
  1198. message: '皮重输入错误(单位:公斤)',
  1199. type: 'warning',
  1200. })
  1201. return
  1202. }
  1203. if (!String(this.deptBudgetList.deductionWeight)) {
  1204. this.$message({
  1205. message: '扣重不能为空',
  1206. type: 'warning',
  1207. })
  1208. return
  1209. }
  1210. if (
  1211. this.deptBudgetList.deductionWeight < 0 ||
  1212. this.deptBudgetList.deductionWeight > 1000 ||
  1213. (String(this.deptBudgetList.deductionWeight).indexOf('.') != -1 &&
  1214. String(this.deptBudgetList.deductionWeight).length -
  1215. (String(this.deptBudgetList.deductionWeight).indexOf('.') + 1) >
  1216. 3)
  1217. ) {
  1218. this.$message({
  1219. message: '扣重输入错误',
  1220. type: 'warning',
  1221. })
  1222. return
  1223. }
  1224. if (
  1225. this.deptBudgetList.type == '潮粮' &&
  1226. !this.deptBudgetList.buckleWeightRatio
  1227. ) {
  1228. this.$message({
  1229. message: '扣重比不能为空',
  1230. type: 'warning',
  1231. })
  1232. return
  1233. }
  1234. if (
  1235. (this.deptBudgetList.type == '潮粮' &&
  1236. this.deptBudgetList.buckleWeightRatio < 0) ||
  1237. (this.deptBudgetList.type == '潮粮' &&
  1238. this.deptBudgetList.buckleWeightRatio > 3) ||
  1239. (this.deptBudgetList.type == '潮粮' &&
  1240. String(this.deptBudgetList.buckleWeightRatio).indexOf('.') != -1 &&
  1241. String(this.deptBudgetList.buckleWeightRatio).length -
  1242. (String(this.deptBudgetList.buckleWeightRatio).indexOf('.') + 1) >
  1243. 2)
  1244. ) {
  1245. this.$message({
  1246. message: '扣重比输入错误',
  1247. type: 'warning',
  1248. })
  1249. return
  1250. }
  1251. if (
  1252. this.deptBudgetList.type == '潮粮' &&
  1253. !this.deptBudgetList.tidalGrainWater
  1254. ) {
  1255. this.$message({
  1256. message: '潮粮水分不能为空',
  1257. type: 'warning',
  1258. })
  1259. return
  1260. }
  1261. if (
  1262. (this.deptBudgetList.type == '潮粮' &&
  1263. this.deptBudgetList.tidalGrainWater < 1) ||
  1264. (this.deptBudgetList.type == '潮粮' &&
  1265. this.deptBudgetList.tidalGrainWater > 40) ||
  1266. (this.deptBudgetList.type == '潮粮' &&
  1267. String(this.deptBudgetList.tidalGrainWater).indexOf('.') != -1 &&
  1268. String(this.deptBudgetList.tidalGrainWater).length -
  1269. (String(this.deptBudgetList.tidalGrainWater).indexOf('.') + 1) >
  1270. 2)
  1271. ) {
  1272. this.$message({
  1273. message: '潮粮水分输入错误',
  1274. type: 'warning',
  1275. })
  1276. return
  1277. }
  1278. if (
  1279. this.deptBudgetList.type == '潮粮' &&
  1280. !this.deptBudgetList.solidGrainWater
  1281. ) {
  1282. this.$message({
  1283. message: '干粮水分不能为空',
  1284. type: 'warning',
  1285. })
  1286. return
  1287. }
  1288. if (
  1289. (this.deptBudgetList.type == '潮粮' &&
  1290. this.deptBudgetList.solidGrainWater < 1) ||
  1291. (this.deptBudgetList.type == '潮粮' &&
  1292. this.deptBudgetList.solidGrainWater > 40) ||
  1293. (this.deptBudgetList.type == '潮粮' &&
  1294. String(this.deptBudgetList.solidGrainWater).indexOf('.') != -1 &&
  1295. String(this.deptBudgetList.solidGrainWater).length -
  1296. (String(this.deptBudgetList.solidGrainWater).indexOf('.') + 1) >
  1297. 1)
  1298. ) {
  1299. this.$message({
  1300. message: '干粮水分输入错误',
  1301. type: 'warning',
  1302. })
  1303. return
  1304. }
  1305. if (!String(this.deptBudgetList.deductionAmount)) {
  1306. this.$message({
  1307. message: '扣款不能为空',
  1308. type: 'warning',
  1309. })
  1310. return
  1311. }
  1312. if (
  1313. this.deptBudgetList.deductionAmount < 0 ||
  1314. this.deptBudgetList.deductionAmount > 10000 ||
  1315. (String(this.deptBudgetList.deductionAmount).indexOf('.') != -1 &&
  1316. String(this.deptBudgetList.deductionAmount).length -
  1317. (String(this.deptBudgetList.deductionAmount).indexOf('.') + 1) >
  1318. 2)
  1319. ) {
  1320. this.$message({
  1321. message: '扣款输入错误',
  1322. type: 'warning',
  1323. })
  1324. return
  1325. }
  1326. if (!this.deptBudgetList.cost) {
  1327. this.$message({
  1328. message: '未获取到成本,请编辑后提交',
  1329. type: 'warning',
  1330. })
  1331. return
  1332. }
  1333. if (
  1334. this.deptBudgetList.cost < 0 ||
  1335. this.deptBudgetList.cost > 20000 ||
  1336. (String(this.deptBudgetList.cost).indexOf('.') != -1 &&
  1337. String(this.deptBudgetList.cost).length -
  1338. (String(this.deptBudgetList.cost).indexOf('.') + 1) >
  1339. 2)
  1340. ) {
  1341. this.$message({
  1342. message: '成本输入错误',
  1343. type: 'warning',
  1344. })
  1345. return
  1346. }
  1347. if (!String(this.deptBudgetList.freight)) {
  1348. this.$message({
  1349. message: '运费不能为空',
  1350. type: 'warning',
  1351. })
  1352. return
  1353. }
  1354. if (
  1355. this.deptBudgetList.freight < 0 ||
  1356. this.deptBudgetList.freight > 100000 ||
  1357. (String(this.deptBudgetList.freight).indexOf('.') != -1 &&
  1358. String(this.deptBudgetList.freight).length -
  1359. (String(this.deptBudgetList.freight).indexOf('.') + 1) >
  1360. 2)
  1361. ) {
  1362. this.$message({
  1363. message: '运费输入错误',
  1364. type: 'warning',
  1365. })
  1366. return
  1367. }
  1368. if (!this.deptBudgetList.agent) {
  1369. this.$message({
  1370. message: '经办人不能为空',
  1371. type: 'warning',
  1372. })
  1373. return
  1374. }
  1375. if (
  1376. this.deptBudgetList.agent.length < 2 ||
  1377. this.deptBudgetList.agent.length > 10
  1378. ) {
  1379. this.$message({
  1380. message: '经办人输入有误',
  1381. type: 'warning',
  1382. })
  1383. return
  1384. }
  1385. if (!this.deptBudgetList.grade) {
  1386. this.$message({
  1387. message: '品级不能为空!',
  1388. type: 'warning',
  1389. })
  1390. return
  1391. }
  1392. if (!this.deptBudgetList.inOutDate) {
  1393. this.$message({
  1394. message: '入库日期不能为空!',
  1395. type: 'warning',
  1396. })
  1397. return
  1398. }
  1399. if (!this.deptBudgetList.inOutType) {
  1400. this.$message({
  1401. message: '入库类型不能为空!',
  1402. type: 'warning',
  1403. })
  1404. return
  1405. }
  1406. if (!this.deptBudgetList.carNo) {
  1407. this.$message({
  1408. message: '车牌号不能为空',
  1409. type: 'warning',
  1410. })
  1411. return
  1412. }
  1413. if (this.deptBudgetList.carNo.length > 7) {
  1414. this.$message({
  1415. message: '车牌号输入错误,请输入7个字符之内',
  1416. type: 'warning',
  1417. })
  1418. return
  1419. }
  1420. if (this.deptBudgetList.boxNo && this.deptBudgetList.boxNo.length > 20) {
  1421. this.$message({
  1422. message: '箱号-1输入错误',
  1423. type: 'warning',
  1424. })
  1425. return
  1426. }
  1427. if (
  1428. this.deptBudgetList.boxNoOther &&
  1429. this.deptBudgetList.boxNoOther.length > 20
  1430. ) {
  1431. this.$message({
  1432. message: '箱号-2输入错误',
  1433. type: 'warning',
  1434. })
  1435. return
  1436. }
  1437. if (
  1438. this.deptBudgetList.titleNo &&
  1439. this.deptBudgetList.titleNo.length > 20
  1440. ) {
  1441. this.$message({
  1442. message: '封号-1输入错误',
  1443. type: 'warning',
  1444. })
  1445. return
  1446. }
  1447. if (
  1448. this.deptBudgetList.titleNoOther &&
  1449. this.deptBudgetList.titleNoOther.length > 20
  1450. ) {
  1451. this.$message({
  1452. message: '封号-2输入错误',
  1453. type: 'warning',
  1454. })
  1455. return
  1456. }
  1457. if (!this.deptBudgetList.contractNo) {
  1458. this.$message({
  1459. message: '合同编号不能为空',
  1460. type: 'warning',
  1461. })
  1462. return
  1463. }
  1464. // if (
  1465. // this.deptBudgetList.contractNo.length < 6 ||
  1466. // this.deptBudgetList.contractNo.length > 20
  1467. // ) {
  1468. // this.$message({
  1469. // message: '合同编号长度不符合要求,请输入6-20个字符之内',
  1470. // type: 'warning',
  1471. // })
  1472. // return
  1473. // }
  1474. // if (!this.deptBudgetList.addressUrl) {
  1475. // this.$message({
  1476. // message: '附件不能为空',
  1477. // type: 'warning',
  1478. // })
  1479. // return
  1480. // }
  1481. //自检员
  1482. if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
  1483. if (
  1484. this.deptBudgetList.warehouseInOutDetail.qualityInspector.length <
  1485. 2 ||
  1486. this.deptBudgetList.warehouseInOutDetail.qualityInspector.length > 10
  1487. ) {
  1488. this.$message({
  1489. message: '质检员姓名长度错误!',
  1490. type: 'warning',
  1491. })
  1492. return
  1493. }
  1494. }
  1495. if (this.deptBudgetList.warehouseInOutDetail.waterContent) {
  1496. if (isNaN(this.deptBudgetList.warehouseInOutDetail.waterContent)) {
  1497. this.$message({
  1498. message: '水分(%)非数字!',
  1499. type: 'warning',
  1500. })
  1501. return
  1502. }
  1503. if (
  1504. this.deptBudgetList.warehouseInOutDetail.waterContent < 1 ||
  1505. this.deptBudgetList.warehouseInOutDetail.waterContent > 40 ||
  1506. (String(
  1507. this.deptBudgetList.warehouseInOutDetail.waterContent
  1508. ).indexOf('.') != -1 &&
  1509. String(this.deptBudgetList.warehouseInOutDetail.waterContent)
  1510. .length -
  1511. (String(
  1512. this.deptBudgetList.warehouseInOutDetail.waterContent
  1513. ).indexOf('.') +
  1514. 1) >
  1515. 2)
  1516. ) {
  1517. this.$message({
  1518. message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1519. type: 'warning',
  1520. })
  1521. return
  1522. }
  1523. }
  1524. //杂质
  1525. if (this.deptBudgetList.warehouseInOutDetail.impurity) {
  1526. if (isNaN(this.deptBudgetList.warehouseInOutDetail.impurity)) {
  1527. this.$message({
  1528. message: '杂质(%)非数字!',
  1529. type: 'warning',
  1530. })
  1531. return
  1532. }
  1533. if (
  1534. this.deptBudgetList.warehouseInOutDetail.impurity < 1 ||
  1535. this.deptBudgetList.warehouseInOutDetail.impurity > 40 ||
  1536. (String(this.deptBudgetList.warehouseInOutDetail.impurity).indexOf(
  1537. '.'
  1538. ) != -1 &&
  1539. String(this.deptBudgetList.warehouseInOutDetail.impurity).length -
  1540. (String(
  1541. this.deptBudgetList.warehouseInOutDetail.impurity
  1542. ).indexOf('.') +
  1543. 1) >
  1544. 2)
  1545. ) {
  1546. this.$message({
  1547. message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1548. type: 'warning',
  1549. })
  1550. return
  1551. }
  1552. }
  1553. //霉变
  1554. if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
  1555. if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
  1556. this.$message({
  1557. message: '霉变粒(%)非数字!',
  1558. type: 'warning',
  1559. })
  1560. return
  1561. }
  1562. if (
  1563. this.deptBudgetList.warehouseInOutDetail.mildewGrain < 1 ||
  1564. this.deptBudgetList.warehouseInOutDetail.mildewGrain > 40 ||
  1565. (String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
  1566. '.'
  1567. ) != -1 &&
  1568. String(this.deptBudgetList.warehouseInOutDetail.mildewGrain)
  1569. .length -
  1570. (String(
  1571. this.deptBudgetList.warehouseInOutDetail.mildewGrain
  1572. ).indexOf('.') +
  1573. 1) >
  1574. 2)
  1575. ) {
  1576. this.$message({
  1577. message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1578. type: 'warning',
  1579. })
  1580. return
  1581. }
  1582. }
  1583. //热损伤
  1584. if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
  1585. if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
  1586. this.$message({
  1587. message: '热损伤(%)非数字!',
  1588. type: 'warning',
  1589. })
  1590. return
  1591. }
  1592. if (
  1593. this.deptBudgetList.warehouseInOutDetail.jiaorenli < 1 ||
  1594. this.deptBudgetList.warehouseInOutDetail.jiaorenli > 40 ||
  1595. (String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).indexOf(
  1596. '.'
  1597. ) != -1 &&
  1598. String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).length -
  1599. (String(
  1600. this.deptBudgetList.warehouseInOutDetail.jiaorenli
  1601. ).indexOf('.') +
  1602. 1) >
  1603. 2)
  1604. ) {
  1605. this.$message({
  1606. message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1607. type: 'warning',
  1608. })
  1609. return
  1610. }
  1611. }
  1612. //不完善粒(%)
  1613. if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
  1614. if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
  1615. this.$message({
  1616. message: '不完善粒(%)非数字!',
  1617. type: 'warning',
  1618. })
  1619. return
  1620. }
  1621. if (
  1622. this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 1 ||
  1623. this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
  1624. (String(
  1625. this.deptBudgetList.warehouseInOutDetail.imperfectGrain
  1626. ).indexOf('.') != -1 &&
  1627. String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)
  1628. .length -
  1629. (String(
  1630. this.deptBudgetList.warehouseInOutDetail.imperfectGrain
  1631. ).indexOf('.') +
  1632. 1) >
  1633. 2)
  1634. ) {
  1635. this.$message({
  1636. message: '不完善粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1637. type: 'warning',
  1638. })
  1639. return
  1640. }
  1641. }
  1642. //容重
  1643. if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
  1644. if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
  1645. this.$message({
  1646. message: '容重(克/升)非数字!',
  1647. type: 'warning',
  1648. })
  1649. return
  1650. }
  1651. if (
  1652. (this.deptBudgetList.warehouseInOutDetail.bulkDensity &&
  1653. String(
  1654. this.deptBudgetList.warehouseInOutDetail.bulkDensity
  1655. ).indexOf('.') != -1 &&
  1656. String(this.deptBudgetList.warehouseInOutDetail.bulkDensity)
  1657. .length -
  1658. (String(
  1659. this.deptBudgetList.warehouseInOutDetail.bulkDensity
  1660. ).indexOf('.') +
  1661. 1) >
  1662. 2) ||
  1663. this.deptBudgetList.warehouseInOutDetail.bulkDensity > 1000 ||
  1664. this.deptBudgetList.warehouseInOutDetail.bulkDensity < 0
  1665. ) {
  1666. this.$message({
  1667. message: '容重输入错误',
  1668. type: 'warning',
  1669. })
  1670. return
  1671. }
  1672. }
  1673. console.log(this.deptBudgetList, '入库对象')
  1674. this.$confirm(`确定提交入库信息`, {
  1675. cancelButtonText: '取消',
  1676. confirmButtonText: '确定',
  1677. type: 'warning',
  1678. })
  1679. .then(() => {
  1680. this.$refs.deptBudgetList.validate((valid) => {
  1681. if (valid) {
  1682. this.deptBudgetList.compId = localStorage.getItem('ws-pf_compId')
  1683. this.deptBudgetList.secretaryWeigher =
  1684. localStorage.getItem('ws-pf_staffName')
  1685. this.deptBudgetList.inOutFlag = 2
  1686. this.deptBudgetList.pcFlag = 1
  1687. this.deptBudgetList.statusFlag = 3
  1688. this.deptBudgetList.grossWeight = (
  1689. this.deptBudgetList.grossWeight / 1000
  1690. ).toFixed(2)
  1691. this.deptBudgetList.tare = (
  1692. this.deptBudgetList.tare / 1000
  1693. ).toFixed(2)
  1694. this.deptBudgetList.netWeight = (
  1695. this.deptBudgetList.netWeight / 1000
  1696. ).toFixed(2)
  1697. if (!this.deptBudgetList.pureWeight) {
  1698. this.deptBudgetList.pureWeight = 0
  1699. }
  1700. this.deptBudgetList.pureWeight = (
  1701. this.deptBudgetList.pureWeight / 1000
  1702. ).toFixed(2)
  1703. if (!this.deptBudgetList.deductionWeight) {
  1704. this.deptBudgetList.deductionWeight = 0
  1705. }
  1706. if (!this.deptBudgetList.deductionAmount) {
  1707. this.deptBudgetList.deductionAmount = 0
  1708. }
  1709. this.deptBudgetList.deductionWeight = (
  1710. this.deptBudgetList.deductionWeight / 1000
  1711. ).toFixed(2)
  1712. this.deptBudgetList.deductionAmount = Math.round(
  1713. this.deptBudgetList.deductionAmount * 1000
  1714. )
  1715. // this.deptBudgetList.grossWeight /= 1000
  1716. // this.deptBudgetList.tare /= 1000
  1717. // this.deptBudgetList.netWeight /= 1000
  1718. // this.deptBudgetList.pureWeight /= 1000
  1719. // this.deptBudgetList.deductionAmount *= 1000
  1720. // this.deptBudgetList.deductionWeight /= 1000
  1721. addstorageputList(this.deptBudgetList)
  1722. .toPromise()
  1723. .then((response) => {
  1724. // this.deptBudgetList.grossWeight = Math.round(this.dataList.grossWeight*1000)
  1725. // this.deptBudgetList.tare = Math.round(this.dataList.tare*1000)
  1726. // this.deptBudgetList.netWeight = Math.round(this.dataList.netWeight*1000)
  1727. // this.deptBudgetList.pureWeight = Math.round(this.dataList.pureWeight*1000)
  1728. // this.deptBudgetList.deductionWeight = Math.round(this.dataList.deductionWeight*1000)
  1729. if (this.reader) {
  1730. this.reader.cancel()
  1731. }
  1732. this.$message.success('添加成功')
  1733. this.$router.push({
  1734. path: 'warehouseManagementList',
  1735. })
  1736. })
  1737. .catch((response) => {
  1738. this.deptBudgetList.grossWeight = Math.round(
  1739. this.deptBudgetList.grossWeight * 1000
  1740. )
  1741. this.deptBudgetList.tare = Math.round(
  1742. this.deptBudgetList.tare * 1000
  1743. )
  1744. this.deptBudgetList.netWeight = Math.round(
  1745. this.deptBudgetList.netWeight * 1000
  1746. )
  1747. this.deptBudgetList.pureWeight = Math.round(
  1748. this.deptBudgetList.pureWeight * 1000
  1749. )
  1750. this.deptBudgetList.deductionWeight = Math.round(
  1751. this.deptBudgetList.deductionWeight * 1000
  1752. )
  1753. })
  1754. } else {
  1755. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  1756. return false
  1757. }
  1758. })
  1759. })
  1760. .catch(() => {
  1761. return false
  1762. })
  1763. },
  1764. temporaryStorage() {
  1765. if (!this.deptBudgetList.goodsName) {
  1766. this.$message({
  1767. message: '货名不能为空',
  1768. type: 'warning',
  1769. })
  1770. return
  1771. }
  1772. if (this.information == '毛重检斤' && !this.deptBudgetList.grossWeight) {
  1773. this.$message({
  1774. message: '毛重不能为空',
  1775. type: 'warning',
  1776. })
  1777. return
  1778. }
  1779. if (
  1780. this.information == '毛重检斤' &&
  1781. (this.deptBudgetList.grossWeight < 0 ||
  1782. this.deptBudgetList.grossWeight > 2000000 ||
  1783. (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
  1784. String(this.deptBudgetList.grossWeight).length -
  1785. (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
  1786. 3))
  1787. ) {
  1788. this.$message({
  1789. message: '毛重输入错误',
  1790. type: 'warning',
  1791. })
  1792. return
  1793. }
  1794. if (this.information == '皮重检斤' && !this.deptBudgetList.tare) {
  1795. this.$message({
  1796. message: '皮重不能为空',
  1797. type: 'warning',
  1798. })
  1799. return
  1800. }
  1801. if (
  1802. this.information == '皮重检斤' &&
  1803. (this.deptBudgetList.tare < 0 ||
  1804. this.deptBudgetList.tare > 1000000 ||
  1805. (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
  1806. String(this.deptBudgetList.tare).length -
  1807. (String(this.deptBudgetList.tare).indexOf('.') + 1) >
  1808. 3))
  1809. ) {
  1810. this.$message({
  1811. message: '皮重输入错误',
  1812. type: 'warning',
  1813. })
  1814. return
  1815. }
  1816. // if (!this.deptBudgetList.deductionWeight) {
  1817. // this.$message({
  1818. // message: '扣重不能为空',
  1819. // type: 'warning',
  1820. // })
  1821. // return
  1822. // }
  1823. // if (
  1824. // this.deptBudgetList.deductionWeight < 0 ||
  1825. // this.deptBudgetList.deductionWeight > 10 ||
  1826. // (String(this.deptBudgetList.deductionWeight).indexOf('.') != -1 &&
  1827. // String(this.deptBudgetList.deductionWeight).length -
  1828. // (String(this.deptBudgetList.deductionWeight).indexOf('.') + 1) >
  1829. // 3)
  1830. // ) {
  1831. // this.$message({
  1832. // message: '扣重输入错误',
  1833. // type: 'warning',
  1834. // })
  1835. // return
  1836. // }
  1837. // if (
  1838. // this.deptBudgetList.type == '潮粮' &&
  1839. // !this.deptBudgetList.buckleWeightRatio
  1840. // ) {
  1841. // this.$message({
  1842. // message: '扣重比不能为空',
  1843. // type: 'warning',
  1844. // })
  1845. // return
  1846. // }
  1847. // if (
  1848. // (this.deptBudgetList.type == '潮粮' &&
  1849. // this.deptBudgetList.buckleWeightRatio < 0) ||
  1850. // (this.deptBudgetList.type == '潮粮' &&
  1851. // this.deptBudgetList.buckleWeightRatio > 3) ||
  1852. // (this.deptBudgetList.type == '潮粮' &&
  1853. // String(this.deptBudgetList.buckleWeightRatio).indexOf('.') != -1 &&
  1854. // String(this.deptBudgetList.buckleWeightRatio).length -
  1855. // (String(this.deptBudgetList.buckleWeightRatio).indexOf('.') + 1) >
  1856. // 2)
  1857. // ) {
  1858. // this.$message({
  1859. // message: '扣重比输入错误',
  1860. // type: 'warning',
  1861. // })
  1862. // return
  1863. // }
  1864. // if (
  1865. // this.deptBudgetList.type == '潮粮' &&
  1866. // !this.deptBudgetList.tidalGrainWater
  1867. // ) {
  1868. // this.$message({
  1869. // message: '潮粮水分不能为空',
  1870. // type: 'warning',
  1871. // })
  1872. // return
  1873. // }
  1874. // if (
  1875. // (this.deptBudgetList.type == '潮粮' &&
  1876. // this.deptBudgetList.tidalGrainWater < 1) ||
  1877. // (this.deptBudgetList.type == '潮粮' &&
  1878. // this.deptBudgetList.tidalGrainWater > 40) ||
  1879. // (this.deptBudgetList.type == '潮粮' &&
  1880. // String(this.deptBudgetList.tidalGrainWater).indexOf('.') != -1 &&
  1881. // String(this.deptBudgetList.tidalGrainWater).length -
  1882. // (String(this.deptBudgetList.tidalGrainWater).indexOf('.') + 1) >
  1883. // 2)
  1884. // ) {
  1885. // this.$message({
  1886. // message: '潮粮水分输入错误',
  1887. // type: 'warning',
  1888. // })
  1889. // return
  1890. // }
  1891. // if (
  1892. // this.deptBudgetList.type == '潮粮' &&
  1893. // !this.deptBudgetList.solidGrainWater
  1894. // ) {
  1895. // this.$message({
  1896. // message: '干粮水分不能为空',
  1897. // type: 'warning',
  1898. // })
  1899. // return
  1900. // }
  1901. // if (
  1902. // (this.deptBudgetList.type == '潮粮' &&
  1903. // this.deptBudgetList.solidGrainWater < 1) ||
  1904. // (this.deptBudgetList.type == '潮粮' &&
  1905. // this.deptBudgetList.solidGrainWater > 40) ||
  1906. // (this.deptBudgetList.type == '潮粮' &&
  1907. // String(this.deptBudgetList.solidGrainWater).indexOf('.') != -1 &&
  1908. // String(this.deptBudgetList.solidGrainWater).length -
  1909. // (String(this.deptBudgetList.solidGrainWater).indexOf('.') + 1) >
  1910. // 1)
  1911. // ) {
  1912. // this.$message({
  1913. // message: '干粮水分输入错误',
  1914. // type: 'warning',
  1915. // })
  1916. // return
  1917. // }
  1918. // if (!this.deptBudgetList.deductionAmount) {
  1919. // this.$message({
  1920. // message: '扣款不能为空',
  1921. // type: 'warning',
  1922. // })
  1923. // return
  1924. // }
  1925. // if (
  1926. // this.deptBudgetList.deductionAmount < 0 ||
  1927. // this.deptBudgetList.deductionAmount > 10000 ||
  1928. // (String(this.deptBudgetList.deductionAmount).indexOf('.') != -1 &&
  1929. // String(this.deptBudgetList.deductionAmount).length -
  1930. // (String(this.deptBudgetList.deductionAmount).indexOf('.') + 1) >
  1931. // 2)
  1932. // ) {
  1933. // this.$message({
  1934. // message: '扣款输入错误',
  1935. // type: 'warning',
  1936. // })
  1937. // return
  1938. // }
  1939. // if (!this.deptBudgetList.cost) {
  1940. // this.$message({
  1941. // message: '未获取到成本,请编辑后提交',
  1942. // type: 'warning',
  1943. // })
  1944. // return
  1945. // }
  1946. // if (
  1947. // this.deptBudgetList.cost < 0 ||
  1948. // this.deptBudgetList.cost > 20000 ||
  1949. // (String(this.deptBudgetList.cost).indexOf('.') != -1 &&
  1950. // String(this.deptBudgetList.cost).length -
  1951. // (String(this.deptBudgetList.cost).indexOf('.') + 1) >
  1952. // 2)
  1953. // ) {
  1954. // this.$message({
  1955. // message: '成本输入错误',
  1956. // type: 'warning',
  1957. // })
  1958. // return
  1959. // }
  1960. // if (!this.deptBudgetList.freight) {
  1961. // this.$message({
  1962. // message: '运费不能为空',
  1963. // type: 'warning',
  1964. // })
  1965. // return
  1966. // }
  1967. // if (
  1968. // this.deptBudgetList.freight < 0 ||
  1969. // this.deptBudgetList.freight > 100000 ||
  1970. // (String(this.deptBudgetList.freight).indexOf('.') != -1 &&
  1971. // String(this.deptBudgetList.freight).length -
  1972. // (String(this.deptBudgetList.freight).indexOf('.') + 1) >
  1973. // 2)
  1974. // ) {
  1975. // this.$message({
  1976. // message: '运费输入错误',
  1977. // type: 'warning',
  1978. // })
  1979. // return
  1980. // }
  1981. // if (!this.deptBudgetList.agent) {
  1982. // this.$message({
  1983. // message: '经办人不能为空',
  1984. // type: 'warning',
  1985. // })
  1986. // return
  1987. // }
  1988. // if (
  1989. // this.deptBudgetList.agent.length < 2 ||
  1990. // this.deptBudgetList.agent.length > 10
  1991. // ) {
  1992. // this.$message({
  1993. // message: '经办人输入有误',
  1994. // type: 'warning',
  1995. // })
  1996. // return
  1997. // }
  1998. // if (!this.deptBudgetList.carNo) {
  1999. // this.$message({
  2000. // message: '车牌号不能为空',
  2001. // type: 'warning'
  2002. // })
  2003. // return
  2004. // }
  2005. // if (this.deptBudgetList.carNo.length > 7) {
  2006. // this.$message({
  2007. // message: '车牌号输入错误,请输入7个字符之内',
  2008. // type: 'warning'
  2009. // })
  2010. // return
  2011. // }
  2012. if (!this.deptBudgetList.contractNo) {
  2013. this.$message({
  2014. message: '合同编号不能为空',
  2015. type: 'warning',
  2016. })
  2017. return
  2018. }
  2019. // if (
  2020. // this.deptBudgetList.contractNo.length < 6 ||
  2021. // this.deptBudgetList.contractNo.length > 20
  2022. // ) {
  2023. // this.$message({
  2024. // message: '合同编号长度不符合要求,请输入6-20个字符之内',
  2025. // type: 'warning',
  2026. // })
  2027. // return
  2028. // }
  2029. // if (this.deptBudgetList.netWeight > this.$route.query.capacity) {
  2030. // this.$message({
  2031. // message: '入库量大于该仓库容量!',
  2032. // type: 'warning',
  2033. // })
  2034. // return
  2035. // }
  2036. //自检员
  2037. if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
  2038. if (
  2039. this.deptBudgetList.warehouseInOutDetail.qualityInspector.length <
  2040. 2 ||
  2041. this.deptBudgetList.warehouseInOutDetail.qualityInspector.length > 10
  2042. ) {
  2043. this.$message({
  2044. message: '质检员姓名长度错误!',
  2045. type: 'warning',
  2046. })
  2047. return
  2048. }
  2049. }
  2050. if (this.deptBudgetList.warehouseInOutDetail.waterContent) {
  2051. if (isNaN(this.deptBudgetList.warehouseInOutDetail.waterContent)) {
  2052. this.$message({
  2053. message: '水分(%)非数字!',
  2054. type: 'warning',
  2055. })
  2056. return
  2057. }
  2058. if (
  2059. this.deptBudgetList.warehouseInOutDetail.waterContent < 1 ||
  2060. this.deptBudgetList.warehouseInOutDetail.waterContent > 40 ||
  2061. (String(
  2062. this.deptBudgetList.warehouseInOutDetail.waterContent
  2063. ).indexOf('.') != -1 &&
  2064. String(this.deptBudgetList.warehouseInOutDetail.waterContent)
  2065. .length -
  2066. (String(
  2067. this.deptBudgetList.warehouseInOutDetail.waterContent
  2068. ).indexOf('.') +
  2069. 1) >
  2070. 2)
  2071. ) {
  2072. this.$message({
  2073. message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
  2074. type: 'warning',
  2075. })
  2076. return
  2077. }
  2078. }
  2079. //杂质
  2080. if (this.deptBudgetList.warehouseInOutDetail.impurity) {
  2081. if (isNaN(this.deptBudgetList.warehouseInOutDetail.impurity)) {
  2082. this.$message({
  2083. message: '杂质(%)非数字!',
  2084. type: 'warning',
  2085. })
  2086. return
  2087. }
  2088. if (
  2089. this.deptBudgetList.warehouseInOutDetail.impurity < 1 ||
  2090. this.deptBudgetList.warehouseInOutDetail.impurity > 40 ||
  2091. (String(this.deptBudgetList.warehouseInOutDetail.impurity).indexOf(
  2092. '.'
  2093. ) != -1 &&
  2094. String(this.deptBudgetList.warehouseInOutDetail.impurity).length -
  2095. (String(
  2096. this.deptBudgetList.warehouseInOutDetail.impurity
  2097. ).indexOf('.') +
  2098. 1) >
  2099. 2)
  2100. ) {
  2101. this.$message({
  2102. message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
  2103. type: 'warning',
  2104. })
  2105. return
  2106. }
  2107. }
  2108. //霉变
  2109. if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
  2110. if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
  2111. this.$message({
  2112. message: '霉变粒(%)非数字!',
  2113. type: 'warning',
  2114. })
  2115. return
  2116. }
  2117. if (
  2118. this.deptBudgetList.warehouseInOutDetail.mildewGrain < 1 ||
  2119. this.deptBudgetList.warehouseInOutDetail.mildewGrain > 40 ||
  2120. (String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
  2121. '.'
  2122. ) != -1 &&
  2123. String(this.deptBudgetList.warehouseInOutDetail.mildewGrain)
  2124. .length -
  2125. (String(
  2126. this.deptBudgetList.warehouseInOutDetail.mildewGrain
  2127. ).indexOf('.') +
  2128. 1) >
  2129. 2)
  2130. ) {
  2131. this.$message({
  2132. message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
  2133. type: 'warning',
  2134. })
  2135. return
  2136. }
  2137. }
  2138. //热损伤
  2139. if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
  2140. if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
  2141. this.$message({
  2142. message: '热损伤(%)非数字!',
  2143. type: 'warning',
  2144. })
  2145. return
  2146. }
  2147. if (
  2148. this.deptBudgetList.warehouseInOutDetail.jiaorenli < 1 ||
  2149. this.deptBudgetList.warehouseInOutDetail.jiaorenli > 40 ||
  2150. (String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).indexOf(
  2151. '.'
  2152. ) != -1 &&
  2153. String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).length -
  2154. (String(
  2155. this.deptBudgetList.warehouseInOutDetail.jiaorenli
  2156. ).indexOf('.') +
  2157. 1) >
  2158. 2)
  2159. ) {
  2160. this.$message({
  2161. message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
  2162. type: 'warning',
  2163. })
  2164. return
  2165. }
  2166. }
  2167. //不完善粒(%)
  2168. if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
  2169. if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
  2170. this.$message({
  2171. message: '不完善粒(%)非数字!',
  2172. type: 'warning',
  2173. })
  2174. return
  2175. }
  2176. if (
  2177. this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 1 ||
  2178. this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
  2179. (String(
  2180. this.deptBudgetList.warehouseInOutDetail.imperfectGrain
  2181. ).indexOf('.') != -1 &&
  2182. String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)
  2183. .length -
  2184. (String(
  2185. this.deptBudgetList.warehouseInOutDetail.imperfectGrain
  2186. ).indexOf('.') +
  2187. 1) >
  2188. 2)
  2189. ) {
  2190. this.$message({
  2191. message: '不完善粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
  2192. type: 'warning',
  2193. })
  2194. return
  2195. }
  2196. }
  2197. //容重
  2198. if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
  2199. if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
  2200. this.$message({
  2201. message: '容重(克/升)非数字!',
  2202. type: 'warning',
  2203. })
  2204. return
  2205. }
  2206. if (
  2207. (this.deptBudgetList.warehouseInOutDetail.bulkDensity &&
  2208. String(
  2209. this.deptBudgetList.warehouseInOutDetail.bulkDensity
  2210. ).indexOf('.') != -1 &&
  2211. String(this.deptBudgetList.warehouseInOutDetail.bulkDensity)
  2212. .length -
  2213. (String(
  2214. this.deptBudgetList.warehouseInOutDetail.bulkDensity
  2215. ).indexOf('.') +
  2216. 1) >
  2217. 2) ||
  2218. this.deptBudgetList.warehouseInOutDetail.bulkDensity > 1000 ||
  2219. this.deptBudgetList.warehouseInOutDetail.bulkDensity < 0
  2220. ) {
  2221. this.$message({
  2222. message: '容重输入错误',
  2223. type: 'warning',
  2224. })
  2225. return
  2226. }
  2227. }
  2228. this.$confirm(`是否保存毛重检斤`, {
  2229. cancelButtonText: '取消',
  2230. confirmButtonText: '确定',
  2231. type: 'warning',
  2232. })
  2233. .then(() => {
  2234. this.$refs.deptBudgetList.validate((valid) => {
  2235. if (valid) {
  2236. this.deptBudgetList.compId = localStorage.getItem('ws-pf_compId')
  2237. this.deptBudgetList.secretaryWeigher =
  2238. localStorage.getItem('ws-pf_staffName')
  2239. this.deptBudgetList.inOutFlag = 2
  2240. this.deptBudgetList.statusFlag = 1
  2241. let _data = JSON.parse(
  2242. localStorage.getItem('winseaview-userInfo')
  2243. )
  2244. this.deptBudgetList.backOffice =
  2245. _data.content.showCompName + '-' + _data.content.staffName
  2246. this.deptBudgetList.grossWeight /= 1000
  2247. this.deptBudgetList.tare /= 1000
  2248. this.deptBudgetList.netWeight /= 1000
  2249. this.deptBudgetList.pureWeight /= 1000
  2250. this.deptBudgetList.deductionAmount *= 1000
  2251. this.deptBudgetList.deductionWeight /= 1000
  2252. addstorageputList(this.deptBudgetList)
  2253. .toPromise()
  2254. .then((response) => {
  2255. if (this.reader) {
  2256. this.reader.cancel()
  2257. }
  2258. this.$message.success('保存成功')
  2259. this.$router.push({
  2260. path: 'warehouseManagementList',
  2261. })
  2262. })
  2263. } else {
  2264. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  2265. return false
  2266. }
  2267. })
  2268. })
  2269. .catch(() => {
  2270. return false
  2271. })
  2272. },
  2273. tarechange(e) {
  2274. if (
  2275. this.deptBudgetList.grossWeight &&
  2276. this.deptBudgetList.tare &&
  2277. (this.deptBudgetList.deductionWeight ||
  2278. this.deptBudgetList.deductionWeight == 0)
  2279. ) {
  2280. this.deptBudgetList.netWeight = Number(
  2281. this.deptBudgetList.grossWeight -
  2282. this.deptBudgetList.tare -
  2283. this.deptBudgetList.deductionWeight
  2284. ).toFixed(2)
  2285. }
  2286. },
  2287. grossWeightchange(e) {
  2288. if (
  2289. this.deptBudgetList.grossWeight &&
  2290. this.deptBudgetList.tare &&
  2291. (this.deptBudgetList.deductionWeight ||
  2292. this.deptBudgetList.deductionWeight == 0)
  2293. ) {
  2294. this.deptBudgetList.netWeight = Number(
  2295. this.deptBudgetList.grossWeight -
  2296. this.deptBudgetList.tare -
  2297. this.deptBudgetList.deductionWeight
  2298. ).toFixed(2)
  2299. }
  2300. },
  2301. contractNoChange(e) {
  2302. for (let i = 0; i < this.deptBudgetList1.length; i++) {
  2303. console.log(this.deptBudgetList1[i])
  2304. if (this.deptBudgetList1[i].inOutTaskNo == e) {
  2305. var data = this.deptBudgetList1[i]
  2306. if (this.deptBudgetList1[i].contractNo) {
  2307. this.deptBudgetList.contractNo = this.deptBudgetList1[i].contractNo
  2308. } else {
  2309. this.deptBudgetList.contractNo = this.deptBudgetList1[i].moveTaskNo
  2310. }
  2311. }
  2312. }
  2313. for (var i = 0; i < this.outContractNo.length; i++) {
  2314. if (
  2315. this.outContractNo[i].contractNo == this.deptBudgetList.contractNo
  2316. ) {
  2317. this.deptBudgetList.goodsName = this.outContractNo[i].goodsName
  2318. this.deptBudgetList.goodsNameKey = this.outContractNo[i].goodsNameKey
  2319. this.deptBudgetList.grade = this.outContractNo[i].grade
  2320. if (this.outContractNo[i].inOutType == '采购入库') {
  2321. this.deptBudgetList.tips =
  2322. '卖方' +
  2323. this.outContractNo[i].seller +
  2324. '( ' +
  2325. this.outContractNo[i].unitContractPrice +
  2326. '元/吨)'
  2327. this.deptBudgetList.inOutTypeKey = 1
  2328. } else if (this.outContractNo[i].inOutType == '移库入库') {
  2329. this.deptBudgetList.goodsName = data.goodsName
  2330. this.deptBudgetList.goodsNameKey = data.goodsNameKey
  2331. this.deptBudgetList.grade = data.grade
  2332. if (this.outContractNo[i].unitContractPrice) {
  2333. this.deptBudgetList.tips =
  2334. '出货库' +
  2335. data.sendWarehouse +
  2336. ' (' +
  2337. this.outContractNo[i].unitContractPrice +
  2338. '元/吨)'
  2339. } else {
  2340. this.deptBudgetList.tips = '出货库' + data.sendWarehouse
  2341. }
  2342. this.deptBudgetList.inOutTypeKey = 3
  2343. } else if (this.outContractNo[i].inOutType == '移库出库') {
  2344. this.deptBudgetList.tips = '入货库' + data.receiveWarehouse
  2345. } else if (this.outContractNo[i].inOutType == '暂存入库') {
  2346. this.deptBudgetList.inOutTypeKey = 4
  2347. } else if (this.outContractNo[i].inOutType == '贸易服务入库') {
  2348. this.deptBudgetList.inOutTypeKey = 5
  2349. } else if (this.outContractNo[i].inOutType == '退库') {
  2350. if (this.outContractNo[i].contractNo) {
  2351. this.deptBudgetList.tips = '买方' + this.outContractNo[i].buyer
  2352. } else {
  2353. this.deptBudgetList.tips = '出货库' + data.sendWarehouse
  2354. }
  2355. this.deptBudgetList.inOutTypeKey = 6
  2356. }
  2357. console.log(this.outContractNo[i])
  2358. // this.deptBudgetList.cost = this.outContractNo[i].contractPrice
  2359. this.cost = this.outContractNo[i].contractPrice
  2360. if (this.cost) {
  2361. this.isGetCost = true
  2362. this.deptBudgetList.cost =
  2363. this.cost - this.deptBudgetList.deductionAmount
  2364. } else {
  2365. this.isGetCost = false
  2366. this.deptBudgetList.cost = this.deptBudgetList.cost
  2367. }
  2368. this.deptBudgetList.inOutType = this.outContractNo[i].inOutType
  2369. if (this.outContractNo[i].inOutType == '移库入库') {
  2370. this.isSelectType = false
  2371. } else {
  2372. this.isSelectType = true
  2373. }
  2374. if (this.outContractNo[i].deliverType == '1') {
  2375. this.carstatus = true
  2376. } else {
  2377. this.carstatus = false
  2378. }
  2379. if (this.outContractNo[i].tranCarInfoList) {
  2380. this.options2 = this.outContractNo[i].tranCarInfoList
  2381. this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
  2382. // this.carstatus = true
  2383. }
  2384. }
  2385. }
  2386. },
  2387. contractNoChange1(e) {
  2388. for (var i = 0; i < this.outContractNo.length; i++) {
  2389. if (this.outContractNo[i].contractNo == e) {
  2390. console.log(this.outContractNo[i])
  2391. if (this.outContractNo[i].inOutType == '采购入库') {
  2392. this.deptBudgetList.inOutTypeKey = 1
  2393. } else if (this.outContractNo[i].inOutType == '移库入库') {
  2394. this.deptBudgetList.inOutTypeKey = 3
  2395. } else if (this.outContractNo[i].inOutType == '暂存入库') {
  2396. this.deptBudgetList.inOutTypeKey = 4
  2397. } else if (this.outContractNo[i].inOutType == '贸易服务入库') {
  2398. this.deptBudgetList.inOutTypeKey = 5
  2399. } else if (this.outContractNo[i].inOutType == '退库') {
  2400. this.deptBudgetList.inOutTypeKey = 6
  2401. }
  2402. this.deptBudgetList.goodsName = this.outContractNo[i].goodsName
  2403. this.deptBudgetList.goodsNameKey = this.outContractNo[i].goodsNameKey
  2404. this.deptBudgetList.grade = this.outContractNo[i].grade
  2405. // this.deptBudgetList.cost = this.outContractNo[i].contractPrice
  2406. this.cost = this.outContractNo[i].contractPrice
  2407. if (this.cost) {
  2408. this.isGetCost = true
  2409. this.deptBudgetList.cost =
  2410. this.cost - this.deptBudgetList.deductionAmount
  2411. } else {
  2412. this.isGetCost = false
  2413. this.deptBudgetList.cost = this.deptBudgetList.cost
  2414. }
  2415. this.deptBudgetList.inOutType = this.outContractNo[i].inOutType
  2416. if (this.outContractNo[i].inOutType == '移库入库') {
  2417. this.isSelectType = false
  2418. } else {
  2419. this.isSelectType = true
  2420. }
  2421. if (this.outContractNo[i].deliverType == '1') {
  2422. this.carstatus = true
  2423. } else {
  2424. this.carstatus = false
  2425. }
  2426. if (this.outContractNo[i].tranCarInfoList) {
  2427. this.options2 = this.outContractNo[i].tranCarInfoList
  2428. this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
  2429. this.carstatus = true
  2430. }
  2431. }
  2432. }
  2433. },
  2434. typeChange(e) {},
  2435. pureweight(status) {
  2436. console.log(this.deptBudgetList)
  2437. if (
  2438. this.deptBudgetList.netWeight &&
  2439. this.deptBudgetList.tidalGrainWater &&
  2440. this.deptBudgetList.solidGrainWater &&
  2441. this.deptBudgetList.buckleWeightRatio
  2442. ) {
  2443. this.deptBudgetList.pureWeight =
  2444. (this.deptBudgetList.netWeight *
  2445. (100 -
  2446. (this.deptBudgetList.tidalGrainWater -
  2447. this.deptBudgetList.solidGrainWater) *
  2448. this.deptBudgetList.buckleWeightRatio)) /
  2449. 100
  2450. }
  2451. },
  2452. selectgoodsName(e) {
  2453. for (var i = 0; i < this.goodnameList.length; i++) {
  2454. if (this.goodnameList[i].constValue == e) {
  2455. this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
  2456. if (e == '玉米(潮粮)') {
  2457. this.deptBudgetList.type = '潮粮'
  2458. } else {
  2459. this.deptBudgetList.type = '干粮'
  2460. }
  2461. }
  2462. }
  2463. },
  2464. selectpackingMethod(e) {
  2465. for (var i = 0; i < this.packtypeList.length; i++) {
  2466. if (this.packtypeList[i].constValue == e) {
  2467. this.deptBudgetList.packingMethodKey = this.packtypeList[i].constKey
  2468. }
  2469. }
  2470. },
  2471. selectstorageType(e) {
  2472. for (var i = 0; i < this.storageType.length; i++) {
  2473. if (this.storageType[i].constValue == e) {
  2474. this.deptBudgetList.inOutTypeKey = this.storageType[i].constKey
  2475. }
  2476. }
  2477. },
  2478. handleClose() {
  2479. this.accessoryTFs = false
  2480. },
  2481. handleSizeChange(val) {
  2482. console.log(`每页 ${val} 条`)
  2483. this.pageSize = val
  2484. this.getList()
  2485. },
  2486. handleCurrentChange(val) {
  2487. this.currentPage = val
  2488. console.log(`当前页: ${val}`)
  2489. this.getList()
  2490. },
  2491. getList() {
  2492. // 货名
  2493. pullDown({
  2494. constId: 'CON2',
  2495. })
  2496. .toPromise()
  2497. .then((response) => {
  2498. this.goodnameList = response
  2499. })
  2500. // 品级
  2501. pullDown({
  2502. constId: 'CON3',
  2503. })
  2504. .toPromise()
  2505. .then((response) => {
  2506. this.gradeList = response
  2507. })
  2508. // 类型
  2509. if (this.deptBudgetList.warehouseType == '1') {
  2510. this.storageType = []
  2511. pullDown({
  2512. constId: 'CON5',
  2513. })
  2514. .toPromise()
  2515. .then((response) => {
  2516. // this.storageType = response
  2517. for (let i = 0; i < response.length; i++) {
  2518. if (
  2519. response[i].constValue == '移库入库' ||
  2520. response[i].constValue == '退库'
  2521. ) {
  2522. this.storageType.push(response[i])
  2523. }
  2524. }
  2525. })
  2526. } else if (this.deptBudgetList.warehouseType == '2') {
  2527. pullDown({
  2528. constId: 'WARE1',
  2529. })
  2530. .toPromise()
  2531. .then((response) => {
  2532. this.storageType = response
  2533. })
  2534. pullDown({
  2535. constId: 'WARE2',
  2536. })
  2537. .toPromise()
  2538. .then((response) => {
  2539. this.deliveryType = response
  2540. })
  2541. }
  2542. //合同编号
  2543. xialaNo({
  2544. compId: localStorage.getItem('ws-pf_compId'),
  2545. flag: 7,
  2546. })
  2547. .toPromise()
  2548. .then((response) => {
  2549. this.options1 = response
  2550. this.outContractNo = response
  2551. })
  2552. //经办人
  2553. getstaff({
  2554. compId: localStorage.getItem('ws-pf_compId'),
  2555. warehouseId: this.deptBudgetList.baseId,
  2556. })
  2557. .toPromise()
  2558. .then((response) => {
  2559. this.options = response
  2560. this.qualityInspectorList = response
  2561. this.staffList = response
  2562. // this.agent = response
  2563. })
  2564. },
  2565. selecttaskType(e) {
  2566. for (var i = 0; i < this.taskTypeList.length; i++) {
  2567. if (this.taskTypeList[i].value == e) {
  2568. this.searchType = this.taskTypeList[i].type
  2569. }
  2570. }
  2571. },
  2572. fujian(row) {
  2573. if (
  2574. row.receiveAttachmentPath === null ||
  2575. row.receiveAttachmentPath === ''
  2576. ) {
  2577. EventBus.$emit(
  2578. 'warning',
  2579. this.$t('system.noticeCircular.NoInformation')
  2580. )
  2581. } else {
  2582. this.accessoryTFs = true
  2583. }
  2584. this.appendixIdss = row.receiveAttachmentPath
  2585. },
  2586. handleExamine(row) {
  2587. this.$router.push({
  2588. name: 'salesContractExamine',
  2589. query: {
  2590. id: row.id,
  2591. },
  2592. })
  2593. },
  2594. },
  2595. }
  2596. </script>
  2597. <style lang="scss" scoped>
  2598. /deep/.basicInformation {
  2599. .ws-info-table {
  2600. border: none;
  2601. }
  2602. .el-form-item {
  2603. width: 33.3333%;
  2604. border: none;
  2605. .el-form-item__label {
  2606. background: transparent;
  2607. border: none;
  2608. }
  2609. .el-form-item__content {
  2610. border: none;
  2611. }
  2612. }
  2613. }
  2614. .title {
  2615. position: relative;
  2616. padding-left: 10px;
  2617. }
  2618. .title::before {
  2619. content: '';
  2620. display: inline-block;
  2621. width: 5px;
  2622. height: 30px;
  2623. background: #5473e8;
  2624. position: absolute;
  2625. left: 0;
  2626. }
  2627. .el-form {
  2628. padding: 0 10%;
  2629. }
  2630. .el-button--primary {
  2631. background-color: #5878e8;
  2632. border-color: #5878e8;
  2633. }
  2634. .el-col {
  2635. background: #f6f7fc;
  2636. }
  2637. .bg-right {
  2638. text-align: right;
  2639. padding: 16px 20px;
  2640. }
  2641. .center {
  2642. position: relative;
  2643. top: 50px;
  2644. width: 40%;
  2645. height: 2000px;
  2646. margin: 0 auto;
  2647. }
  2648. //选填
  2649. /deep/.el-form-item {
  2650. width: 50%;
  2651. }
  2652. .container {
  2653. overflow: scroll;
  2654. height: 120vh;
  2655. }
  2656. /deep/.ws-info-table .el-form-item .el-form-item__label {
  2657. text-align: center;
  2658. }
  2659. .deliverydate {
  2660. display: inline-block;
  2661. width: 10%;
  2662. }
  2663. .center {
  2664. margin-top: -60px;
  2665. width: 80%;
  2666. }
  2667. //仓位
  2668. .position {
  2669. background: #afb5cb;
  2670. border-radius: 2px;
  2671. font-size: 12px;
  2672. color: #ffffff;
  2673. line-height: 20px;
  2674. display: inline-grid;
  2675. padding: 2px 4px;
  2676. }
  2677. //表格文字
  2678. /deep/.ws-info-table .el-form-item .el-form-item__label {
  2679. text-align: left;
  2680. font-size: 14px;
  2681. font-family: PingFangSC-Regular, PingFang SC;
  2682. font-weight: 400;
  2683. color: #8890b1;
  2684. line-height: 16px;
  2685. }
  2686. .inspector {
  2687. width: 50%;
  2688. }
  2689. //质检员
  2690. .inspector .el-form-item__content {
  2691. text-align: left;
  2692. margin-left: 0px;
  2693. }
  2694. .small-title {
  2695. position: relative;
  2696. padding: 10px;
  2697. font-weight: 600;
  2698. }
  2699. .small-title::before {
  2700. position: absolute;
  2701. content: '';
  2702. display: block;
  2703. background: #5473e8;
  2704. width: 4px;
  2705. height: 14px;
  2706. left: 0px;
  2707. top: 13px;
  2708. padding: 4px 2px;
  2709. }
  2710. .top {
  2711. background: black;
  2712. color: #2aff7c;
  2713. font-size: 32px;
  2714. text-align: right;
  2715. padding: 20px;
  2716. border-radius: 10px;
  2717. margin: 0 20px 20px 20px;
  2718. .car-type {
  2719. text-align: left;
  2720. }
  2721. .kg-style {
  2722. font-size: 30px;
  2723. }
  2724. }
  2725. .weight {
  2726. font-size: 68px;
  2727. }
  2728. //下面列表
  2729. .neifor {
  2730. width: 80%;
  2731. background-color: #f6f7fc;
  2732. }
  2733. /deep/.neifor .ws-info-table .el-form-item .el-form-item__label {
  2734. width: 35%;
  2735. text-align: center;
  2736. }
  2737. /deep/.neifor .ws-info-table .el-form-item .el-form-item__content {
  2738. width: 60%;
  2739. background-color: #f6f7fc;
  2740. }
  2741. /deep/.neifor .el-input--small .el-input__inner {
  2742. width: 100%;
  2743. }
  2744. </style>