warehouseManagementPut.vue 77 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190
  1. // 入库登记
  2. <template>
  3. <div class="container">
  4. <el-row>
  5. <el-col :span="20">
  6. <h2 class="bg-left title">入库登记</h2>
  7. </el-col>
  8. <el-col :span="4" class="bg-right">
  9. <el-button class="bg-bottom" type="primary" size="small" @click="revert()">
  10. <img width="6" height="10" style="vertical-align: bottom; margin-right: 3px"
  11. src="../../../public/img/lujing.png" alt />返回
  12. </el-button>
  13. </el-col>
  14. </el-row>
  15. <ws-form ref="deptBudgetList" :model="deptBudgetList" :rules="rules">
  16. <div class="basicInformation">
  17. <h2>
  18. <img style="position: relative; top: 2px" width="19" height="19" src="../../../public/img/cangku.png" alt />
  19. {{ deptBudgetList.warehouseName }}
  20. <span class="position" v-show="this.$route.query.warehouseType == 1">{{ deptBudgetList.binNumber }}仓位</span>
  21. <span v-show="this.$route.query.warehouseType == 2">(临)</span>
  22. </h2>
  23. <div class="flex">
  24. <div class="left" style='width:66.6666%;'>
  25. <ws-info-table>
  26. <!-- 任务编号 -->
  27. <ws-form-item label="任务编号" span="1" prop="inOutTaskNo">
  28. <el-select filterable clearable v-model="deptBudgetList.inOutTaskNo" placeholder="请选择任务编号"
  29. class="typeselect" @change="contractNoChange">
  30. <el-option v-for="item in deptBudgetList1" :key="item.inOutTaskNo" :label="item.inOutTaskNo"
  31. :value="item.inOutTaskNo" />
  32. </el-select>
  33. </ws-form-item>
  34. <!--合同编号-->
  35. <ws-form-item label="合同编号" span="1" prop="contractNo">
  36. <el-select filterable clearable :filter-method="dataFilter1" v-model="deptBudgetList.contractNo"
  37. placeholder="请选择合同编号或移库任务编号" class="typeselect" @change="contractNoChange" disabled>
  38. <el-option v-for="item in options1" :key="item.constKey" :label="item.contractNo"
  39. :value="item.contractNo" />
  40. </el-select>
  41. </ws-form-item>
  42. <!--毛重(吨)-->
  43. <ws-form-item label="毛重(吨)" span="1" prop="grossWeight">
  44. <ws-input @input="grossWeightchange" v-model="deptBudgetList.grossWeight" placeholder="请输入毛重"
  45. maxlength="20" type="number" @mousewheel.native.prevent size="small" />
  46. </ws-form-item>
  47. <!-- 货名 -->
  48. <ws-form-item label="货名" span="1">
  49. <ws-select disabled v-model="deptBudgetList.goodsName" placeholder class="typeselect"
  50. @change="selectgoodsName">
  51. <ws-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
  52. :value="item.constValue" />
  53. </ws-select>
  54. </ws-form-item>
  55. <!--皮重(吨)-->
  56. <ws-form-item label="皮重(吨)" span="1" prop="tare" class="readonly">
  57. <ws-input @input="tarechange" v-model="deptBudgetList.tare" placeholder="请输入皮重" type="number"
  58. @mousewheel.native.prevent maxlength="100" size="small" />
  59. </ws-form-item>
  60. <ws-form-item label="提示" span="1" prop="tips">
  61. <ws-input onmouseover="this.title=this.value" v-model="deptBudgetList.tips" maxlength="20"
  62. size="small" />
  63. </ws-form-item>
  64. <ws-form-item label="扣重(吨)" span="1" prop="deductionWeight" class="readonly">
  65. <ws-input @input="tarechange" v-model="deptBudgetList.deductionWeight" placeholder="请输入扣重" type="number"
  66. @mousewheel.native.prevent maxlength="100" size="small" />
  67. </ws-form-item>
  68. <ws-form-item label="类型" span="1" prop="type">
  69. <ws-select disabled v-model="deptBudgetList.type" @change="typeChange">
  70. <ws-option v-for="item in typeList" :key="item" :label="item" :value="item" />
  71. </ws-select>
  72. </ws-form-item>
  73. <!--净重(吨)-->
  74. <ws-form-item label="净重(吨)" span="1" prop="netWeight">
  75. <ws-input readonly="readonly" v-model="deptBudgetList.netWeight" placeholder="不可编辑,自动计算" maxlength="120"
  76. size="small" />
  77. </ws-form-item>
  78. <!-- <ws-form-item
  79. v-if="deptBudgetList.type == '潮粮'"
  80. label="扣重比"
  81. span="1"
  82. prop="buckleWeightRatio"
  83. class="readonly"
  84. >
  85. <ws-input
  86. @input="pureweight"
  87. v-model="deptBudgetList.buckleWeightRatio"
  88. placeholder="请输入扣重比"
  89. type="number"
  90. @mousewheel.native.prevent
  91. maxlength="100"
  92. size="small"
  93. />
  94. </ws-form-item>
  95. <ws-form-item
  96. v-if="deptBudgetList.type == '潮粮'"
  97. label="干粮水分占比"
  98. span="1"
  99. prop="solidGrainWater"
  100. class="readonly"
  101. >
  102. <ws-input
  103. @input="pureweight"
  104. v-model="deptBudgetList.solidGrainWater"
  105. placeholder="请输入干粮水分占比"
  106. maxlength="100"
  107. type="number"
  108. @mousewheel.native.prevent
  109. size="small"
  110. />
  111. </ws-form-item>
  112. <ws-form-item
  113. v-if="deptBudgetList.type == '潮粮'"
  114. label="潮粮水分占比"
  115. span="1"
  116. prop="tidalGrainWater"
  117. class="readonly"
  118. >
  119. <ws-input
  120. @input="pureweight(1)"
  121. v-model="deptBudgetList.tidalGrainWater"
  122. placeholder="请输入潮粮水分占比"
  123. maxlength="100"
  124. type="number"
  125. @mousewheel.native.prevent
  126. size="small"
  127. />
  128. </ws-form-item>
  129. <ws-form-item
  130. v-if="deptBudgetList.type == '潮粮'"
  131. label="纯重"
  132. span="1"
  133. prop="pureWeight"
  134. class="readonly"
  135. >
  136. <ws-input
  137. disabled
  138. v-model="deptBudgetList.pureWeight"
  139. placeholder="不可编辑,自动计算"
  140. maxlength="100"
  141. size="small"
  142. />
  143. </ws-form-item> -->
  144. <!-- 品级 -->
  145. <ws-form-item label="品级" span="1" class="readonly">
  146. <ws-select v-model="deptBudgetList.grade" placeholder class="typeselect" @change="selectpackingMethod">
  147. <ws-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue"
  148. :value="item.constValue" />
  149. </ws-select>
  150. </ws-form-item>
  151. <!--净重(吨)-->
  152. <ws-form-item label="扣款(元/吨)" span="1" prop="deductionAmount">
  153. <ws-input @input="kkInput(deptBudgetList.deductionAmount)" v-model="deptBudgetList.deductionAmount"
  154. placeholder="请输入扣款金额" maxlength="120" size="small" />
  155. </ws-form-item>
  156. <!--经办人-->
  157. <ws-form-item label="经办人" span="1" prop="agent">
  158. <el-select v-model="deptBudgetList.agent" placeholder="请选择经办人" filterable clearable
  159. @change="selectstaff">
  160. <el-option v-for="item in options" :key="item.value" :label="item.staffName"
  161. :value="item.staffName" />
  162. </el-select>
  163. </ws-form-item>
  164. <ws-form-item label="入库日期" span="1" prop="inOutDate" class="deliverydate">
  165. <el-date-picker v-model="deptBudgetList.inOutDate" placeholder="请选择入库日期" type="date"
  166. value-format="yyyy-MM-dd"></el-date-picker>
  167. </ws-form-item>
  168. <!-- 入库类型 -->
  169. <ws-form-item label="入库类型" span="1">
  170. <ws-select v-model="deptBudgetList.inOutType" placeholder class="typeselect" @change="selectstorageType"
  171. :disabled="isSelectType">
  172. <ws-option v-for="item in storageType" :key="item.constKey" :label="item.constValue"
  173. :value="item.constValue" />
  174. </ws-select>
  175. </ws-form-item>
  176. </ws-info-table>
  177. </div>
  178. <div class="right" style='width:33.3333%;'>
  179. <ws-info-table>
  180. <ws-form-item label="成本(元/吨)" span="1" prop="cost">
  181. <ws-input :disabled="disabled1" v-model="deptBudgetList.cost" placeholder="请输入成本" size="small"
  182. type="number" @mousewheel.native.prevent />
  183. <img width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
  184. src="../../../public/img/edit.png" @click="editClick(1)" alt="" />
  185. </ws-form-item>
  186. <ws-form-item label="运费(元/吨)" span="1" prop="freight">
  187. <ws-input :disabled="disabled2" v-model="deptBudgetList.freight" placeholder="请输入运费" size="small"
  188. type="number" @mousewheel.native.prevent />
  189. <img width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
  190. src="../../../public/img/edit.png" @click="editClick(2)" alt="" />
  191. </ws-form-item>
  192. <ws-form-item label="运输方式" span="1" prop="outType">
  193. <el-select v-model="deptBudgetList.outType" placeholder="请选择运输方式">
  194. <el-option v-for="item in multiSelector" :key="item.value" :label="item.name" :value="item.name" />
  195. </el-select>
  196. </ws-form-item>
  197. <!-- <ws-form-item label="车牌号" span="1" prop="carNo">
  198. <ws-input
  199. v-if="!carstatus"
  200. v-model="deptBudgetList.carNo"
  201. placeholder="请输入车牌号"
  202. maxlength="7"
  203. size="small"
  204. />
  205. <el-select
  206. v-if="carstatus"
  207. filterable
  208. clearable
  209. :filter-method="dataFilter2"
  210. v-model="deptBudgetList.carNo"
  211. placeholder="请选择车牌号"
  212. class="typeselect"
  213. @change="carChange"
  214. >
  215. <el-option
  216. v-for="item in options2"
  217. :key="item.constKey"
  218. :label="item.carNo + '(' + item.tranCarNo + ')'"
  219. :value="item.carNo"
  220. />
  221. </el-select>
  222. </ws-form-item>
  223. <ws-form-item label="箱号-1" span="1" prop="boxNo">
  224. <ws-input v-model="deptBudgetList.boxNo" placeholder="请输入箱号" maxlength="20"
  225. size="small" />
  226. </ws-form-item>
  227. <ws-form-item label="箱号-2" span="1" prop="boxNoOther">
  228. <ws-input v-model="deptBudgetList.boxNoOther" placeholder="请输入箱号" maxlength="20"
  229. size="small" />
  230. </ws-form-item>
  231. <ws-form-item label="封号-1" span="1" prop="titleNo">
  232. <ws-input v-model="deptBudgetList.titleNo" placeholder="请输入封号" maxlength="20"
  233. size="small" />
  234. </ws-form-item>
  235. <ws-form-item label="封号-2" span="1" prop="titleNoOther">
  236. <ws-input v-model="deptBudgetList.titleNoOther" placeholder="请输入封号" maxlength="20"
  237. size="small" />
  238. </ws-form-item>
  239. <ws-form-item label="车厢号-1" span="1" prop="wingNumber">
  240. <ws-input v-model="deptBudgetList.wingNumber" placeholder="请输入车厢号" maxlength="20"
  241. size="small" />
  242. </ws-form-item>
  243. <ws-form-item label="车厢号-2" span="1" prop="wingNumberOther">
  244. <ws-input v-model="deptBudgetList.wingNumberOther" placeholder="请输入车厢号" maxlength="20"
  245. size="small" />
  246. </ws-form-item> -->
  247. <!--车牌号 -->
  248. <ws-form-item label="车牌号" span="1" prop="carNo" v-if="
  249. deptBudgetList.outType == '汽运' ||
  250. deptBudgetList.outType == '集装箱船'
  251. ">
  252. <ws-input v-if="options2.length==0" v-model="deptBudgetList.carNo" placeholder="请输入车牌号" maxlength="7"
  253. size="small" />
  254. <el-select v-if='carstatus&&options2.length>0' filterable clearable :filter-method="dataFilter2"
  255. v-model="deptBudgetList.carNo" placeholder="请选择车牌号" class="typeselect" @change="carChange">
  256. <el-option v-for="item in options2" :key="item.constKey"
  257. :label="item.carNo + '(' + item.tranCarNo + ')'" :value="item.carNo" />
  258. </el-select>
  259. <el-select v-if='!carstatus&&options2.length>0' filterable clearable :filter-method="dataFilter2"
  260. v-model="deptBudgetList.carNo" placeholder="请选择车牌号" class="typeselect" @change="carChange">
  261. <el-option v-for="item in options2" :key="item.constKey" :label="item.carNo" :value="item.carNo" />
  262. </el-select>
  263. </ws-form-item>
  264. <!--船名 -->
  265. <ws-form-item label="船名" span="1" prop="carNo" v-if="deptBudgetList.outType == '散船'">
  266. <ws-input v-if='shipInfoList.length<2' v-model="deptBudgetList.shipName" placeholder="请输入船名" maxlength="20" size="small" />
  267. <el-select v-else v-model="deptBudgetList.shipName" placeholder="请选择船名" @change='shipNamechange'>
  268. <el-option v-for="item in shipInfoList" :key="item.value" :label="item.shipName" :value="item.shipName" />
  269. </el-select>
  270. </ws-form-item>
  271. <ws-form-item label="航次" span="1" prop="shipNumber" v-if="deptBudgetList.outType == '散船'">
  272. <ws-input v-if='shipInfoList.length<2' v-model="deptBudgetList.shipNumber" placeholder="请输入航次" maxlength="20" size="small" />
  273. <el-select v-else disabled v-model="deptBudgetList.shipNumber" placeholder="请选择航次">
  274. <el-option v-for="item in shipInfoList" :key="item.value" :label="item.shipNo" :value="item.shipNo" />
  275. </el-select>
  276. </ws-form-item>
  277. <!--车号 -->
  278. <ws-form-item label="车号" span="1" prop="carNo" v-if="deptBudgetList.outType == '火运'">
  279. <ws-input v-model="deptBudgetList.carNo" placeholder="请输入车号" size="small" />
  280. </ws-form-item>
  281. <ws-form-item label="箱号-1" span="1" prop="boxNo" v-if="
  282. deptBudgetList.outType == '汽运' ||
  283. deptBudgetList.outType == '集装箱船'
  284. ">
  285. <ws-input v-model="deptBudgetList.boxNo" placeholder="请输入箱号" maxlength="20" size="small" />
  286. </ws-form-item>
  287. <ws-form-item label="箱号-2" span="1" prop="boxNoOther" v-if="
  288. deptBudgetList.outType == '汽运' ||
  289. deptBudgetList.outType == '集装箱船'
  290. ">
  291. <ws-input v-model="deptBudgetList.boxNoOther" placeholder="请输入箱号" maxlength="20" size="small" />
  292. </ws-form-item>
  293. <ws-form-item label="封号-1" span="1" prop="titleNo" v-if="
  294. deptBudgetList.outType == '汽运' ||
  295. deptBudgetList.outType == '集装箱船'
  296. ">
  297. <ws-input v-model="deptBudgetList.titleNo" placeholder="请输入封号" maxlength="20" size="small" />
  298. </ws-form-item>
  299. <ws-form-item label="封号-2" span="1" prop="titleNoOther" v-if="
  300. deptBudgetList.outType == '汽运' ||
  301. deptBudgetList.outType == '集装箱船'
  302. ">
  303. <ws-input v-model="deptBudgetList.titleNoOther" placeholder="请输入封号" maxlength="20" size="small" />
  304. </ws-form-item>
  305. <ws-form-item label="车厢号-1" span="1" prop="wingNumber" v-if="deptBudgetList.outType == '火运'">
  306. <ws-input v-model="deptBudgetList.wingNumber" placeholder="请输入车厢号" maxlength="20" size="small" />
  307. </ws-form-item>
  308. <ws-form-item label="车厢号-2" span="1" prop="wingNumberOther" v-if="deptBudgetList.outType == '火运'">
  309. <ws-input v-model="deptBudgetList.wingNumberOther" placeholder="请输入车厢号" maxlength="20" size="small" />
  310. </ws-form-item>
  311. <!-- onkeyup="value=value.replace(/[^\A-\Z0-9\u4E00-\u9FA5\.]/g,'')" -->
  312. </ws-info-table>
  313. </div>
  314. </div>
  315. <div v-show="
  316. this.$route.query.warehouseType == 2 &&
  317. this.deptBudgetList.createType == 2
  318. ">
  319. <el-checkbox v-model="checked" checked>退库并出库</el-checkbox>
  320. <ws-info-table v-show="checked == true && this.deptBudgetList.createType == 2">
  321. <!-- 出库类型 -->
  322. <ws-form-item label="出库类型" span="1" prop="temporaryOutType">
  323. <!-- v-model="deptBudgetList.deliveryType" -->
  324. <ws-select v-model="deptBudgetList.temporaryOutType" placeholder class="typeselect">
  325. <ws-option v-for="item in deliveryType" :key="item.constKey" :label="item.constValue"
  326. :value="item.constValue" />
  327. </ws-select>
  328. </ws-form-item>
  329. <!-- 出库合同编号 -->
  330. <ws-form-item label="出库合同编号" span="1">
  331. <ws-select v-model="deptBudgetList.outContractNo" placeholder="请选择合同编号或移库任务编号" class="typeselect">
  332. <ws-option v-for="item in outContractNo" :key="item.constKey" :label="item.contractNo"
  333. :value="item.contractNo" />
  334. </ws-select>
  335. </ws-form-item>
  336. </ws-info-table>
  337. </div>
  338. </div>
  339. <div class="small-title">上传磅单照片</div>
  340. <el-upload :action="global.uploadPath" :show-file-list="false" :on-success="
  341. (res) => {
  342. uploadSuccessHandle1(res)
  343. }
  344. " class="avatar-uploader" accept=".jpg, .jpeg, .png, .gif">
  345. <el-button size="small" type="primary">点击上传</el-button>
  346. </el-upload>
  347. <div @click='imgBig(deptBudgetList.addressUrl)' v-if='deptBudgetList.addressUrl!=""'>
  348. <img style="width: 100px; height: 100px" :src="deptBudgetList.addressUrl" alt="" />
  349. </div>
  350. <div class="small-title">化验数据(选填)</div>
  351. <div class="inspector">
  352. <!--自检员-->
  353. <!-- <ws-form-item label="质检员" span="1" prop="qualityInspector">
  354. <ws-input
  355. v-model="deptBudgetList.warehouseInOutDetail.qualityInspector"
  356. placeholder="请输入质检员姓名"
  357. maxlength="10"
  358. size="small"
  359. />
  360. </ws-form-item> -->
  361. <ws-form-item label="质检员" span="1" prop="qualityInspector">
  362. <el-select v-model="deptBudgetList.warehouseInOutDetail.qualityInspector" placeholder="请选择质检员" filterable
  363. clearable @change="qualityInspectorChange">
  364. <el-option v-for="item in qualityInspectorList" :key="item.value" :label="item.staffName"
  365. :value="item.staffName" />
  366. </el-select>
  367. </ws-form-item>
  368. </div>
  369. <div class="neifor">
  370. <ws-info-table>
  371. <!--水分(%)<=-->
  372. <ws-form-item label="水分(%)" span="1" prop="waterContent">
  373. <ws-input v-model="deptBudgetList.warehouseInOutDetail.waterContent" type="number"
  374. @mousewheel.native.prevent placeholder="请输入水分占比" maxlength="40" size="small" />
  375. </ws-form-item>
  376. <!--杂质(%)<=-->
  377. <ws-form-item label="杂质(%)" span="1" prop="impurity">
  378. <ws-input v-model="deptBudgetList.warehouseInOutDetail.impurity" type="number" @mousewheel.native.prevent
  379. placeholder="请输入杂质占比" maxlength="40" size="small" />
  380. </ws-form-item>
  381. <!--容重(克/升)-->
  382. <ws-form-item label="容重(克/升)" span="1" prop="bulkDensity">
  383. <ws-input v-model="deptBudgetList.warehouseInOutDetail.bulkDensity" type="number" @mousewheel.native.prevent
  384. placeholder="请输入容重" maxlength="40" size="small" />
  385. </ws-form-item>
  386. <!--霉变粒(%)<=-->
  387. <ws-form-item label="霉变粒(%)" span="1" prop="mildewGrain">
  388. <ws-input v-model="deptBudgetList.warehouseInOutDetail.mildewGrain" type="number" @mousewheel.native.prevent
  389. placeholder="请输入霉变粒占比" maxlength="40" size="small" />
  390. </ws-form-item>
  391. <!--热损伤(%)<=-->
  392. <ws-form-item label="热损伤(%)" span="1" prop="jiaorenli">
  393. <ws-input v-model="deptBudgetList.warehouseInOutDetail.jiaorenli" type="number" @mousewheel.native.prevent
  394. placeholder="请输入热损伤占比" maxlength="40" size="small" />
  395. </ws-form-item>
  396. <!--不完善粒(%)<=-->
  397. <ws-form-item label="不完善粒(%)" span="1" prop="imperfectGrain">
  398. <ws-input v-model="deptBudgetList.warehouseInOutDetail.imperfectGrain" type="number"
  399. @mousewheel.native.prevent placeholder="请输入不完善粒占比" maxlength="40" size="small" />
  400. </ws-form-item>
  401. </ws-info-table>
  402. </div>
  403. <div style="text-align: right; padding: 10px">
  404. <el-button class="bg-bottom-up" type="primary" size="small" @click="temporaryStorage()">暂存</el-button>
  405. <el-button class="bg-bottom-up" type="primary" size="small" @click="submit()">提交</el-button>
  406. </div>
  407. </ws-form>
  408. <div @click='imgshow=false'
  409. style='overflow:scroll;position:fixed;left:0;top:0;background:rgba(0,0,0,0.1);width:100%;height:100%;z-index:1030;'
  410. v-if='imgshow'>
  411. <img style='position:absolute;left:50%;top:50%;transform: translateX(-50%) translateY(-50%);height:80%;'
  412. :src="img" alt="">
  413. </div>
  414. </div>
  415. </template>
  416. <script>
  417. import {
  418. pullDown,
  419. addstorageputList,
  420. xialaNo,
  421. getstaff,
  422. getReceiptTaskNo,
  423. } from '@/model/warehouse/index'
  424. import Pagination from '@/components/Pagination'
  425. import WsUpload from '@/components/WsUpload'
  426. // import { dayjs, fmoney, EventBus } from 'base-core-lib'
  427. import {
  428. dayjs,
  429. EventBus
  430. } from 'base-core-lib'
  431. export default {
  432. name: 'viewSpareMoney',
  433. components: {
  434. WsUpload,
  435. Pagination,
  436. },
  437. watch: {
  438. // vesselId(val) {
  439. // this.getList()
  440. // },
  441. isShow(val) {
  442. this.showType = val
  443. },
  444. },
  445. data() {
  446. return {
  447. qualityInspectorList: [],
  448. isGetCost: false,
  449. isSelectType: true,
  450. //弹出框
  451. dialogViewSpareMoney: false,
  452. dialogApproveFormVisible: false,
  453. // 船舶类型
  454. monetaryKey: null,
  455. // 表格显示数据
  456. tableDate: [],
  457. // 是否显示
  458. showType: true,
  459. typeList: ['干粮', '潮粮'],
  460. // 年
  461. year: '',
  462. carstatus: false,
  463. deptBudgetTotal: 0,
  464. currentPage: 1,
  465. pageSize: 10,
  466. shipInfoList:[],
  467. searchType: 1,
  468. searchKeyWord: '',
  469. contractType: 2,
  470. startDate: null,
  471. endDate: null,
  472. goodnameList: {},
  473. checked: true,
  474. agent: [],
  475. staffList: [],
  476. options: [],
  477. options1: [],
  478. options2: [],
  479. multiSelector: [{
  480. name: '汽运',
  481. value: '0',
  482. },
  483. {
  484. name: '火运',
  485. value: '1',
  486. },
  487. {
  488. name: '集装箱船',
  489. value: '2',
  490. },
  491. {
  492. name: '散船',
  493. value: '3',
  494. },
  495. ],
  496. outContractNo1: [],
  497. outContractNo: [],
  498. // 提交类型
  499. submitType: true,
  500. storageType: [],
  501. deliveryType: [],
  502. readonly: true,
  503. appendixIdsAdd: '',
  504. uploadSuccess: {},
  505. onChange: {},
  506. img: '',
  507. imgshow: false,
  508. gradeList: [],
  509. rules: {
  510. netWeight: [{
  511. required: true,
  512. type: 'number',
  513. message: '请输入活动名称',
  514. trigger: 'blur',
  515. }, ],
  516. },
  517. size: 10,
  518. disabled1: true,
  519. disabled2: true,
  520. tranCarInfoList: [],
  521. compId: localStorage.getItem('ws-pf_compId'),
  522. deptCircularPage: {},
  523. packtypeList: {},
  524. date: {
  525. year: dayjs().format('YYYY'),
  526. month: dayjs().format('MM'),
  527. },
  528. contractList: [],
  529. deptBudgetList: {
  530. type: '干粮',
  531. freight: 0,
  532. cost: '',
  533. addressUrl: '',
  534. warehouseInOutDetail: {},
  535. deductionAmount: 0,
  536. },
  537. historyList: [],
  538. cost: '',
  539. pickerBeginDateBefore: {
  540. disabledDate: (time) => {
  541. return time.getTime() > Date.now()
  542. },
  543. },
  544. accessoryTFs: false,
  545. deptBudgetList1: [],
  546. }
  547. },
  548. mounted() {
  549. this.deptBudgetList.baseId = this.$route.query.baseId
  550. this.deptBudgetList.positionId = this.$route.query.positionId
  551. this.deptBudgetList.warehouseName = this.$route.query.warehouseName
  552. this.deptBudgetList.binNumber = this.$route.query.binNumber
  553. this.deptBudgetList.warehouseType = this.$route.query.warehouseType
  554. this.deptBudgetList.createType = this.$route.query.createType
  555. this.getList()
  556. this.deptBudgetList.grade = '一等品'
  557. this.deptBudgetList.gradeKey = '1'
  558. this.deptBudgetList.inOutTypeFlag = 1
  559. if (this.deptBudgetList.cost) {
  560. if (this.deptBudgetList.cost > this.deptBudgetList.deductionAmount) {
  561. this.deptBudgetList.cost = this.cost - this.deptBudgetList.deductionAmount
  562. } else {
  563. }
  564. }
  565. // if (this.deptBudgetList.warehouseType == 1) {
  566. // // this.deptBudgetList.inOutType = '采购入库'
  567. // this.deptBudgetList.inOutTypeKey = '1'
  568. // } else {
  569. // // this.deptBudgetList.inOutType = '退库'
  570. // this.deptBudgetList.inOutTypeKey = '1'
  571. // }
  572. },
  573. methods: {
  574. shipNamechange(e){
  575. for (let i = 0; i < this.shipInfoList.length; i++) {
  576. if(this.shipInfoList[i].shipName==e){
  577. this.deptBudgetList.shipNumber=this.shipInfoList[i].shipNo
  578. }
  579. }
  580. },
  581. imgBig(item) {
  582. console.log(item)
  583. this.img = item
  584. this.imgshow = true
  585. },
  586. qualityInspectorChange(e) {
  587. console.log(e)
  588. },
  589. kkInput(val) {
  590. console.log(val)
  591. if (this.isGetCost) {
  592. if (this.deptBudgetList.cost > val) {
  593. this.deptBudgetList.cost = this.cost - this.deptBudgetList.deductionAmount
  594. }
  595. }
  596. },
  597. uploadSuccessHandle1(res) {
  598. this.deptBudgetList.addressUrl = res.url
  599. console.log(this.deptBudgetList.addressUrl)
  600. },
  601. dataFilter1(val) {
  602. console.log(val)
  603. this.deptBudgetList.contractNo = val
  604. if (val) {
  605. //val存在
  606. this.options1 = this.outContractNo1.filter((item) => {
  607. if (
  608. !!~item.contractNo.indexOf(val) ||
  609. !!~item.contractNo.toUpperCase().indexOf(val.toUpperCase())
  610. ) {
  611. return true
  612. }
  613. })
  614. } else {
  615. //val为空时,还原数组
  616. this.options1 = this.outContractNo
  617. }
  618. },
  619. dataFilter2(val) {
  620. this.deptBudgetList.carNo = val
  621. if (val) {
  622. //val存在
  623. this.options1 = this.outContractNo1.filter((item) => {
  624. if (
  625. !!~item.carNo.indexOf(val) ||
  626. !!~item.carNo.toUpperCase().indexOf(val.toUpperCase())
  627. ) {
  628. return true
  629. }
  630. })
  631. } else {
  632. //val为空时,还原数组
  633. this.options2 = this.tranCarInfoList
  634. }
  635. },
  636. editClick(status) {
  637. this.isGetCost = false
  638. if (status == 1) {
  639. this.disabled1 = !this.disabled1
  640. } else {
  641. this.disabled2 = !this.disabled2
  642. }
  643. },
  644. //返回按钮
  645. revert() {
  646. this.$router.go(-1)
  647. },
  648. carChange(e) {
  649. for (let i = 0; i < this.tranCarInfoList.length; i++) {
  650. if (this.tranCarInfoList[i].carNo == this.deptBudgetList.carNo) {
  651. this.deptBudgetList.tranCarNo = this.tranCarInfoList[i].tranCarNo
  652. this.deptBudgetList.freight = this.tranCarInfoList[i].tranPrice
  653. }
  654. if (this.deptBudgetList.inOutType == '移库入库') {
  655. if (!this.deptBudgetList.cost) {
  656. this.deptBudgetList.cost = this.tranCarInfoList[i].cost
  657. }
  658. this.deptBudgetList.loadNetWeight = this.tranCarInfoList[i].loadNetWeight
  659. }
  660. }
  661. },
  662. dataFilter(val) {
  663. // console.log(val,"名")
  664. this.deptBudgetList.staffList = val
  665. if (val) {
  666. //val存在
  667. this.options = this.staffList.filter((item) => {
  668. if (
  669. !!~item.staffName.indexOf(val) ||
  670. !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
  671. ) {
  672. return true
  673. }
  674. })
  675. } else {
  676. //val为空时,还原数组
  677. this.options = this.staffList
  678. }
  679. },
  680. selectstaff(e) {
  681. for (var i = 0; i < this.staffList.length; i++) {
  682. if (this.staffList[i].staffName == e) {
  683. this.deptBudgetList.personChargeKey = this.staffList[i].staffId
  684. }
  685. }
  686. },
  687. //提交按钮
  688. submit() {
  689. if (!this.deptBudgetList.goodsName) {
  690. this.$message({
  691. message: '货名不能为空',
  692. type: 'warning',
  693. })
  694. return
  695. }
  696. if (!this.deptBudgetList.grossWeight) {
  697. this.$message({
  698. message: '毛重不能为空',
  699. type: 'warning',
  700. })
  701. return
  702. }
  703. if (
  704. this.deptBudgetList.grossWeight < 0 ||
  705. this.deptBudgetList.grossWeight > 10000 ||
  706. (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
  707. String(this.deptBudgetList.grossWeight).length -
  708. (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
  709. 3)
  710. ) {
  711. this.$message({
  712. message: '毛重输入错误',
  713. type: 'warning',
  714. })
  715. return
  716. }
  717. if (!this.deptBudgetList.tare) {
  718. this.$message({
  719. message: '皮重不能为空',
  720. type: 'warning',
  721. })
  722. return
  723. }
  724. if (
  725. this.deptBudgetList.tare <= 0 ||
  726. this.deptBudgetList.tare > 10000 ||
  727. (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
  728. String(this.deptBudgetList.tare).length -
  729. (String(this.deptBudgetList.tare).indexOf('.') + 1) >
  730. 3)
  731. ) {
  732. this.$message({
  733. message: '皮重输入错误',
  734. type: 'warning',
  735. })
  736. return
  737. }
  738. if (!this.deptBudgetList.deductionWeight) {
  739. this.$message({
  740. message: '扣重不能为空',
  741. type: 'warning',
  742. })
  743. return
  744. }
  745. if (
  746. this.deptBudgetList.deductionWeight < 0 ||
  747. this.deptBudgetList.deductionWeight > 10 ||
  748. (String(this.deptBudgetList.deductionWeight).indexOf('.') != -1 &&
  749. String(this.deptBudgetList.deductionWeight).length -
  750. (String(this.deptBudgetList.deductionWeight).indexOf('.') + 1) >
  751. 3)
  752. ) {
  753. this.$message({
  754. message: '扣重输入错误',
  755. type: 'warning',
  756. })
  757. return
  758. }
  759. if (
  760. this.deptBudgetList.type == '潮粮' &&
  761. !this.deptBudgetList.buckleWeightRatio
  762. ) {
  763. this.$message({
  764. message: '扣重比不能为空',
  765. type: 'warning',
  766. })
  767. return
  768. }
  769. if (
  770. (this.deptBudgetList.type == '潮粮' &&
  771. this.deptBudgetList.buckleWeightRatio < 0) ||
  772. (this.deptBudgetList.type == '潮粮' &&
  773. this.deptBudgetList.buckleWeightRatio > 3) ||
  774. (this.deptBudgetList.type == '潮粮' &&
  775. String(this.deptBudgetList.buckleWeightRatio).indexOf('.') != -1 &&
  776. String(this.deptBudgetList.buckleWeightRatio).length -
  777. (String(this.deptBudgetList.buckleWeightRatio).indexOf('.') + 1) >
  778. 2)
  779. ) {
  780. this.$message({
  781. message: '扣重比输入错误',
  782. type: 'warning',
  783. })
  784. return
  785. }
  786. if (
  787. this.deptBudgetList.type == '潮粮' &&
  788. !this.deptBudgetList.tidalGrainWater
  789. ) {
  790. this.$message({
  791. message: '潮粮水分不能为空',
  792. type: 'warning',
  793. })
  794. return
  795. }
  796. if (
  797. (this.deptBudgetList.type == '潮粮' &&
  798. this.deptBudgetList.tidalGrainWater < 1) ||
  799. (this.deptBudgetList.type == '潮粮' &&
  800. this.deptBudgetList.tidalGrainWater > 40) ||
  801. (this.deptBudgetList.type == '潮粮' &&
  802. String(this.deptBudgetList.tidalGrainWater).indexOf('.') != -1 &&
  803. String(this.deptBudgetList.tidalGrainWater).length -
  804. (String(this.deptBudgetList.tidalGrainWater).indexOf('.') + 1) >
  805. 2)
  806. ) {
  807. this.$message({
  808. message: '潮粮水分输入错误',
  809. type: 'warning',
  810. })
  811. return
  812. }
  813. if (
  814. this.deptBudgetList.type == '潮粮' &&
  815. !this.deptBudgetList.solidGrainWater
  816. ) {
  817. this.$message({
  818. message: '干粮水分不能为空',
  819. type: 'warning',
  820. })
  821. return
  822. }
  823. if (
  824. (this.deptBudgetList.type == '潮粮' &&
  825. this.deptBudgetList.solidGrainWater < 1) ||
  826. (this.deptBudgetList.type == '潮粮' &&
  827. this.deptBudgetList.solidGrainWater > 40) ||
  828. (this.deptBudgetList.type == '潮粮' &&
  829. String(this.deptBudgetList.solidGrainWater).indexOf('.') != -1 &&
  830. String(this.deptBudgetList.solidGrainWater).length -
  831. (String(this.deptBudgetList.solidGrainWater).indexOf('.') + 1) >
  832. 1)
  833. ) {
  834. this.$message({
  835. message: '干粮水分输入错误',
  836. type: 'warning',
  837. })
  838. return
  839. }
  840. if (!String(this.deptBudgetList.deductionAmount)) {
  841. this.$message({
  842. message: '扣款不能为空',
  843. type: 'warning',
  844. })
  845. return
  846. }
  847. if (
  848. this.deptBudgetList.deductionAmount < 0 ||
  849. this.deptBudgetList.deductionAmount > 10000 ||
  850. (String(this.deptBudgetList.deductionAmount).indexOf('.') != -1 &&
  851. String(this.deptBudgetList.deductionAmount).length -
  852. (String(this.deptBudgetList.deductionAmount).indexOf('.') + 1) >
  853. 2)
  854. ) {
  855. this.$message({
  856. message: '扣款输入错误',
  857. type: 'warning',
  858. })
  859. return
  860. }
  861. if (!this.deptBudgetList.cost) {
  862. this.$message({
  863. message: '未获取到成本,请编辑后提交',
  864. type: 'warning',
  865. })
  866. return
  867. }
  868. if (
  869. this.deptBudgetList.cost < 0 ||
  870. this.deptBudgetList.cost > 20000 ||
  871. (String(this.deptBudgetList.cost).indexOf('.') != -1 &&
  872. String(this.deptBudgetList.cost).length -
  873. (String(this.deptBudgetList.cost).indexOf('.') + 1) >
  874. 2)
  875. ) {
  876. this.$message({
  877. message: '成本输入错误',
  878. type: 'warning',
  879. })
  880. return
  881. }
  882. if (!String(this.deptBudgetList.freight)) {
  883. this.$message({
  884. message: '运费不能为空',
  885. type: 'warning',
  886. })
  887. return
  888. }
  889. if (
  890. this.deptBudgetList.freight < 0 ||
  891. this.deptBudgetList.freight > 100000 ||
  892. (String(this.deptBudgetList.freight).indexOf('.') != -1 &&
  893. String(this.deptBudgetList.freight).length -
  894. (String(this.deptBudgetList.freight).indexOf('.') + 1) >
  895. 2)
  896. ) {
  897. this.$message({
  898. message: '运费输入错误',
  899. type: 'warning',
  900. })
  901. return
  902. }
  903. if (!this.deptBudgetList.agent) {
  904. this.$message({
  905. message: '经办人不能为空',
  906. type: 'warning',
  907. })
  908. return
  909. }
  910. if (
  911. this.deptBudgetList.agent.length < 2 ||
  912. this.deptBudgetList.agent.length > 10
  913. ) {
  914. this.$message({
  915. message: '经办人输入有误',
  916. type: 'warning',
  917. })
  918. return
  919. }
  920. if (!this.deptBudgetList.grade) {
  921. this.$message({
  922. message: '品级不能为空!',
  923. type: 'warning',
  924. })
  925. return
  926. }
  927. if (!this.deptBudgetList.inOutDate) {
  928. this.$message({
  929. message: '入库日期不能为空!',
  930. type: 'warning',
  931. })
  932. return
  933. }
  934. if (!this.deptBudgetList.inOutType) {
  935. this.$message({
  936. message: '入库类型不能为空!',
  937. type: 'warning',
  938. })
  939. return
  940. }
  941. if (!this.deptBudgetList.carNo) {
  942. this.$message({
  943. message: '车牌号不能为空',
  944. type: 'warning',
  945. })
  946. return
  947. }
  948. if (this.deptBudgetList.carNo.length > 7) {
  949. this.$message({
  950. message: '车牌号输入错误,请输入7个字符之内',
  951. type: 'warning',
  952. })
  953. return
  954. }
  955. if (this.deptBudgetList.boxNo && this.deptBudgetList.boxNo.length > 20) {
  956. this.$message({
  957. message: '箱号-1输入错误',
  958. type: 'warning',
  959. })
  960. return
  961. }
  962. if (this.deptBudgetList.boxNoOther && this.deptBudgetList.boxNoOther.length > 20) {
  963. this.$message({
  964. message: '箱号-2输入错误',
  965. type: 'warning',
  966. })
  967. return
  968. }
  969. if (this.deptBudgetList.titleNo && this.deptBudgetList.titleNo.length > 20) {
  970. this.$message({
  971. message: '封号-1输入错误',
  972. type: 'warning',
  973. })
  974. return
  975. }
  976. if (this.deptBudgetList.titleNoOther && this.deptBudgetList.titleNoOther.length > 20) {
  977. this.$message({
  978. message: '封号-2输入错误',
  979. type: 'warning',
  980. })
  981. return
  982. }
  983. if (!this.deptBudgetList.contractNo) {
  984. this.$message({
  985. message: '合同编号不能为空',
  986. type: 'warning',
  987. })
  988. return
  989. }
  990. // if (
  991. // this.deptBudgetList.contractNo.length < 6 ||
  992. // this.deptBudgetList.contractNo.length > 20
  993. // ) {
  994. // this.$message({
  995. // message: '合同编号长度不符合要求,请输入6-20个字符之内',
  996. // type: 'warning',
  997. // })
  998. // return
  999. // }
  1000. if (!this.deptBudgetList.addressUrl) {
  1001. this.$message({
  1002. message: '附件不能为空',
  1003. type: 'warning',
  1004. })
  1005. return
  1006. }
  1007. //自检员
  1008. if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
  1009. if (
  1010. this.deptBudgetList.warehouseInOutDetail.qualityInspector.length <
  1011. 2 ||
  1012. this.deptBudgetList.warehouseInOutDetail.qualityInspector.length > 10
  1013. ) {
  1014. this.$message({
  1015. message: '质检员姓名长度错误!',
  1016. type: 'warning',
  1017. })
  1018. return
  1019. }
  1020. }
  1021. if (this.deptBudgetList.warehouseInOutDetail.waterContent) {
  1022. if (isNaN(this.deptBudgetList.warehouseInOutDetail.waterContent)) {
  1023. this.$message({
  1024. message: '水分(%)非数字!',
  1025. type: 'warning',
  1026. })
  1027. return
  1028. }
  1029. if (
  1030. this.deptBudgetList.warehouseInOutDetail.waterContent < 1 ||
  1031. this.deptBudgetList.warehouseInOutDetail.waterContent > 40 ||
  1032. (String(
  1033. this.deptBudgetList.warehouseInOutDetail.waterContent
  1034. ).indexOf('.') != -1 &&
  1035. String(this.deptBudgetList.warehouseInOutDetail.waterContent)
  1036. .length -
  1037. (String(
  1038. this.deptBudgetList.warehouseInOutDetail.waterContent
  1039. ).indexOf('.') +
  1040. 1) >
  1041. 2)
  1042. ) {
  1043. this.$message({
  1044. message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1045. type: 'warning',
  1046. })
  1047. return
  1048. }
  1049. }
  1050. //杂质
  1051. if (this.deptBudgetList.warehouseInOutDetail.impurity) {
  1052. if (isNaN(this.deptBudgetList.warehouseInOutDetail.impurity)) {
  1053. this.$message({
  1054. message: '杂质(%)非数字!',
  1055. type: 'warning',
  1056. })
  1057. return
  1058. }
  1059. if (
  1060. this.deptBudgetList.warehouseInOutDetail.impurity < 1 ||
  1061. this.deptBudgetList.warehouseInOutDetail.impurity > 40 ||
  1062. (String(this.deptBudgetList.warehouseInOutDetail.impurity).indexOf(
  1063. '.'
  1064. ) != -1 &&
  1065. String(this.deptBudgetList.warehouseInOutDetail.impurity).length -
  1066. (String(
  1067. this.deptBudgetList.warehouseInOutDetail.impurity
  1068. ).indexOf('.') +
  1069. 1) >
  1070. 2)
  1071. ) {
  1072. this.$message({
  1073. message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1074. type: 'warning',
  1075. })
  1076. return
  1077. }
  1078. }
  1079. //霉变
  1080. if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
  1081. if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
  1082. this.$message({
  1083. message: '霉变粒(%)非数字!',
  1084. type: 'warning',
  1085. })
  1086. return
  1087. }
  1088. if (
  1089. this.deptBudgetList.warehouseInOutDetail.mildewGrain < 1 ||
  1090. this.deptBudgetList.warehouseInOutDetail.mildewGrain > 40 ||
  1091. (String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
  1092. '.'
  1093. ) != -1 &&
  1094. String(this.deptBudgetList.warehouseInOutDetail.mildewGrain)
  1095. .length -
  1096. (String(
  1097. this.deptBudgetList.warehouseInOutDetail.mildewGrain
  1098. ).indexOf('.') +
  1099. 1) >
  1100. 2)
  1101. ) {
  1102. this.$message({
  1103. message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1104. type: 'warning',
  1105. })
  1106. return
  1107. }
  1108. }
  1109. //热损伤
  1110. if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
  1111. if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
  1112. this.$message({
  1113. message: '热损伤(%)非数字!',
  1114. type: 'warning',
  1115. })
  1116. return
  1117. }
  1118. if (
  1119. this.deptBudgetList.warehouseInOutDetail.jiaorenli < 1 ||
  1120. this.deptBudgetList.warehouseInOutDetail.jiaorenli > 40 ||
  1121. (String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).indexOf(
  1122. '.'
  1123. ) != -1 &&
  1124. String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).length -
  1125. (String(
  1126. this.deptBudgetList.warehouseInOutDetail.jiaorenli
  1127. ).indexOf('.') +
  1128. 1) >
  1129. 2)
  1130. ) {
  1131. this.$message({
  1132. message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1133. type: 'warning',
  1134. })
  1135. return
  1136. }
  1137. }
  1138. //不完善粒(%)
  1139. if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
  1140. if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
  1141. this.$message({
  1142. message: '不完善粒(%)非数字!',
  1143. type: 'warning',
  1144. })
  1145. return
  1146. }
  1147. if (
  1148. this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 1 ||
  1149. this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
  1150. (String(
  1151. this.deptBudgetList.warehouseInOutDetail.imperfectGrain
  1152. ).indexOf('.') != -1 &&
  1153. String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)
  1154. .length -
  1155. (String(
  1156. this.deptBudgetList.warehouseInOutDetail.imperfectGrain
  1157. ).indexOf('.') +
  1158. 1) >
  1159. 2)
  1160. ) {
  1161. this.$message({
  1162. message: '不完善粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1163. type: 'warning',
  1164. })
  1165. return
  1166. }
  1167. }
  1168. //容重
  1169. if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
  1170. if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
  1171. this.$message({
  1172. message: '容重(克/升)非数字!',
  1173. type: 'warning',
  1174. })
  1175. return
  1176. }
  1177. if (
  1178. (this.deptBudgetList.warehouseInOutDetail.bulkDensity &&
  1179. String(
  1180. this.deptBudgetList.warehouseInOutDetail.bulkDensity
  1181. ).indexOf('.') != -1 &&
  1182. String(this.deptBudgetList.warehouseInOutDetail.bulkDensity)
  1183. .length -
  1184. (String(
  1185. this.deptBudgetList.warehouseInOutDetail.bulkDensity
  1186. ).indexOf('.') +
  1187. 1) >
  1188. 2) ||
  1189. this.deptBudgetList.warehouseInOutDetail.bulkDensity > 1000 ||
  1190. this.deptBudgetList.warehouseInOutDetail.bulkDensity < 0
  1191. ) {
  1192. this.$message({
  1193. message: '容重输入错误',
  1194. type: 'warning',
  1195. })
  1196. return
  1197. }
  1198. }
  1199. console.log(this.deptBudgetList, '入库对象')
  1200. this.deptBudgetList.id = this.$route.query.id
  1201. this.$confirm(`确定提交入库信息`, {
  1202. cancelButtonText: '取消',
  1203. confirmButtonText: '确定',
  1204. type: 'warning',
  1205. })
  1206. .then(() => {
  1207. this.$refs.deptBudgetList.validate((valid) => {
  1208. if (valid) {
  1209. this.deptBudgetList.compId =
  1210. localStorage.getItem('ws-pf_compId')
  1211. this.deptBudgetList.inOutFlag = 2
  1212. this.deptBudgetList.pcFlag = 1
  1213. this.deptBudgetList.statusFlag = 3
  1214. addstorageputList(this.deptBudgetList)
  1215. .toPromise()
  1216. .then((response) => {
  1217. this.$message.success('添加成功')
  1218. this.$router.go(-1)
  1219. })
  1220. } else {
  1221. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  1222. return false
  1223. }
  1224. })
  1225. })
  1226. .catch(() => {
  1227. return false
  1228. })
  1229. },
  1230. temporaryStorage() {
  1231. if (!this.deptBudgetList.goodsName) {
  1232. this.$message({
  1233. message: '货名不能为空',
  1234. type: 'warning',
  1235. })
  1236. return
  1237. }
  1238. if (!this.deptBudgetList.grossWeight) {
  1239. this.$message({
  1240. message: '毛重不能为空',
  1241. type: 'warning',
  1242. })
  1243. return
  1244. }
  1245. if (
  1246. this.deptBudgetList.grossWeight < 0 ||
  1247. this.deptBudgetList.grossWeight > 10000 ||
  1248. (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
  1249. String(this.deptBudgetList.grossWeight).length -
  1250. (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
  1251. 3)
  1252. ) {
  1253. this.$message({
  1254. message: '毛重输入错误',
  1255. type: 'warning',
  1256. })
  1257. return
  1258. }
  1259. if (!this.deptBudgetList.tare) {
  1260. this.$message({
  1261. message: '皮重不能为空',
  1262. type: 'warning',
  1263. })
  1264. return
  1265. }
  1266. if (
  1267. this.deptBudgetList.tare <= 0 ||
  1268. this.deptBudgetList.tare > 10000 ||
  1269. (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
  1270. String(this.deptBudgetList.tare).length -
  1271. (String(this.deptBudgetList.tare).indexOf('.') + 1) >
  1272. 3)
  1273. ) {
  1274. this.$message({
  1275. message: '皮重输入错误',
  1276. type: 'warning',
  1277. })
  1278. return
  1279. }
  1280. if (!this.deptBudgetList.deductionWeight) {
  1281. this.$message({
  1282. message: '扣重不能为空',
  1283. type: 'warning',
  1284. })
  1285. return
  1286. }
  1287. if (
  1288. this.deptBudgetList.deductionWeight < 0 ||
  1289. this.deptBudgetList.deductionWeight > 10 ||
  1290. (String(this.deptBudgetList.deductionWeight).indexOf('.') != -1 &&
  1291. String(this.deptBudgetList.deductionWeight).length -
  1292. (String(this.deptBudgetList.deductionWeight).indexOf('.') + 1) >
  1293. 3)
  1294. ) {
  1295. this.$message({
  1296. message: '扣重输入错误',
  1297. type: 'warning',
  1298. })
  1299. return
  1300. }
  1301. if (
  1302. this.deptBudgetList.type == '潮粮' &&
  1303. !this.deptBudgetList.buckleWeightRatio
  1304. ) {
  1305. this.$message({
  1306. message: '扣重比不能为空',
  1307. type: 'warning',
  1308. })
  1309. return
  1310. }
  1311. if (
  1312. (this.deptBudgetList.type == '潮粮' &&
  1313. this.deptBudgetList.buckleWeightRatio < 0) ||
  1314. (this.deptBudgetList.type == '潮粮' &&
  1315. this.deptBudgetList.buckleWeightRatio > 3) ||
  1316. (this.deptBudgetList.type == '潮粮' &&
  1317. String(this.deptBudgetList.buckleWeightRatio).indexOf('.') != -1 &&
  1318. String(this.deptBudgetList.buckleWeightRatio).length -
  1319. (String(this.deptBudgetList.buckleWeightRatio).indexOf('.') + 1) >
  1320. 2)
  1321. ) {
  1322. this.$message({
  1323. message: '扣重比输入错误',
  1324. type: 'warning',
  1325. })
  1326. return
  1327. }
  1328. if (
  1329. this.deptBudgetList.type == '潮粮' &&
  1330. !this.deptBudgetList.tidalGrainWater
  1331. ) {
  1332. this.$message({
  1333. message: '潮粮水分不能为空',
  1334. type: 'warning',
  1335. })
  1336. return
  1337. }
  1338. if (
  1339. (this.deptBudgetList.type == '潮粮' &&
  1340. this.deptBudgetList.tidalGrainWater < 1) ||
  1341. (this.deptBudgetList.type == '潮粮' &&
  1342. this.deptBudgetList.tidalGrainWater > 40) ||
  1343. (this.deptBudgetList.type == '潮粮' &&
  1344. String(this.deptBudgetList.tidalGrainWater).indexOf('.') != -1 &&
  1345. String(this.deptBudgetList.tidalGrainWater).length -
  1346. (String(this.deptBudgetList.tidalGrainWater).indexOf('.') + 1) >
  1347. 2)
  1348. ) {
  1349. this.$message({
  1350. message: '潮粮水分输入错误',
  1351. type: 'warning',
  1352. })
  1353. return
  1354. }
  1355. if (
  1356. this.deptBudgetList.type == '潮粮' &&
  1357. !this.deptBudgetList.solidGrainWater
  1358. ) {
  1359. this.$message({
  1360. message: '干粮水分不能为空',
  1361. type: 'warning',
  1362. })
  1363. return
  1364. }
  1365. if (
  1366. (this.deptBudgetList.type == '潮粮' &&
  1367. this.deptBudgetList.solidGrainWater < 1) ||
  1368. (this.deptBudgetList.type == '潮粮' &&
  1369. this.deptBudgetList.solidGrainWater > 40) ||
  1370. (this.deptBudgetList.type == '潮粮' &&
  1371. String(this.deptBudgetList.solidGrainWater).indexOf('.') != -1 &&
  1372. String(this.deptBudgetList.solidGrainWater).length -
  1373. (String(this.deptBudgetList.solidGrainWater).indexOf('.') + 1) >
  1374. 1)
  1375. ) {
  1376. this.$message({
  1377. message: '干粮水分输入错误',
  1378. type: 'warning',
  1379. })
  1380. return
  1381. }
  1382. if (!this.deptBudgetList.deductionAmount) {
  1383. this.$message({
  1384. message: '扣款不能为空',
  1385. type: 'warning',
  1386. })
  1387. return
  1388. }
  1389. if (
  1390. this.deptBudgetList.deductionAmount < 0 ||
  1391. this.deptBudgetList.deductionAmount > 10000 ||
  1392. (String(this.deptBudgetList.deductionAmount).indexOf('.') != -1 &&
  1393. String(this.deptBudgetList.deductionAmount).length -
  1394. (String(this.deptBudgetList.deductionAmount).indexOf('.') + 1) >
  1395. 2)
  1396. ) {
  1397. this.$message({
  1398. message: '扣款输入错误',
  1399. type: 'warning',
  1400. })
  1401. return
  1402. }
  1403. if (!this.deptBudgetList.cost) {
  1404. this.$message({
  1405. message: '未获取到成本,请编辑后提交',
  1406. type: 'warning',
  1407. })
  1408. return
  1409. }
  1410. if (
  1411. this.deptBudgetList.cost < 0 ||
  1412. this.deptBudgetList.cost > 20000 ||
  1413. (String(this.deptBudgetList.cost).indexOf('.') != -1 &&
  1414. String(this.deptBudgetList.cost).length -
  1415. (String(this.deptBudgetList.cost).indexOf('.') + 1) >
  1416. 2)
  1417. ) {
  1418. this.$message({
  1419. message: '成本输入错误',
  1420. type: 'warning',
  1421. })
  1422. return
  1423. }
  1424. if (!this.deptBudgetList.freight) {
  1425. this.$message({
  1426. message: '运费不能为空',
  1427. type: 'warning',
  1428. })
  1429. return
  1430. }
  1431. if (
  1432. this.deptBudgetList.freight < 0 ||
  1433. this.deptBudgetList.freight > 100000 ||
  1434. (String(this.deptBudgetList.freight).indexOf('.') != -1 &&
  1435. String(this.deptBudgetList.freight).length -
  1436. (String(this.deptBudgetList.freight).indexOf('.') + 1) >
  1437. 2)
  1438. ) {
  1439. this.$message({
  1440. message: '运费输入错误',
  1441. type: 'warning',
  1442. })
  1443. return
  1444. }
  1445. if (!this.deptBudgetList.agent) {
  1446. this.$message({
  1447. message: '经办人不能为空',
  1448. type: 'warning',
  1449. })
  1450. return
  1451. }
  1452. if (
  1453. this.deptBudgetList.agent.length < 2 ||
  1454. this.deptBudgetList.agent.length > 10
  1455. ) {
  1456. this.$message({
  1457. message: '经办人输入有误',
  1458. type: 'warning',
  1459. })
  1460. return
  1461. }
  1462. // if (!this.deptBudgetList.carNo) {
  1463. // this.$message({
  1464. // message: '车牌号不能为空',
  1465. // type: 'warning'
  1466. // })
  1467. // return
  1468. // }
  1469. // if (this.deptBudgetList.carNo.length > 7) {
  1470. // this.$message({
  1471. // message: '车牌号输入错误,请输入7个字符之内',
  1472. // type: 'warning'
  1473. // })
  1474. // return
  1475. // }
  1476. if (!this.deptBudgetList.contractNo) {
  1477. this.$message({
  1478. message: '合同编号不能为空',
  1479. type: 'warning',
  1480. })
  1481. return
  1482. }
  1483. // if (
  1484. // this.deptBudgetList.contractNo.length < 6 ||
  1485. // this.deptBudgetList.contractNo.length > 20
  1486. // ) {
  1487. // this.$message({
  1488. // message: '合同编号长度不符合要求,请输入6-20个字符之内',
  1489. // type: 'warning',
  1490. // })
  1491. // return
  1492. // }
  1493. // if (this.deptBudgetList.netWeight > this.$route.query.capacity) {
  1494. // this.$message({
  1495. // message: '入库量大于该仓库容量!',
  1496. // type: 'warning',
  1497. // })
  1498. // return
  1499. // }
  1500. //自检员
  1501. if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
  1502. if (
  1503. this.deptBudgetList.warehouseInOutDetail.qualityInspector.length <
  1504. 2 ||
  1505. this.deptBudgetList.warehouseInOutDetail.qualityInspector.length > 10
  1506. ) {
  1507. this.$message({
  1508. message: '质检员姓名长度错误!',
  1509. type: 'warning',
  1510. })
  1511. return
  1512. }
  1513. }
  1514. if (this.deptBudgetList.warehouseInOutDetail.waterContent) {
  1515. if (isNaN(this.deptBudgetList.warehouseInOutDetail.waterContent)) {
  1516. this.$message({
  1517. message: '水分(%)非数字!',
  1518. type: 'warning',
  1519. })
  1520. return
  1521. }
  1522. if (
  1523. this.deptBudgetList.warehouseInOutDetail.waterContent < 1 ||
  1524. this.deptBudgetList.warehouseInOutDetail.waterContent > 40 ||
  1525. (String(
  1526. this.deptBudgetList.warehouseInOutDetail.waterContent
  1527. ).indexOf('.') != -1 &&
  1528. String(this.deptBudgetList.warehouseInOutDetail.waterContent)
  1529. .length -
  1530. (String(
  1531. this.deptBudgetList.warehouseInOutDetail.waterContent
  1532. ).indexOf('.') +
  1533. 1) >
  1534. 2)
  1535. ) {
  1536. this.$message({
  1537. message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1538. type: 'warning',
  1539. })
  1540. return
  1541. }
  1542. }
  1543. //杂质
  1544. if (this.deptBudgetList.warehouseInOutDetail.impurity) {
  1545. if (isNaN(this.deptBudgetList.warehouseInOutDetail.impurity)) {
  1546. this.$message({
  1547. message: '杂质(%)非数字!',
  1548. type: 'warning',
  1549. })
  1550. return
  1551. }
  1552. if (
  1553. this.deptBudgetList.warehouseInOutDetail.impurity < 1 ||
  1554. this.deptBudgetList.warehouseInOutDetail.impurity > 40 ||
  1555. (String(this.deptBudgetList.warehouseInOutDetail.impurity).indexOf(
  1556. '.'
  1557. ) != -1 &&
  1558. String(this.deptBudgetList.warehouseInOutDetail.impurity).length -
  1559. (String(
  1560. this.deptBudgetList.warehouseInOutDetail.impurity
  1561. ).indexOf('.') +
  1562. 1) >
  1563. 2)
  1564. ) {
  1565. this.$message({
  1566. message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1567. type: 'warning',
  1568. })
  1569. return
  1570. }
  1571. }
  1572. //霉变
  1573. if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
  1574. if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
  1575. this.$message({
  1576. message: '霉变粒(%)非数字!',
  1577. type: 'warning',
  1578. })
  1579. return
  1580. }
  1581. if (
  1582. this.deptBudgetList.warehouseInOutDetail.mildewGrain < 1 ||
  1583. this.deptBudgetList.warehouseInOutDetail.mildewGrain > 40 ||
  1584. (String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
  1585. '.'
  1586. ) != -1 &&
  1587. String(this.deptBudgetList.warehouseInOutDetail.mildewGrain)
  1588. .length -
  1589. (String(
  1590. this.deptBudgetList.warehouseInOutDetail.mildewGrain
  1591. ).indexOf('.') +
  1592. 1) >
  1593. 2)
  1594. ) {
  1595. this.$message({
  1596. message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1597. type: 'warning',
  1598. })
  1599. return
  1600. }
  1601. }
  1602. //热损伤
  1603. if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
  1604. if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
  1605. this.$message({
  1606. message: '热损伤(%)非数字!',
  1607. type: 'warning',
  1608. })
  1609. return
  1610. }
  1611. if (
  1612. this.deptBudgetList.warehouseInOutDetail.jiaorenli < 1 ||
  1613. this.deptBudgetList.warehouseInOutDetail.jiaorenli > 40 ||
  1614. (String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).indexOf(
  1615. '.'
  1616. ) != -1 &&
  1617. String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).length -
  1618. (String(
  1619. this.deptBudgetList.warehouseInOutDetail.jiaorenli
  1620. ).indexOf('.') +
  1621. 1) >
  1622. 2)
  1623. ) {
  1624. this.$message({
  1625. message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1626. type: 'warning',
  1627. })
  1628. return
  1629. }
  1630. }
  1631. //不完善粒(%)
  1632. if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
  1633. if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
  1634. this.$message({
  1635. message: '不完善粒(%)非数字!',
  1636. type: 'warning',
  1637. })
  1638. return
  1639. }
  1640. if (
  1641. this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 1 ||
  1642. this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
  1643. (String(
  1644. this.deptBudgetList.warehouseInOutDetail.imperfectGrain
  1645. ).indexOf('.') != -1 &&
  1646. String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)
  1647. .length -
  1648. (String(
  1649. this.deptBudgetList.warehouseInOutDetail.imperfectGrain
  1650. ).indexOf('.') +
  1651. 1) >
  1652. 2)
  1653. ) {
  1654. this.$message({
  1655. message: '不完善粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1656. type: 'warning',
  1657. })
  1658. return
  1659. }
  1660. }
  1661. //容重
  1662. if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
  1663. if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
  1664. this.$message({
  1665. message: '容重(克/升)非数字!',
  1666. type: 'warning',
  1667. })
  1668. return
  1669. }
  1670. if (
  1671. (this.deptBudgetList.warehouseInOutDetail.bulkDensity &&
  1672. String(
  1673. this.deptBudgetList.warehouseInOutDetail.bulkDensity
  1674. ).indexOf('.') != -1 &&
  1675. String(this.deptBudgetList.warehouseInOutDetail.bulkDensity)
  1676. .length -
  1677. (String(
  1678. this.deptBudgetList.warehouseInOutDetail.bulkDensity
  1679. ).indexOf('.') +
  1680. 1) >
  1681. 2) ||
  1682. this.deptBudgetList.warehouseInOutDetail.bulkDensity > 1000 ||
  1683. this.deptBudgetList.warehouseInOutDetail.bulkDensity < 0
  1684. ) {
  1685. this.$message({
  1686. message: '容重输入错误',
  1687. type: 'warning',
  1688. })
  1689. return
  1690. }
  1691. }
  1692. this.$confirm(`暂存后可在待完成页面查看,确定暂存`, {
  1693. cancelButtonText: '取消',
  1694. confirmButtonText: '确定',
  1695. type: 'warning',
  1696. })
  1697. .then(() => {
  1698. this.$refs.deptBudgetList.validate((valid) => {
  1699. if (valid) {
  1700. this.deptBudgetList.compId =
  1701. localStorage.getItem('ws-pf_compId')
  1702. this.deptBudgetList.inOutFlag = 2
  1703. this.deptBudgetList.statusFlag = 1
  1704. let _data = JSON.parse(localStorage.getItem('winseaview-userInfo'))
  1705. this.deptBudgetList.backOffice = _data.content.showCompName + '-' + _data.content.staffName
  1706. addstorageputList(this.deptBudgetList)
  1707. .toPromise()
  1708. .then((response) => {
  1709. this.$message.success('暂存成功')
  1710. this.$router.go(-1)
  1711. })
  1712. } else {
  1713. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  1714. return false
  1715. }
  1716. })
  1717. })
  1718. .catch(() => {
  1719. return false
  1720. })
  1721. },
  1722. tarechange(e) {
  1723. if (
  1724. this.deptBudgetList.grossWeight &&
  1725. this.deptBudgetList.tare &&
  1726. this.deptBudgetList.deductionWeight
  1727. ) {
  1728. this.deptBudgetList.netWeight = Number(
  1729. this.deptBudgetList.grossWeight -
  1730. this.deptBudgetList.tare -
  1731. this.deptBudgetList.deductionWeight
  1732. ).toFixed(2)
  1733. }
  1734. },
  1735. grossWeightchange(e) {
  1736. if (
  1737. this.deptBudgetList.grossWeight &&
  1738. this.deptBudgetList.tare &&
  1739. this.deptBudgetList.deductionWeight
  1740. ) {
  1741. this.deptBudgetList.netWeight = Number(
  1742. this.deptBudgetList.grossWeight -
  1743. this.deptBudgetList.tare -
  1744. this.deptBudgetList.deductionWeight
  1745. ).toFixed(2)
  1746. }
  1747. },
  1748. contractNoChange(e) {
  1749. for (let i = 0; i < this.deptBudgetList1.length; i++) {
  1750. if (this.deptBudgetList1[i].inOutTaskNo == e) {
  1751. var data = this.deptBudgetList1[i]
  1752. if (this.deptBudgetList1[i].contractNo) {
  1753. this.deptBudgetList.contractNo = this.deptBudgetList1[i].contractNo
  1754. } else {
  1755. this.deptBudgetList.contractNo = this.deptBudgetList1[i].moveTaskNo
  1756. }
  1757. }
  1758. }
  1759. if (!data) return
  1760. for (var i = 0; i < this.outContractNo.length; i++) {
  1761. if (this.outContractNo[i].contractNo == this.deptBudgetList.contractNo) {
  1762. if (this.outContractNo[i].inOutType == '采购入库') {
  1763. if (!this.outContractNo[i].unitContractPrice) {
  1764. this.deptBudgetList.tips =
  1765. '卖方' +
  1766. this.outContractNo[i].seller
  1767. } else {
  1768. this.deptBudgetList.tips =
  1769. '卖方' +
  1770. this.outContractNo[i].seller +
  1771. '( ' +
  1772. this.outContractNo[i].unitContractPrice +
  1773. '元/吨)'
  1774. }
  1775. this.deptBudgetList.inOutTypeKey = 1
  1776. } else if (this.outContractNo[i].inOutType == '移库入库') {
  1777. if (this.outContractNo[i].unitContractPrice) {
  1778. this.deptBudgetList.tips = '出货库' + this.outContractNo[i].sendWarehouse + ' (' + this.outContractNo[i]
  1779. .unitContractPrice + '元/吨)'
  1780. } else {
  1781. this.deptBudgetList.tips = '出货库' + this.outContractNo[i].sendWarehouse
  1782. }
  1783. this.deptBudgetList.inOutTypeKey = 3
  1784. } else if (this.outContractNo[i].inOutType == '暂存入库') {
  1785. this.deptBudgetList.inOutTypeKey = 4
  1786. } else if (this.outContractNo[i].inOutType == '贸易服务入库') {
  1787. this.deptBudgetList.inOutTypeKey = 5
  1788. } else if (this.detailData.inOutType == '退库') {
  1789. if (this.outContractNo[i].contractNo) {
  1790. this.deptBudgetList.tips = '买方' + this.outContractNo[i].buyer
  1791. } else {
  1792. this.deptBudgetList.tips = '出货库' + this.outContractNo[i].sendWarehouse
  1793. }
  1794. this.deptBudgetList.inOutTypeKey = 6
  1795. }
  1796. this.deptBudgetList.goodsName = this.outContractNo[i].goodsName
  1797. this.deptBudgetList.goodsNameKey = this.outContractNo[i].goodsNameKey
  1798. // this.deptBudgetList.cost = this.outContractNo[i].contractPrice
  1799. this.cost = this.outContractNo[i].contractPrice
  1800. if (this.cost) {
  1801. this.isGetCost = true
  1802. this.deptBudgetList.cost = this.cost - this.deptBudgetList.deductionAmount
  1803. } else {
  1804. this.isGetCost = false
  1805. this.deptBudgetList.cost = this.deptBudgetList.cost
  1806. }
  1807. this.deptBudgetList.inOutType = this.outContractNo[i].inOutType
  1808. if (this.outContractNo[i].inOutType == '移库入库') {
  1809. this.isSelectType = false
  1810. } else {
  1811. this.isSelectType = true
  1812. }
  1813. if (this.outContractNo[i].tranCarInfoList) {
  1814. this.options2 = this.outContractNo[i].tranCarInfoList
  1815. this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
  1816. this.carstatus = true
  1817. }
  1818. if(this.outContractNo[i].shipInfoList){
  1819. this.shipInfoList = this.outContractNo[i].shipInfoList
  1820. }
  1821. }
  1822. }
  1823. },
  1824. typeChange(e) {},
  1825. pureweight(status) {
  1826. console.log(this.deptBudgetList)
  1827. if (
  1828. this.deptBudgetList.netWeight &&
  1829. this.deptBudgetList.tidalGrainWater &&
  1830. this.deptBudgetList.solidGrainWater &&
  1831. this.deptBudgetList.buckleWeightRatio
  1832. ) {
  1833. this.deptBudgetList.pureWeight =
  1834. (this.deptBudgetList.netWeight *
  1835. (100 -
  1836. (this.deptBudgetList.tidalGrainWater -
  1837. this.deptBudgetList.solidGrainWater) *
  1838. this.deptBudgetList.buckleWeightRatio)) /
  1839. 100
  1840. }
  1841. },
  1842. selectgoodsName(e) {
  1843. for (var i = 0; i < this.goodnameList.length; i++) {
  1844. if (this.goodnameList[i].constValue == e) {
  1845. this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
  1846. if (e == '玉米(潮粮)') {
  1847. this.deptBudgetList.type = '潮粮'
  1848. } else {
  1849. this.deptBudgetList.type = '干粮'
  1850. }
  1851. }
  1852. }
  1853. },
  1854. selectpackingMethod(e) {
  1855. for (var i = 0; i < this.packtypeList.length; i++) {
  1856. if (this.packtypeList[i].constValue == e) {
  1857. this.deptBudgetList.packingMethodKey = this.packtypeList[i].constKey
  1858. }
  1859. }
  1860. },
  1861. selectstorageType(e) {
  1862. for (var i = 0; i < this.storageType.length; i++) {
  1863. if (this.storageType[i].constValue == e) {
  1864. this.deptBudgetList.inOutTypeKey = this.storageType[i].constKey
  1865. }
  1866. }
  1867. },
  1868. handleClose() {
  1869. this.accessoryTFs = false
  1870. },
  1871. handleSizeChange(val) {
  1872. console.log(`每页 ${val} 条`)
  1873. this.pageSize = val
  1874. this.getList()
  1875. },
  1876. handleCurrentChange(val) {
  1877. this.currentPage = val
  1878. console.log(`当前页: ${val}`)
  1879. this.getList()
  1880. },
  1881. getList() {
  1882. // 货名
  1883. pullDown({
  1884. constId: 'CON2'
  1885. })
  1886. .toPromise()
  1887. .then((response) => {
  1888. this.goodnameList = response
  1889. })
  1890. // 品级
  1891. pullDown({
  1892. constId: 'CON3'
  1893. })
  1894. .toPromise()
  1895. .then((response) => {
  1896. this.gradeList = response
  1897. })
  1898. // 类型
  1899. if (this.deptBudgetList.warehouseType == '1') {
  1900. this.storageType = []
  1901. pullDown({
  1902. constId: 'CON5'
  1903. })
  1904. .toPromise()
  1905. .then((response) => {
  1906. // this.storageType = response
  1907. for (let i = 0; i < response.length; i++) {
  1908. if (response[i].constValue == '移库入库' || response[i].constValue == '退库') {
  1909. this.storageType.push(response[i])
  1910. }
  1911. }
  1912. })
  1913. } else if (this.deptBudgetList.warehouseType == '2') {
  1914. pullDown({
  1915. constId: 'WARE1'
  1916. })
  1917. .toPromise()
  1918. .then((response) => {
  1919. this.storageType = response
  1920. })
  1921. pullDown({
  1922. constId: 'WARE2'
  1923. })
  1924. .toPromise()
  1925. .then((response) => {
  1926. this.deliveryType = response
  1927. })
  1928. }
  1929. getReceiptTaskNo({
  1930. flag: 2,
  1931. warehouseName: this.deptBudgetList.warehouseName,
  1932. agentKey: localStorage.getItem('ws-pf_userId'),
  1933. })
  1934. .toPromise()
  1935. .then((response) => {
  1936. this.deptBudgetList1 = response
  1937. })
  1938. //合同编号
  1939. xialaNo({
  1940. compId: localStorage.getItem('ws-pf_compId'),
  1941. flag: 6
  1942. })
  1943. .toPromise()
  1944. .then((response) => {
  1945. this.options1 = response
  1946. this.outContractNo = response
  1947. })
  1948. //合同编号2
  1949. xialaNo({
  1950. compId: localStorage.getItem('ws-pf_compId'),
  1951. flag: 7
  1952. })
  1953. .toPromise()
  1954. .then((response) => {
  1955. this.outContractNo1 = response
  1956. })
  1957. //经办人
  1958. getstaff({
  1959. compId: localStorage.getItem('ws-pf_compId'),
  1960. warehouseId: this.deptBudgetList.baseId,
  1961. })
  1962. .toPromise()
  1963. .then((response) => {
  1964. this.options = response
  1965. this.qualityInspectorList = response
  1966. this.staffList = response
  1967. // this.agent = response
  1968. })
  1969. },
  1970. selecttaskType(e) {
  1971. for (var i = 0; i < this.taskTypeList.length; i++) {
  1972. if (this.taskTypeList[i].value == e) {
  1973. this.searchType = this.taskTypeList[i].type
  1974. }
  1975. }
  1976. },
  1977. fujian(row) {
  1978. if (
  1979. row.receiveAttachmentPath === null ||
  1980. row.receiveAttachmentPath === ''
  1981. ) {
  1982. EventBus.$emit(
  1983. 'warning',
  1984. this.$t('system.noticeCircular.NoInformation')
  1985. )
  1986. } else {
  1987. this.accessoryTFs = true
  1988. }
  1989. this.appendixIdss = row.receiveAttachmentPath
  1990. },
  1991. handleExamine(row) {
  1992. this.$router.push({
  1993. name: 'salesContractExamine',
  1994. query: {
  1995. id: row.id
  1996. },
  1997. })
  1998. },
  1999. },
  2000. }
  2001. </script>
  2002. <style lang="scss" scoped>
  2003. /deep/.basicInformation {
  2004. .ws-info-table {
  2005. border: none;
  2006. }
  2007. .left {
  2008. .el-form-item {
  2009. width: 50%;
  2010. // width: 33.3333%;
  2011. border: none;
  2012. .el-form-item__label {
  2013. background: transparent;
  2014. border: none;
  2015. }
  2016. .el-form-item__content {
  2017. border: none;
  2018. }
  2019. }
  2020. }
  2021. .right {
  2022. .el-form-item {
  2023. width: 100%;
  2024. // width: 33.3333%;
  2025. border: none;
  2026. .el-form-item__label {
  2027. background: transparent;
  2028. border: none;
  2029. }
  2030. .el-form-item__content {
  2031. border: none;
  2032. }
  2033. }
  2034. }
  2035. }
  2036. .title {
  2037. position: relative;
  2038. padding-left: 10px;
  2039. }
  2040. .title::before {
  2041. content: '';
  2042. display: inline-block;
  2043. width: 5px;
  2044. height: 30px;
  2045. background: #5473e8;
  2046. position: absolute;
  2047. left: 0;
  2048. }
  2049. .el-form {
  2050. padding: 0 10%;
  2051. }
  2052. .el-button--primary {
  2053. background-color: #5878e8;
  2054. border-color: #5878e8;
  2055. }
  2056. .el-col {
  2057. background: #f6f7fc;
  2058. }
  2059. .bg-right {
  2060. text-align: right;
  2061. padding: 16px 20px;
  2062. }
  2063. .center {
  2064. position: relative;
  2065. top: 50px;
  2066. width: 40%;
  2067. height: 2000px;
  2068. margin: 0 auto;
  2069. }
  2070. //选填
  2071. /deep/.el-form-item {
  2072. width: 50%;
  2073. }
  2074. .container {
  2075. overflow: scroll;
  2076. height: 120vh;
  2077. }
  2078. /deep/.ws-info-table .el-form-item .el-form-item__label {
  2079. text-align: center;
  2080. }
  2081. .deliverydate {
  2082. display: inline-block;
  2083. width: 10%;
  2084. }
  2085. .center {
  2086. margin-top: -60px;
  2087. width: 80%;
  2088. }
  2089. //仓位
  2090. .position {
  2091. background: #afb5cb;
  2092. border-radius: 2px;
  2093. font-size: 12px;
  2094. color: #ffffff;
  2095. line-height: 20px;
  2096. display: inline-grid;
  2097. padding: 2px 4px;
  2098. }
  2099. //表格文字
  2100. /deep/.ws-info-table .el-form-item .el-form-item__label {
  2101. text-align: left;
  2102. font-size: 14px;
  2103. font-family: PingFangSC-Regular, PingFang SC;
  2104. font-weight: 400;
  2105. color: #8890b1;
  2106. line-height: 16px;
  2107. }
  2108. .inspector {
  2109. width: 50%;
  2110. }
  2111. //质检员
  2112. .inspector .el-form-item__content {
  2113. text-align: left;
  2114. margin-left: 0px;
  2115. }
  2116. .small-title {
  2117. position: relative;
  2118. padding: 10px;
  2119. font-weight: 600;
  2120. }
  2121. .small-title::before {
  2122. position: absolute;
  2123. content: '';
  2124. display: block;
  2125. background: #5473e8;
  2126. width: 4px;
  2127. height: 14px;
  2128. left: 0px;
  2129. top: 13px;
  2130. padding: 4px 2px;
  2131. }
  2132. //下面列表
  2133. .neifor {
  2134. width: 80%;
  2135. background-color: #f6f7fc;
  2136. }
  2137. /deep/.neifor .ws-info-table .el-form-item .el-form-item__label {
  2138. width: 35%;
  2139. text-align: center;
  2140. }
  2141. /deep/.neifor .ws-info-table .el-form-item .el-form-item__content {
  2142. width: 60%;
  2143. background-color: #f6f7fc;
  2144. }
  2145. /deep/.neifor .el-input--small .el-input__inner {
  2146. width: 100%;
  2147. }
  2148. </style>