tranManagementWarehouseInOutTaskEdit.vue 58 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917
  1. // 编辑出入库任务
  2. <template>
  3. <div class="container">
  4. <el-row>
  5. <el-col :span="12">
  6. <h2 class="bg-left title">编辑出入库任务</h2>
  7. </el-col>
  8. <el-col :span="12" class="bg-right">
  9. <el-button class="bg-bottom" type="primary" size="small" @click="returnsales()">
  10. <img
  11. width="6"
  12. height="10"
  13. style="vertical-align: bottom; margin-right: 3px"
  14. src="../../../public/img/lujing.png"
  15. alt
  16. />返回
  17. </el-button>
  18. </el-col>
  19. </el-row>
  20. <div class="basicInformation">
  21. <div class="annu">
  22. <el-radio-group @change="tasktypechange" v-model="dataList.taskTypeKey"></el-radio-group>
  23. <div class="nav">
  24. <span class="ziti">
  25. 任务类型:
  26. <h1
  27. class="ziti1"
  28. v-show="dataList.inOutType == '移库入库'||dataList.inOutType == '移库出库'"
  29. >移库任务</h1>
  30. <h1
  31. class="ziti1"
  32. v-show="dataList.inOutType == '销售出库'||dataList.inOutType == '暂存出库'||dataList.inOutType == '贸易服务出库'||dataList.inOutType == '采购出库'"
  33. >出库任务</h1>
  34. <h1
  35. class="ziti1"
  36. v-show="dataList.inOutType == '采购入库'||dataList.inOutType == '暂存入库'||dataList.inOutType == '贸易服务入库'||dataList.inOutType == '退库'"
  37. >入库任务</h1>
  38. </span>
  39. </div>
  40. </div>
  41. <div class="ding"></div>
  42. <div
  43. v-if="dataList.taskTypeKey == 1||(dataList.taskTypeKey == 3&&inOutFlag ==1)"
  44. class="center1"
  45. >
  46. <img
  47. style="position: relative; top: 40px; left: 300px;"
  48. width="19"
  49. height="19"
  50. src="../../../public/img/cangku.png"
  51. alt
  52. />
  53. <!--出库=-->
  54. <div class="small-title">
  55. <h3>出库任务({{ dataList.inOutTaskNo }})</h3>
  56. </div>
  57. <el-form ref="dataList" :model="dataList" label-width="140px">
  58. <!-- 仓库名 -->
  59. <el-form-item label="仓库名">
  60. <el-select
  61. v-model="dataList.warehouseName"
  62. placeholder="请选择仓库名"
  63. class="typeselect"
  64. @change="selectwarehouseName"
  65. disabled
  66. >
  67. <el-option
  68. v-for="item in warehouseNameList"
  69. :key="item.constKey"
  70. :label="item.warehouseName"
  71. :value="item.id"
  72. />
  73. </el-select>
  74. </el-form-item>
  75. <!-- 出库类型 -->
  76. <el-form-item label="出库类型">
  77. <el-select
  78. :disabled="dataList.taskTypeKey == 3||dataList.taskTypeKey == 4"
  79. v-model="dataList.inOutType"
  80. placeholder="请选择出库类型"
  81. class="typeselect"
  82. @change="selectstorageType"
  83. >
  84. <el-option
  85. v-for="item in storageType"
  86. :key="item.constKey"
  87. v-if="
  88. (dataList.taskTypeKey == 1 &&
  89. item.constValue != '移库出库') ||
  90. (dataList.taskTypeKey == 3 &&
  91. item.constValue == '移库出库') ||
  92. (dataList.taskTypeKey == 4 && item.constValue == '销售出库')
  93. "
  94. :label="item.constValue"
  95. :value="item.constValue"
  96. />
  97. </el-select>
  98. </el-form-item>
  99. <!-- 合同编号 -->
  100. <el-form-item v-if="dataList.taskTypeKey != 3" label="合同编号">
  101. <el-select
  102. @change="changecontract"
  103. v-model="dataList.contractNo"
  104. placeholder="请输入合同编号"
  105. class="typeselect"
  106. >
  107. <el-option
  108. v-for="item in moveTaskNo"
  109. :key="item.constKey"
  110. :label="item.contractNo"
  111. :value="item.contractNo"
  112. ></el-option>
  113. </el-select>
  114. </el-form-item>
  115. <el-form-item v-if="dataList.taskTypeKey == 3" label="移库任务编号">
  116. <el-input
  117. disabled
  118. v-model="dataList.moveTaskNo"
  119. placeholder="请输入移库任务编号"
  120. size="small"
  121. />
  122. </el-form-item>
  123. <!-- 货名 -->
  124. <el-form-item label="货名" class="huom">
  125. <el-select
  126. :disabled="dataList.taskTypeKey != 3"
  127. v-model="dataList.goodsName"
  128. placeholder="货名"
  129. class="huom"
  130. @change="selectgoodsName"
  131. >
  132. <el-option
  133. v-for="item in goodnameList"
  134. :key="item.constKey"
  135. :label="item.constValue"
  136. :value="item.constValue"
  137. ></el-option>
  138. </el-select>
  139. </el-form-item>
  140. <!--重量(吨)-->
  141. <el-form-item label="重量(吨)" span="1" style=" margin-left: 350px; margin-top: -40px">
  142. <el-input
  143. v-model="dataList.weight"
  144. placeholder="请输入重量(吨)"
  145. maxlength="120"
  146. size="small"
  147. class="huom"
  148. />
  149. </el-form-item>
  150. <!-- 品级 -->
  151. <el-form-item label="品级">
  152. <el-select
  153. v-model="dataList.grade"
  154. placeholder
  155. class="typeselect"
  156. @change="selectpackingMethod"
  157. >
  158. <el-option
  159. v-for="item in gradeList"
  160. :key="item.constKey"
  161. :label="item.constValue"
  162. :value="item.constValue"
  163. />
  164. </el-select>
  165. </el-form-item>
  166. <!--容重(克/升)>=-->
  167. <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="容重(克/升)>=">
  168. <el-input
  169. @input="bulkDensitychange"
  170. v-model="dataList.bulkDensity"
  171. placeholder="请输入容重"
  172. maxlength="120"
  173. size="small"
  174. class="huom"
  175. />
  176. </el-form-item>
  177. <!--水分(%)<=-->
  178. <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="水分(%)<=" span="1" style=" margin-left: 350px; margin-top: -40px">
  179. <el-input
  180. @input="waterContentchange"
  181. v-model="dataList.waterContent"
  182. placeholder="请输入水分占比"
  183. maxlength="120"
  184. size="small"
  185. class="huom"
  186. />
  187. </el-form-item>
  188. <!--单价(元/吨)-->
  189. <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="单价(元/吨)" span="1" style=" margin-left: 650px; margin-top: -40px" v-show="Pricetype">
  190. <el-input
  191. @input="unitPricechange"
  192. v-model="dataList.unitPrice"
  193. placeholder="请输入单价"
  194. maxlength="120"
  195. size="small"
  196. class="huom"
  197. />
  198. </el-form-item>
  199. <!--预计出库日期-->
  200. <el-form-item label="预计出库日期" span="1" prop="predictDate" class="deliverydate">
  201. <el-date-picker
  202. v-model="dataList.predictDate"
  203. type="date"
  204. placeholder="请选择预计出库日期"
  205. value-format="yyyy-MM-dd"
  206. />
  207. </el-form-item>
  208. <!--预估运费(元/吨)-->
  209. <!-- <el-form-item label="预估运费(元/吨)" span="1" >
  210. <el-input v-model="dataList.estimatedFreight" placeholder="请输入预估运费"
  211. maxlength="20" size="small" />
  212. </el-form-item> -->
  213. <!--发货人-->
  214. <el-form-item label="发货人">
  215. <el-select
  216. v-model="dataList.agent"
  217. placeholder="请选择发货人"
  218. filterable
  219. disabled
  220. @change="selectstaff"
  221. >
  222. <el-option
  223. v-for="item in options"
  224. :key="item.value"
  225. :label="item.staffName"
  226. :value="item.staffName"
  227. />
  228. </el-select>
  229. </el-form-item>
  230. <!--业务描述=-->
  231. <el-form-item v-if="dataList.taskTypeKey != 3" label="业务描述" span="1">
  232. <el-input
  233. v-model="dataList.businessDescribe"
  234. placeholder="请输入业务描述,不超过150字"
  235. maxlength="150"
  236. size="large"
  237. class="yewu"
  238. />
  239. </el-form-item>
  240. </el-form>
  241. </div>
  242. <div
  243. v-show="dataList.taskTypeKey == 2||dataList.taskTypeKey == 4||(dataList.taskTypeKey == 3&&inOutFlag == 2)"
  244. class="center1"
  245. >
  246. <img
  247. style="position: relative; top: 40px; left: 300px;"
  248. width="19"
  249. height="19"
  250. src="../../../public/img/cangku.png"
  251. alt
  252. />
  253. <div class="small-title">
  254. <h3>
  255. 入库任务({{ dataList1.inOutTaskNo }})
  256. <span v-if="deletetask" style="color:red;">已删除</span>
  257. </h3>
  258. </div>
  259. <el-form v-if="!deletetask" ref="form" :model="form" label-width="140px">
  260. <!-- 仓库名 -->
  261. <el-form-item label="仓库名">
  262. <el-select v-model="dataList1.warehouseName" placeholder="请选择仓库名" class="typeselect" disabled>
  263. <el-option
  264. v-for="item in warehouseNameList"
  265. :key="item.constKey"
  266. :label="item.warehouseName"
  267. :value="item.warehouseName"
  268. />
  269. </el-select>
  270. </el-form-item>
  271. <!-- 入库类型 -->
  272. <el-form-item label="入库类型">
  273. <el-select
  274. :disabled="dataList.taskTypeKey == 3||dataList.taskTypeKey == 4"
  275. v-model="dataList1.inOutType"
  276. placeholder="请选择入库类型"
  277. class="typeselect"
  278. @change="selectstorageType1"
  279. >
  280. <el-option
  281. v-for="item in storageType1"
  282. :key="item.constKey"
  283. v-if="
  284. (dataList1.taskTypeKey == 2 &&
  285. item.constValue != '移库入库') ||
  286. (dataList1.taskTypeKey == 3 &&
  287. item.constValue == '移库入库') ||
  288. (dataList1.taskTypeKey == 4 && item.constValue == '退库')
  289. "
  290. :label="item.constValue"
  291. :value="item.constValue"
  292. />
  293. </el-select>
  294. </el-form-item>
  295. <!-- 合同编号 -->
  296. <el-form-item v-if="dataList1.taskTypeKey != 3" label="合同编号">
  297. <el-select
  298. @change="changecontract1"
  299. v-model="dataList1.contractNo"
  300. placeholder="请输入合同编号"
  301. class="typeselect"
  302. >
  303. <el-option
  304. v-for="item in contractNoList"
  305. :key="item.constKey"
  306. :label="item.contractNo"
  307. :value="item.contractNo"
  308. ></el-option>
  309. </el-select>
  310. </el-form-item>
  311. <el-form-item v-if="dataList1.taskTypeKey == 3" label="移库任务编号">
  312. <el-input
  313. disabled
  314. v-model="dataList.moveTaskNo"
  315. placeholder="请输入移库任务编号"
  316. size="small"
  317. />
  318. </el-form-item>
  319. <!-- 货名 -->
  320. <el-form-item label="货名" class="huom">
  321. <el-select
  322. :disabled="dataList.taskTypeKey != 3"
  323. v-model="dataList1.goodsName"
  324. placeholder="货名"
  325. class="huom"
  326. @change="selectgoodsName1"
  327. >
  328. <el-option
  329. v-for="item in goodnameList"
  330. :key="item.constKey"
  331. :label="item.constValue"
  332. :value="item.constValue"
  333. ></el-option>
  334. </el-select>
  335. </el-form-item>
  336. <!--重量(吨)-->
  337. <el-form-item label="重量(吨)" span="1" style=" margin-left: 350px; margin-top: -40px">
  338. <el-input
  339. @input="weightchange"
  340. v-model="dataList1.weight"
  341. placeholder="请输入重量(吨)"
  342. maxlength="120"
  343. size="small"
  344. class="huom"
  345. />
  346. </el-form-item>
  347. <!-- 品级 -->
  348. <el-form-item label="品级">
  349. <el-select
  350. :disabled="dataList.taskTypeKey == 3"
  351. v-model="dataList1.grade"
  352. placeholder
  353. class="typeselect"
  354. @change="selectpackingMethod1"
  355. >
  356. <el-option
  357. v-for="item in gradeList"
  358. :key="item.constKey"
  359. :label="item.constValue"
  360. :value="item.constValue"
  361. />
  362. </el-select>
  363. </el-form-item>
  364. <!--容重(克/升)>=-->
  365. <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="容重(克/升)>=">
  366. <el-input
  367. @input="bulkDensitychange"
  368. :disabled="dataList.taskTypeKey == 3"
  369. v-model="dataList1.bulkDensity"
  370. placeholder="请输入容重"
  371. maxlength="120"
  372. size="small"
  373. class="huom"
  374. />
  375. </el-form-item>
  376. <!--水分(%)<=-->
  377. <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="水分(%)<=" span="1" style=" margin-left: 350px; margin-top: -40px">
  378. <el-input
  379. @input="waterContentchange"
  380. :disabled="dataList.taskTypeKey == 3"
  381. v-model="dataList1.waterContent"
  382. placeholder="请输入水分占比"
  383. maxlength="120"
  384. size="small"
  385. class="huom"
  386. />
  387. </el-form-item>
  388. <!--单价(元/吨)-->
  389. <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="单价(元/吨)" span="1" style=" margin-left: 650px; margin-top: -40px" v-show="Pricetype">
  390. <el-input
  391. @input="unitPricechange"
  392. :disabled="dataList.taskTypeKey == 3"
  393. v-model="dataList1.unitPrice"
  394. placeholder="请输入单价"
  395. maxlength="120"
  396. size="small"
  397. class="huom"
  398. />
  399. </el-form-item>
  400. <!--预计出库日期-->
  401. <el-form-item label="预计入库日期" span="1" prop="predictDate" class="deliverydate">
  402. <el-date-picker
  403. v-model="dataList1.predictDate"
  404. type="date"
  405. placeholder="请选择预计入库日期"
  406. value-format="yyyy-MM-dd"
  407. />
  408. </el-form-item>
  409. <!--预估运费(元/吨)-->
  410. <!-- <el-form-item label="预估运费(元/吨)" span="1" >
  411. <el-input v-model="dataList1.estimatedFreight" placeholder="请输入预估运费"
  412. maxlength="20" size="small" />
  413. </el-form-item> -->
  414. <!-- 经办人-->
  415. <el-form-item label="收货人">
  416. <el-select
  417. v-model="dataList1.agent"
  418. placeholder="请选择收货人"
  419. filterable
  420. disabled
  421. @change="selectstaff1"
  422. >
  423. <el-option
  424. v-for="item in options"
  425. :key="item.value"
  426. :label="item.staffName"
  427. :value="item.staffName"
  428. />
  429. </el-select>
  430. </el-form-item>
  431. <!--业务描述=-->
  432. <el-form-item v-if="dataList.taskTypeKey != 4" label="业务描述">
  433. <el-input
  434. v-model="dataList1.businessDescribe"
  435. placeholder="请输入业务描述,不超过150字"
  436. maxlength="150"
  437. size="large"
  438. />
  439. </el-form-item>
  440. </el-form>
  441. </div>
  442. <div v-if="dataList.taskTypeKey == 4" class="center1">
  443. <!--出库=-->
  444. <div class="small-title">
  445. <img
  446. style="position: relative; top: 40px; left: -22px;"
  447. width="19"
  448. height="19"
  449. src="../../../public/img/cangku.png"
  450. alt
  451. />
  452. <h3>出库任务({{ inOutTaskNo }})</h3>
  453. </div>
  454. <el-form ref="dataList" :model="dataList" label-width="140px">
  455. <!-- 仓库名 -->
  456. <el-form-item label="仓库名">
  457. <el-select
  458. v-model="dataList.warehouseName"
  459. placeholder="请选择仓库名"
  460. class="typeselect"
  461. @change="selectwarehouseName"
  462. disabled
  463. >
  464. <el-option
  465. v-for="item in warehouseNameList"
  466. :key="item.constKey"
  467. :label="item.warehouseName"
  468. :value="item.id"
  469. />
  470. </el-select>
  471. </el-form-item>
  472. <!-- 出库类型 -->
  473. <el-form-item label="出库类型">
  474. <el-select
  475. :disabled="dataList.taskTypeKey == 3||dataList.taskTypeKey == 4"
  476. v-model="dataList.inOutType"
  477. placeholder="请选择出库类型"
  478. class="typeselect"
  479. @change="selectstorageType"
  480. >
  481. <el-option
  482. v-for="item in storageType"
  483. :key="item.constKey"
  484. v-if="
  485. (dataList.taskTypeKey == 1 &&
  486. item.constValue != '移库出库') ||
  487. (dataList.taskTypeKey == 3 &&
  488. item.constValue == '移库出库') ||
  489. (dataList.taskTypeKey == 4 && item.constValue == '销售出库')
  490. "
  491. :label="item.constValue"
  492. :value="item.constValue"
  493. />
  494. </el-select>
  495. </el-form-item>
  496. <!-- 合同编号 -->
  497. <el-form-item v-if="dataList.taskTypeKey != 3" label="合同编号">
  498. <el-select
  499. @change="changecontract"
  500. v-model="dataList.contractNo"
  501. placeholder="请输入合同编号"
  502. class="typeselect"
  503. >
  504. <el-option
  505. v-for="item in contractNoList"
  506. :key="item.constKey"
  507. :label="item.contractNo"
  508. :value="item.contractNo"
  509. ></el-option>
  510. </el-select>
  511. </el-form-item>
  512. <el-form-item v-if="dataList.taskTypeKey == 3" label="移库任务编号">
  513. <el-input
  514. disabled
  515. v-model="dataList.moveTaskNo"
  516. placeholder="请输入移库任务编号"
  517. size="small"
  518. />
  519. </el-form-item>
  520. <!-- 货名 -->
  521. <el-form-item label="货名" class="huom">
  522. <el-select
  523. :disabled="dataList.taskTypeKey != 3"
  524. v-model="dataList.goodsName"
  525. placeholder="货名"
  526. class="huom"
  527. @change="selectgoodsName"
  528. >
  529. <el-option
  530. v-for="item in goodnameList"
  531. :key="item.constKey"
  532. :label="item.constValue"
  533. :value="item.constValue"
  534. ></el-option>
  535. </el-select>
  536. </el-form-item>
  537. <!--重量(吨)-->
  538. <el-form-item label="重量(吨)" span="1" style=" margin-left: 350px; margin-top: -40px">
  539. <el-input
  540. :disabled="dataList.taskTypeKey == 4"
  541. v-model="dataList.weight"
  542. placeholder="请输入重量(吨)"
  543. maxlength="120"
  544. size="small"
  545. class="huom"
  546. />
  547. </el-form-item>
  548. <!-- 品级 -->
  549. <el-form-item label="品级">
  550. <el-select
  551. :disabled="dataList.taskTypeKey == 3||dataList.taskTypeKey == 4"
  552. v-model="dataList.grade"
  553. placeholder
  554. class="typeselect"
  555. @change="selectpackingMethod"
  556. >
  557. <el-option
  558. v-for="item in gradeList"
  559. :key="item.constKey"
  560. :label="item.constValue"
  561. :value="item.constValue"
  562. />
  563. </el-select>
  564. </el-form-item>
  565. <!--容重(克/升)>=-->
  566. <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="容重(克/升)>=">
  567. <el-input
  568. :disabled="dataList.taskTypeKey == 3||dataList.taskTypeKey == 4"
  569. v-model="dataList.bulkDensity"
  570. placeholder="请输入容重"
  571. maxlength="120"
  572. size="small"
  573. class="huom"
  574. />
  575. </el-form-item>
  576. <!--水分(%)<=-->
  577. <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="水分(%)<=" span="1" style=" margin-left: 350px; margin-top: -40px">
  578. <el-input
  579. :disabled="dataList.taskTypeKey == 3||dataList.taskTypeKey == 4"
  580. v-model="dataList.waterContent"
  581. placeholder="请输入水分占比"
  582. maxlength="120"
  583. size="small"
  584. class="huom"
  585. />
  586. </el-form-item>
  587. <!--单价(元/吨)-->
  588. <el-form-item v-if='dataList.taskTypeKey != 3||dataList1.taskTypeKey != 3' label="单价(元/吨)" span="1" style=" margin-left: 650px; margin-top: -40px" v-show="Pricetype">
  589. <el-input
  590. :disabled="dataList.taskTypeKey == 3||dataList.taskTypeKey == 4"
  591. v-model="dataList.unitPrice"
  592. placeholder="请输入单价"
  593. maxlength="120"
  594. size="small"
  595. class="huom"
  596. />
  597. </el-form-item>
  598. <!--预计出库日期-->
  599. <el-form-item label="预计出库日期" span="1" prop="predictDate" class="deliverydate">
  600. <el-date-picker
  601. v-model="dataList.predictDate"
  602. type="date"
  603. placeholder="请选择预计出库日期"
  604. value-format="yyyy-MM-dd"
  605. />
  606. </el-form-item>
  607. <!--预估运费(元/吨)-->
  608. <!-- <el-form-item label="预估运费(元/吨)" span="1" >
  609. <el-input v-model="dataList.estimatedFreight" placeholder="请输入预估运费"
  610. maxlength="20" size="small" />
  611. </el-form-item> -->
  612. <!--发货人-->
  613. <el-form-item label="出库发货人">
  614. <el-select
  615. v-model="dataList.agent"
  616. placeholder="请选择发货人"
  617. filterable
  618. disabled
  619. @change="selectstaff"
  620. >
  621. <el-option
  622. v-for="item in options"
  623. :key="item.value"
  624. :label="item.staffName"
  625. :value="item.staffName"
  626. />
  627. </el-select>
  628. </el-form-item>
  629. <!--业务描述=-->
  630. <el-form-item label="业务描述">
  631. <el-input
  632. v-model="dataList.businessDescribe"
  633. placeholder="请输入业务描述,不超过150字"
  634. maxlength="150"
  635. size="large"
  636. />
  637. </el-form-item>
  638. </el-form>
  639. </div>
  640. </div>
  641. <!-- 提交 -->
  642. <div style="text-align: right; padding: 10px" class="center">
  643. <el-button class="bg-bottom" type="primary" size="small" @click="submit()">提交</el-button>
  644. </div>
  645. </div>
  646. </template>
  647. <script>
  648. import {
  649. getwarehousename,
  650. xialaNo,
  651. addoreditoutput,
  652. outexamine,
  653. getGoodsName
  654. } from '@/model/tasksport/index'
  655. import { pullDown, getstaff } from '@/model/warehouse/index'
  656. import { downloadFile } from '@/utils/batchDown'
  657. import Pagination from '@/components/Pagination'
  658. import { mapGetters } from 'vuex'
  659. import WsUpload from '@/components/WsUpload'
  660. // import { dayjs, fmoney, EventBus } from 'base-core-lib'
  661. import { dayjs, EventBus } from 'base-core-lib'
  662. export default {
  663. name: 'viewSpareMoney',
  664. components: {
  665. WsUpload,
  666. Pagination
  667. },
  668. watch: {
  669. // vesselId(val) {
  670. // this.getList()
  671. // },
  672. isShow(val) {
  673. this.showType = val
  674. }
  675. },
  676. computed: {
  677. ...mapGetters(['deptBudgetList'])
  678. },
  679. data() {
  680. return {
  681. //弹出框
  682. dialogViewSpareMoney: false,
  683. dialogApproveFormVisible: false,
  684. // 船舶类型
  685. monetaryKey: null,
  686. // 表格显示数据
  687. tableDate: [],
  688. // 是否显示
  689. showType: true,
  690. disabled: false,
  691. // 年
  692. year: '',
  693. contractNoList: [],
  694. deptBudgetTotal: 0,
  695. readonly: true,
  696. currentPage: 1,
  697. pageSize: 10,
  698. searchType: 1,
  699. searchKeyWord: '',
  700. radio: '1',
  701. contractType: 2,
  702. startDate: null,
  703. endDate: null,
  704. goodnameList: [],
  705. checked: true,
  706. form: {},
  707. staffList: [],
  708. options: [],
  709. storageType: [],
  710. storageType1: [],
  711. outContractNo: [],
  712. // 提交类型
  713. submitType: true,
  714. status: [],
  715. warehouseNameList: [],
  716. warehouseNameList1: [],
  717. appendixIdsAdd: '',
  718. uploadSuccess: {},
  719. warehouseInOutDetail: {},
  720. onChange: {},
  721. deptBudgetList1: [],
  722. gradeList: [],
  723. deletetask: false,
  724. rules: {
  725. netWeight: [
  726. {
  727. required: true,
  728. type: 'number',
  729. message: '请输入活动名称',
  730. trigger: 'blur'
  731. }
  732. ]
  733. },
  734. size: 10,
  735. compId: localStorage.getItem('ws-pf_compId'),
  736. deptCircularPage: {},
  737. packtypeList: {},
  738. date: {
  739. year: dayjs().format('YYYY'),
  740. month: dayjs().format('MM')
  741. },
  742. contractList: [],
  743. inOutTaskNo: '',
  744. inOutTaskNo1: '',
  745. dataList: { taskTypeKey: '1' },
  746. dataList1: { taskTypeKey: '1' },
  747. historyList: [],
  748. pickerBeginDateBefore: {
  749. disabledDate: time => {
  750. return time.getTime() > Date.now()
  751. }
  752. },
  753. accessoryTFs: false,
  754. inOutFlag: 1,
  755. Pricetype :true
  756. }
  757. },
  758. activated() {
  759. this.getList()
  760. },
  761. methods: {
  762. //返回按钮
  763. revert() {
  764. this.$router.go(-1)
  765. },
  766. returnsales() {
  767. this.$router.go(-1)
  768. this.$router.push({ path: 'tranManagementWarehouseInOuttask' })
  769. },
  770. // 获取当前年月日
  771. getdate() {
  772. var date = new Date()
  773. var year = date.getFullYear() //获取完整的年份(4位)
  774. var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
  775. var datetime = date.getDate() //获取当前日(1-31)
  776. if (mouth < 10) {
  777. mouth = '0' + mouth
  778. }
  779. if (datetime < 10) {
  780. datetime = '0' + datetime
  781. }
  782. return year + '' + mouth + datetime
  783. },
  784. // 随机验证码
  785. verifyinit() {
  786. var arr = []
  787. for (var i = 48; i < 123; i++) {
  788. if (i > 57 && i < 65) continue
  789. if (i > 90) continue
  790. arr.push(String.fromCharCode(i))
  791. }
  792. arr.sort(function() {
  793. return Math.random() - 0.5
  794. })
  795. arr.length = 4
  796. return arr.join('')
  797. },
  798. selectTaskNo(e) {
  799. if (this.dataList.taskTypeKey == 3) {
  800. this.dataList1.moveTaskNo = e
  801. }
  802. },
  803. dataFilter(val) {
  804. // console.log(val,"名")
  805. this.deptBudgetList.staffList = val
  806. if (val) {
  807. //val存在
  808. this.options = this.staffList.filter(item => {
  809. if (
  810. !!~item.staffName.indexOf(val) ||
  811. !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
  812. ) {
  813. return true
  814. }
  815. })
  816. } else {
  817. //val为空时,还原数组
  818. this.options = this.staffList
  819. }
  820. },
  821. weightchange(e) {
  822. if (this.dataList.taskTypeKey == 4) {
  823. this.$set(this.dataList, 'weight', e)
  824. }
  825. },
  826. bulkDensitychange(e) {
  827. if (this.dataList.taskTypeKey == 4) {
  828. this.$set(this.dataList, 'bulkDensity', e)
  829. } else if (this.dataList1.taskTypeKey == 3) {
  830. this.$set(this.dataList1, 'bulkDensity', e)
  831. }
  832. },
  833. waterContentchange(e) {
  834. if (this.dataList.taskTypeKey == 4) {
  835. this.$set(this.dataList, 'waterContent', e)
  836. } else if (this.dataList1.taskTypeKey == 3) {
  837. this.$set(this.dataList1, 'waterContent', e)
  838. }
  839. },
  840. unitPricechange(e) {
  841. if (this.dataList.taskTypeKey == 4) {
  842. this.$set(this.dataList, 'unitPrice', e)
  843. } else if (this.dataList1.taskTypeKey == 3) {
  844. this.$set(this.dataList1, 'unitPrice', e)
  845. }
  846. },
  847. changecontract(e) {
  848. if (this.dataList.taskTypeKey != 3) {
  849. for (let i = 0; i < this.contractNoList.length; i++) {
  850. if (this.contractNoList[i].contractNo == e) {
  851. if(this.contractNoList[i].priceType == "随行就市"){
  852. this.Pricetype = false
  853. }else{
  854. this.Pricetype = true
  855. }
  856. getGoodsName({
  857. contractId: this.contractNoList[i].id,
  858. contractNo: this.contractNoList[i].contractNo
  859. })
  860. .toPromise()
  861. .then(response => {
  862. this.$set(this.dataList, 'goodsName', response.goodsName)
  863. this.$set(this.dataList, 'goodsNameKey', response.goodsNameKey)
  864. this.$set(this.dataList, 'grade', response.grade)
  865. this.$set(this.dataList, 'gradeKey', response.gradeKey)
  866. this.$set(this.dataList, 'waterContent', response.waterContent)
  867. this.$set(this.dataList, 'bulkDensity', response.bulkDensity)
  868. // this.$set(this.dataList, 'weight', response.weight)
  869. this.$set(
  870. this.dataList,
  871. 'unitPrice',
  872. response.unitContractPrice
  873. )
  874. })
  875. }
  876. }
  877. }
  878. },
  879. changecontract1(e) {
  880. if (this.dataList1.taskTypeKey != 3) {
  881. for (let i = 0; i < this.contractNoList.length; i++) {
  882. if (this.contractNoList[i].contractNo == e) {
  883. if(this.contractNoList[i].priceType == "随行就市"){
  884. this.Pricetype = false
  885. }else{
  886. this.Pricetype = true
  887. }
  888. getGoodsName({
  889. contractId: this.contractNoList[i].id,
  890. contractNo: this.contractNoList[i].contractNo
  891. })
  892. .toPromise()
  893. .then(response => {
  894. this.$set(this.dataList1, 'goodsName', response.goodsName)
  895. this.$set(this.dataList1, 'goodsNameKey', response.goodsNameKey)
  896. this.$set(this.dataList1, 'grade', response.grade)
  897. this.$set(this.dataList1, 'gradeKey', response.gradeKey)
  898. this.$set(this.dataList1, 'waterContent', response.waterContent)
  899. this.$set(this.dataList1, 'bulkDensity', response.bulkDensity)
  900. this.$set(this.dataList1, 'weight', response.weight)
  901. this.$set(
  902. this.dataList1,
  903. 'unitPrice',
  904. response.unitContractPrice
  905. )
  906. })
  907. }
  908. }
  909. }
  910. },
  911. selectstaff(e) {
  912. for (var i = 0; i < this.staffList.length; i++) {
  913. if (this.staffList[i].staffName == e) {
  914. this.dataList.agentKey = this.staffList[i].staffId
  915. }
  916. }
  917. },
  918. selectstaff1(e) {
  919. for (var i = 0; i < this.staffList.length; i++) {
  920. if (this.staffList[i].staffName == e) {
  921. this.dataList1.agentKey = this.staffList[i].staffId
  922. }
  923. }
  924. },
  925. requestadd(list, status) {
  926. list.compId = localStorage.getItem('ws-pf_compId')
  927. list.publisher =
  928. localStorage.getItem('ws-pf_roleName') +
  929. localStorage.getItem('ws-pf_staffName')
  930. addoreditoutput(list)
  931. .toPromise()
  932. .then(response => {
  933. this.$message.success('编辑成功')
  934. // this.$router.go(-1)
  935. this.$router.push({ path: 'tranManagementWarehouseInOuttask' })
  936. })
  937. },
  938. //提交按钮
  939. submit() {
  940. this.dataList.inOutFlag = 1
  941. this.dataList1.inOutFlag = 2
  942. if (this.dataList.taskTypeKey == 1) {
  943. if (!this.dataList.warehouseName) {
  944. this.$message({
  945. message: '仓库名不能为空!',
  946. type: 'warning'
  947. })
  948. return
  949. }
  950. if (!this.dataList.contractNo) {
  951. this.$message({
  952. message: '合同编号不能为空!',
  953. type: 'warning'
  954. })
  955. return
  956. }
  957. if (!this.dataList.weight) {
  958. this.$message({
  959. message: '重量(吨)不能为空!',
  960. type: 'warning'
  961. })
  962. return
  963. }
  964. if (
  965. isNaN(this.dataList.weight) ||
  966. (String(this.dataList.weight).indexOf('.') != -1 &&
  967. String(this.dataList.weight).length -
  968. (String(this.dataList.weight).indexOf('.') + 1) >
  969. 2) ||
  970. this.dataList.weight < 0 ||
  971. this.dataList.weight > 200000
  972. ) {
  973. this.$message({
  974. message: '重量(吨)输入有误!',
  975. type: 'warning'
  976. })
  977. return
  978. }
  979. if (!this.dataList.bulkDensity) {
  980. this.$message({
  981. message: '容重不能为空!',
  982. type: 'warning'
  983. })
  984. return
  985. }
  986. if (
  987. this.dataList.bulkDensity < 0 ||
  988. this.dataList.bulkDensity > 1000
  989. ) {
  990. this.$message({
  991. message: '容重输入错误',
  992. type: 'warning'
  993. })
  994. return
  995. }
  996. if (
  997. String(this.dataList.bulkDensity).indexOf('.') != -1 &&
  998. String(this.dataList.bulkDensity).length -
  999. (String(this.dataList.bulkDensity).indexOf('.') + 1) >
  1000. 0
  1001. ) {
  1002. this.$message({
  1003. message: '容重需输入整数',
  1004. type: 'warning'
  1005. })
  1006. return
  1007. }
  1008. if (!this.dataList.waterContent) {
  1009. this.$message({
  1010. message: '水分不能为空!',
  1011. type: 'warning'
  1012. })
  1013. return
  1014. }
  1015. if (this.dataList.waterContent < 0 || this.dataList.waterContent > 40) {
  1016. this.$message({
  1017. message: '水分输入错误',
  1018. type: 'warning'
  1019. })
  1020. return
  1021. }
  1022. if (
  1023. String(this.dataList.waterContent).indexOf('.') != -1 &&
  1024. String(this.dataList.waterContent).length -
  1025. (String(this.dataList.waterContent).indexOf('.') + 1) >
  1026. 1
  1027. ) {
  1028. this.$message({
  1029. message: '水分输入错误',
  1030. type: 'warning'
  1031. })
  1032. return
  1033. }
  1034. if (!this.dataList.unitPrice) {
  1035. this.$message({
  1036. message: '单价不能为空!',
  1037. type: 'warning'
  1038. })
  1039. return
  1040. }
  1041. if (
  1042. (this.dataList.unitPrice &&
  1043. String(this.dataList.unitPrice).indexOf('.') != -1 &&
  1044. String(this.dataList.unitPrice).length -
  1045. (String(this.dataList.unitPrice).indexOf('.') + 1) >
  1046. 2) ||
  1047. this.dataList.unitPrice > 100000 ||
  1048. this.dataList.unitPrice < 1
  1049. ) {
  1050. this.$message({
  1051. message: '单价输入错误',
  1052. type: 'warning'
  1053. })
  1054. return
  1055. }
  1056. if (!this.dataList.predictDate) {
  1057. this.$message({
  1058. message: '预计出库日期不能为空!',
  1059. type: 'warning'
  1060. })
  1061. return
  1062. }
  1063. // if (!this.dataList.agent) {
  1064. // this.$message({
  1065. // message: '出库经办人不能为空!',
  1066. // type: 'warning'
  1067. // })
  1068. // return
  1069. // }
  1070. if (!this.dataList.businessDescribe) {
  1071. this.$message({
  1072. message: '业务描述不能为空!',
  1073. type: 'warning'
  1074. })
  1075. return
  1076. }
  1077. this.requestadd(this.dataList)
  1078. } else if (this.dataList1.taskTypeKey == 2) {
  1079. if (!this.dataList1.warehouseName) {
  1080. this.$message({
  1081. message: '仓库名不能为空!',
  1082. type: 'warning'
  1083. })
  1084. return
  1085. }
  1086. if (!this.dataList1.contractNo) {
  1087. this.$message({
  1088. message: '合同编号不能为空!',
  1089. type: 'warning'
  1090. })
  1091. return
  1092. }
  1093. if (!this.dataList1.weight) {
  1094. this.$message({
  1095. message: '重量(吨)不能为空!',
  1096. type: 'warning'
  1097. })
  1098. return
  1099. }
  1100. if (
  1101. isNaN(this.dataList1.weight) ||
  1102. (String(this.dataList1.weight).indexOf('.') != -1 &&
  1103. String(this.dataList1.weight).length -
  1104. (String(this.dataList1.weight).indexOf('.') + 1) >
  1105. 2) ||
  1106. this.dataList1.weight < 0 ||
  1107. this.dataList1.weight > 200000
  1108. ) {
  1109. this.$message({
  1110. message: '重量(吨)输入有误!',
  1111. type: 'warning'
  1112. })
  1113. return
  1114. }
  1115. if (!this.dataList1.bulkDensity) {
  1116. this.$message({
  1117. message: '容重不能为空!',
  1118. type: 'warning'
  1119. })
  1120. return
  1121. }
  1122. if (
  1123. this.dataList1.bulkDensity < 0 ||
  1124. this.dataList1.bulkDensity > 1000
  1125. ) {
  1126. this.$message({
  1127. message: '容重输入错误',
  1128. type: 'warning'
  1129. })
  1130. return
  1131. }
  1132. if (
  1133. String(this.dataList1.bulkDensity).indexOf('.') != -1 &&
  1134. String(this.dataList1.bulkDensity).length -
  1135. (String(this.dataList1.bulkDensity).indexOf('.') + 1) >
  1136. 0
  1137. ) {
  1138. this.$message({
  1139. message: '容重需输入整数',
  1140. type: 'warning'
  1141. })
  1142. return
  1143. }
  1144. if (!this.dataList1.waterContent) {
  1145. this.$message({
  1146. message: '水分不能为空!',
  1147. type: 'warning'
  1148. })
  1149. return
  1150. }
  1151. if (
  1152. this.dataList1.waterContent < 0 ||
  1153. this.dataList1.waterContent > 40
  1154. ) {
  1155. this.$message({
  1156. message: '水分输入错误',
  1157. type: 'warning'
  1158. })
  1159. return
  1160. }
  1161. if (
  1162. String(this.dataList1.waterContent).indexOf('.') != -1 &&
  1163. String(this.dataList1.waterContent).length -
  1164. (String(this.dataList1.waterContent).indexOf('.') + 1) >
  1165. 1
  1166. ) {
  1167. this.$message({
  1168. message: '水分输入错误',
  1169. type: 'warning'
  1170. })
  1171. return
  1172. }
  1173. if (!this.dataList1.unitPrice) {
  1174. this.$message({
  1175. message: '单价不能为空!',
  1176. type: 'warning'
  1177. })
  1178. return
  1179. }
  1180. if (
  1181. (this.dataList1.unitPrice &&
  1182. String(this.dataList1.unitPrice).indexOf('.') != -1 &&
  1183. String(this.dataList1.unitPrice).length -
  1184. (String(this.dataList1.unitPrice).indexOf('.') + 1) >
  1185. 2) ||
  1186. this.dataList1.unitPrice > 100000 ||
  1187. this.dataList1.unitPrice < 1
  1188. ) {
  1189. this.$message({
  1190. message: '单价输入错误',
  1191. type: 'warning'
  1192. })
  1193. return
  1194. }
  1195. if (!this.dataList1.predictDate) {
  1196. this.$message({
  1197. message: '预计入库日期不能为空!',
  1198. type: 'warning'
  1199. })
  1200. return
  1201. }
  1202. // if (!this.dataList1.agent) {
  1203. // this.$message({
  1204. // message: '入库经办人不能为空!',
  1205. // type: 'warning'
  1206. // })
  1207. // return
  1208. // }
  1209. if (!this.dataList1.businessDescribe) {
  1210. this.$message({
  1211. message: '业务描述不能为空!',
  1212. type: 'warning'
  1213. })
  1214. return
  1215. }
  1216. this.requestadd(this.dataList1)
  1217. } else if (
  1218. this.dataList.taskTypeKey == 3 ||
  1219. this.dataList.taskTypeKey == 4
  1220. ) {
  1221. if (!this.dataList.warehouseName) {
  1222. this.$message({
  1223. message: '出库仓库名不能为空!',
  1224. type: 'warning'
  1225. })
  1226. return
  1227. }
  1228. if (!this.dataList1.warehouseName) {
  1229. this.$message({
  1230. message: '入库仓库名不能为空!',
  1231. type: 'warning'
  1232. })
  1233. return
  1234. }
  1235. if (!this.dataList1.moveTaskNo) {
  1236. this.$message({
  1237. message: '移库任务编号不能为空!',
  1238. type: 'warning'
  1239. })
  1240. return
  1241. }
  1242. if (!this.dataList1.weight) {
  1243. this.$message({
  1244. message: '重量(吨)不能为空!',
  1245. type: 'warning'
  1246. })
  1247. return
  1248. }
  1249. if (
  1250. isNaN(this.dataList1.weight) ||
  1251. (String(this.dataList1.weight).indexOf('.') != -1 &&
  1252. String(this.dataList1.weight).length -
  1253. (String(this.dataList1.weight).indexOf('.') + 1) >
  1254. 2) ||
  1255. this.dataList1.weight < 0 ||
  1256. this.dataList1.weight > 200000
  1257. ) {
  1258. this.$message({
  1259. message: '重量(吨)输入有误!',
  1260. type: 'warning'
  1261. })
  1262. return
  1263. }
  1264. if( this.dataList.taskTypeKey != 3||this.dataList1.taskTypeKey != 3){
  1265. if (!this.dataList1.bulkDensity) {
  1266. this.$message({
  1267. message: '容重不能为空!',
  1268. type: 'warning'
  1269. })
  1270. return
  1271. }
  1272. if (
  1273. this.dataList1.bulkDensity < 0 ||
  1274. this.dataList1.bulkDensity > 1000
  1275. ) {
  1276. this.$message({
  1277. message: '容重输入错误',
  1278. type: 'warning'
  1279. })
  1280. return
  1281. }
  1282. if (
  1283. String(this.dataList1.bulkDensity).indexOf('.') != -1 &&
  1284. String(this.dataList1.bulkDensity).length -
  1285. (String(this.dataList1.bulkDensity).indexOf('.') + 1) >
  1286. 0
  1287. ) {
  1288. this.$message({
  1289. message: '容重需输入整数',
  1290. type: 'warning'
  1291. })
  1292. return
  1293. }
  1294. if (!this.dataList1.waterContent) {
  1295. this.$message({
  1296. message: '水分不能为空!',
  1297. type: 'warning'
  1298. })
  1299. return
  1300. }
  1301. if (
  1302. this.dataList1.waterContent < 0 ||
  1303. this.dataList1.waterContent > 40
  1304. ) {
  1305. this.$message({
  1306. message: '水分输入错误',
  1307. type: 'warning'
  1308. })
  1309. return
  1310. }
  1311. if (
  1312. String(this.dataList1.waterContent).indexOf('.') != -1 &&
  1313. String(this.dataList1.waterContent).length -
  1314. (String(this.dataList1.waterContent).indexOf('.') + 1) >
  1315. 1
  1316. ) {
  1317. this.$message({
  1318. message: '水分输入错误',
  1319. type: 'warning'
  1320. })
  1321. return
  1322. }
  1323. if (!this.dataList1.unitPrice) {
  1324. this.$message({
  1325. message: '单价不能为空!',
  1326. type: 'warning'
  1327. })
  1328. return
  1329. }
  1330. if (
  1331. (this.dataList1.unitPrice &&
  1332. String(this.dataList1.unitPrice).indexOf('.') != -1 &&
  1333. String(this.dataList1.unitPrice).length -
  1334. (String(this.dataList1.unitPrice).indexOf('.') + 1) >
  1335. 2) ||
  1336. this.dataList1.unitPrice > 100000 ||
  1337. this.dataList1.unitPrice < 1
  1338. ) {
  1339. this.$message({
  1340. message: '单价输入错误',
  1341. type: 'warning'
  1342. })
  1343. return
  1344. }
  1345. }
  1346. if (!this.dataList.predictDate) {
  1347. this.$message({
  1348. message: '预计出库日期不能为空!',
  1349. type: 'warning'
  1350. })
  1351. return
  1352. }
  1353. if (!this.dataList1.predictDate) {
  1354. this.$message({
  1355. message: '预计入库日期不能为空!',
  1356. type: 'warning'
  1357. })
  1358. return
  1359. }
  1360. // if (!this.dataList.agent) {
  1361. // this.$message({
  1362. // message: '出库经办人不能为空!',
  1363. // type: 'warning'
  1364. // })
  1365. // return
  1366. // }
  1367. // if (!this.dataList1.agent) {
  1368. // this.$message({
  1369. // message: '入库经办人不能为空!',
  1370. // type: 'warning'
  1371. // })
  1372. // return
  1373. // }
  1374. if (!this.dataList1.businessDescribe) {
  1375. this.$message({
  1376. message: '业务描述不能为空!',
  1377. type: 'warning'
  1378. })
  1379. return
  1380. }
  1381. this.dataList.relevanceId = this.GetRandomNum(100000, 999999)
  1382. if (this.dataList.taskTypeKey == 3) {
  1383. this.dataList.businessDescribe = this.dataList1.businessDescribe
  1384. } else {
  1385. this.dataList1.businessDescribe = this.dataList.businessDescribe
  1386. }
  1387. this.requestadd(this.dataList, 'repetition')
  1388. this.dataList1.relevanceId = this.dataList.relevanceId
  1389. if (!this.deletetask) {
  1390. this.requestadd(this.dataList1, 'repetition')
  1391. }
  1392. }
  1393. },
  1394. selectwarehouseName(e) {
  1395. //经办人
  1396. getstaff({
  1397. compId: localStorage.getItem('ws-pf_compId'),
  1398. warehouseId: e
  1399. })
  1400. .toPromise()
  1401. .then(response => {
  1402. this.options = response
  1403. this.staffList = response
  1404. // this.agent = response
  1405. })
  1406. },
  1407. tarechange(e) {
  1408. if (this.dataList.grossWeight && this.dataList.tare) {
  1409. this.dataList.netWeight = Number(
  1410. this.dataList.grossWeight - this.dataList.tare
  1411. )
  1412. }
  1413. },
  1414. grossWeightchange(e) {
  1415. if (this.dataList.grossWeight && this.dataList.tare) {
  1416. this.dataList.netWeight = Number(
  1417. this.dataList.grossWeight - this.dataList.tare
  1418. )
  1419. }
  1420. },
  1421. selectgoodsName(e) {
  1422. for (var i = 0; i < this.goodnameList.length; i++) {
  1423. if (this.goodnameList[i].constValue == e) {
  1424. this.dataList.goodsNameKey = this.goodnameList[i].constKey
  1425. }
  1426. }
  1427. },
  1428. selectgoodsName1(e) {
  1429. for (var i = 0; i < this.goodnameList.length; i++) {
  1430. if (this.goodnameList[i].constValue == e) {
  1431. this.dataList1.goodsNameKey = this.goodnameList[i].constKey
  1432. }
  1433. }
  1434. },
  1435. selectpackingMethod(e) {
  1436. for (var i = 0; i < this.gradeList.length; i++) {
  1437. if (this.gradeList[i].constValue == e) {
  1438. this.dataList.gradeKey = this.gradeList[i].constKey
  1439. if (this.dataList.taskTypeKey == 3) {
  1440. this.$set(this.dataList1, 'grade', e)
  1441. this.$set(this.dataList1, 'gradeKey', this.gradeList[i].constKey)
  1442. }
  1443. }
  1444. }
  1445. },
  1446. selectpackingMethod1(e) {
  1447. for (var i = 0; i < this.gradeList.length; i++) {
  1448. if (this.gradeList[i].constValue == e) {
  1449. this.dataList1.packingMethodKey = this.gradeList[i].constKey
  1450. if (this.dataList1.taskTypeKey == 4) {
  1451. this.$set(this.dataList, 'grade', e)
  1452. this.$set(this.dataList, 'gradeKey', this.gradeList[i].constKey)
  1453. }
  1454. }
  1455. }
  1456. },
  1457. selectstorageType(e) {
  1458. for (var i = 0; i < this.storageType.length; i++) {
  1459. if (this.storageType[i].constValue == e) {
  1460. this.dataList.inOutTypeKey = this.storageType[i].constKey
  1461. }
  1462. }
  1463. },
  1464. selectstorageType1(e) {
  1465. for (var i = 0; i < this.storageType1.length; i++) {
  1466. if (this.storageType1[i].constValue == e) {
  1467. this.dataList1.inOutTypeKey = this.storageType1[i].constKey
  1468. }
  1469. }
  1470. },
  1471. handleClose() {
  1472. this.accessoryTFs = false
  1473. },
  1474. handleSizeChange(val) {
  1475. console.log(`每页 ${val} 条`)
  1476. this.pageSize = val
  1477. this.getList()
  1478. },
  1479. businessDescriptionchange(e) {
  1480. console.log(e)
  1481. },
  1482. handleCurrentChange(val) {
  1483. this.currentPage = val
  1484. console.log(`当前页: ${val}`)
  1485. this.getList()
  1486. },
  1487. tasknumber() {
  1488. if (this.dataList.taskTypeKey == 1) {
  1489. this.inOutTaskNo = 'CK' + this.getdate() + this.verifyinit()
  1490. } else if (this.dataList.taskTypeKey == 2) {
  1491. this.inOutTaskNo1 = 'RK' + this.getdate() + this.verifyinit()
  1492. } else if (this.dataList.taskTypeKey == 3) {
  1493. var random = this.getdate() + this.verifyinit()
  1494. this.inOutTaskNo = 'YKC' + random
  1495. this.inOutTaskNo1 = 'YKR' + random
  1496. } else if (this.dataList.taskTypeKey == 4) {
  1497. var random = this.getdate() + this.verifyinit()
  1498. this.inOutTaskNo = 'TCC' + random
  1499. this.inOutTaskNo1 = 'TCR' + random
  1500. }
  1501. },
  1502. tasktypechange(e) {
  1503. if (!this.$route.query.relevanceId) {
  1504. this.tasknumber()
  1505. }
  1506. this.dataList1.taskTypeKey = e
  1507. if (this.dataList.taskTypeKey == 1) {
  1508. this.dataList.inOutType = '销售出库'
  1509. this.dataList.inOutTypeKey = '1'
  1510. }
  1511. if (this.dataList1.taskTypeKey == 2) {
  1512. this.dataList1.inOutType = '采购入库'
  1513. this.dataList1.inOutTypeKey = '1'
  1514. } else if (this.dataList1.taskTypeKey == 3) {
  1515. this.disabled = true
  1516. this.dataList1.inOutType = '移库入库'
  1517. this.dataList1.inOutTypeKey = '3'
  1518. this.dataList.inOutType = '移库出库'
  1519. this.dataList.inOutTypeKey = '3'
  1520. } else if (this.dataList1.taskTypeKey == 4) {
  1521. this.disabled = true
  1522. this.dataList1.inOutType = '退库'
  1523. this.dataList1.inOutTypeKey = '6'
  1524. this.dataList.inOutType = '销售出库'
  1525. this.dataList.inOutTypeKey = '1'
  1526. }
  1527. },
  1528. GetRandomNum(Min, Max) {
  1529. var Range = Max - Min
  1530. var Rand = Math.random()
  1531. return Min + Math.round(Rand * Range)
  1532. },
  1533. getList() {
  1534. this.inOutFlag = this.$route.query.inOutFlag
  1535. if (this.$route.query.relevanceId) {
  1536. outexamine({ relevanceId: this.$route.query.relevanceId })
  1537. .toPromise()
  1538. .then(response => {
  1539. if (response.length > 1) {
  1540. this.dataList = response[0]
  1541. this.dataList1 = response[1]
  1542. console.log(this.dataList1.inOutTaskNo, '入库任务')
  1543. } else {
  1544. if (response[0].taskTypeKey == 3) {
  1545. this.deletetask = true
  1546. this.dataList1.inOutTaskNo =
  1547. 'YKR' +
  1548. response[0].inOutTaskNo.substr(
  1549. response[0].inOutTaskNo.indexOf('C') + 1,
  1550. response[0].inOutTaskNo.length
  1551. )
  1552. }
  1553. this.dataList = response[0]
  1554. if (response[0].taskTypeKey == 2) {
  1555. this.dataList1 = response[0]
  1556. } else {
  1557. // this.dataList = response[0]
  1558. }
  1559. }
  1560. })
  1561. } else {
  1562. this.tasknumber()
  1563. this.$set(this.dataList, 'inOutType', '销售出库')
  1564. this.$set(this.dataList, 'inOutTypeKey', '1')
  1565. this.$set(this.dataList, 'goodsName', '玉米')
  1566. this.$set(this.dataList, 'goodsNameKey', '1')
  1567. this.$set(this.dataList, 'grade', '一等品')
  1568. this.$set(this.dataList, 'gradeKey', '1')
  1569. this.$set(this.dataList1, 'goodsName', '玉米')
  1570. this.$set(this.dataList1, 'goodsNameKey', '1')
  1571. this.$set(this.dataList1, 'grade', '一等品')
  1572. this.$set(this.dataList1, 'gradeKey', '1')
  1573. }
  1574. // 货名
  1575. pullDown({ constId: 'CON2' })
  1576. .toPromise()
  1577. .then(response => {
  1578. this.goodnameList = response
  1579. })
  1580. // 品级
  1581. pullDown({ constId: 'CON3' })
  1582. .toPromise()
  1583. .then(response => {
  1584. this.gradeList = response
  1585. })
  1586. pullDown({ constId: 'CON6' })
  1587. .toPromise()
  1588. .then(response => {
  1589. this.storageType = response
  1590. })
  1591. pullDown({ constId: 'CON5' })
  1592. .toPromise()
  1593. .then(response => {
  1594. this.storageType1 = response
  1595. })
  1596. xialaNo({
  1597. compId: this.compId
  1598. })
  1599. .toPromise()
  1600. .then(response => {
  1601. this.contractNoList = response
  1602. for (let i = 0; i < this.contractNoList.length; i++) {
  1603. if (this.contractNoList[i].contractNo == this.dataList.contractNo) {
  1604. if(this.contractNoList[i].priceType == "随行就市"){
  1605. this.Pricetype = false
  1606. }else{
  1607. this.Pricetype = true
  1608. }
  1609. }
  1610. }
  1611. })
  1612. // //临时仓库入库类型
  1613. // pullDown({ constId: 'WARE1' })
  1614. // .toPromise()
  1615. // .then((response) => {
  1616. // this.storageType = respons
  1617. // })
  1618. // //临时仓库出库类型
  1619. // pullDown({ constId: 'WARE2' })
  1620. // .toPromise()
  1621. // .then((response) => {
  1622. // this.deliveryType = response
  1623. // })
  1624. //仓库名
  1625. getwarehousename({
  1626. compId: this.compId,
  1627. warehouseType: 1
  1628. })
  1629. .toPromise()
  1630. .then(response => {
  1631. this.warehouseNameList = response
  1632. })
  1633. getwarehousename({
  1634. compId: this.compId,
  1635. warehouseType: 2
  1636. })
  1637. .toPromise()
  1638. .then(response => {
  1639. this.warehouseNameList1 = response
  1640. })
  1641. },
  1642. selecttaskType(e) {
  1643. for (var i = 0; i < this.taskTypeList.length; i++) {
  1644. if (this.taskTypeList[i].value == e) {
  1645. this.searchType = this.taskTypeList[i].type
  1646. }
  1647. }
  1648. },
  1649. fujian(row) {
  1650. if (
  1651. row.receiveAttachmentPath === null ||
  1652. row.receiveAttachmentPath === ''
  1653. ) {
  1654. EventBus.$emit(
  1655. 'warning',
  1656. this.$t('system.noticeCircular.NoInformation')
  1657. )
  1658. } else {
  1659. this.accessoryTFs = true
  1660. }
  1661. this.appendixIdss = row.receiveAttachmentPath
  1662. },
  1663. handleExamine(row) {
  1664. this.$router.push({
  1665. name: 'salesContractExamine',
  1666. query: { id: row.id }
  1667. })
  1668. },
  1669. // 关闭 dialog时 处理文件url 初始化upload组件
  1670. handleCloe() {
  1671. this.dialogViewSpareMoney = false
  1672. },
  1673. history(row) {
  1674. billoperatehis({ id: row.id })
  1675. .toPromise()
  1676. .then(response => {
  1677. this.historyList = response
  1678. })
  1679. },
  1680. async exportlist() {
  1681. const { data } = await export1(
  1682. {
  1683. compId: localStorage.getItem('ws-pf_compId'),
  1684. contractType: this.contractType,
  1685. currentPage: this.currentPage,
  1686. pageSize: this.pageSize,
  1687. searchType: this.searchType,
  1688. searchKeyWord: this.searchKeyWord,
  1689. startDate: this.startDate,
  1690. endDate: this.endDate
  1691. },
  1692. {},
  1693. { responseType: 'blob' }
  1694. ).toPromise()
  1695. downloadFile({
  1696. res: data,
  1697. fileName: `${this.date.year +
  1698. (this.date.month ? `-${this.date.month}` : '')}_采购合同`,
  1699. type: 'xls'
  1700. })
  1701. },
  1702. // deletecontract(){},
  1703. //删除
  1704. approve() {},
  1705. listQuery() {},
  1706. total() {},
  1707. clearfiltQuery() {},
  1708. selectCrtDuty() {}
  1709. }
  1710. }
  1711. </script>
  1712. <style lang="scss" scoped>
  1713. /deep/.basicInformation {
  1714. .el-info-table {
  1715. border: none;
  1716. position: relative;
  1717. }
  1718. .el-form-item {
  1719. width: 33.3333%;
  1720. border: none;
  1721. margin: 0;
  1722. .el-form-item__label {
  1723. text-align: left;
  1724. font-size: 14px;
  1725. font-family: PingFangSC-Regular, PingFang SC;
  1726. font-weight: 400;
  1727. color: #8890b1;
  1728. }
  1729. .el-form-item__content {
  1730. padding-left: 0px;
  1731. padding-right: 10px;
  1732. // background: #fff;
  1733. white-space: nowrap;
  1734. height: 40px;
  1735. display: flex;
  1736. -webkit-box-align: center;
  1737. align-items: center;
  1738. text-align: left;
  1739. overflow: hidden;
  1740. }
  1741. }
  1742. }
  1743. /deep/.el-radio {
  1744. color: #606266;
  1745. font-weight: 500;
  1746. line-height: 1;
  1747. cursor: pointer;
  1748. white-space: nowrap;
  1749. outline: 0;
  1750. margin-right: 30px;
  1751. margin-top: 15px;
  1752. }
  1753. /deep/.el-radio__inner {
  1754. border: 1px solid #dcdfe6;
  1755. border-radius: 100%;
  1756. width: 14px;
  1757. height: 14px;
  1758. background-color: #fff;
  1759. cursor: pointer;
  1760. -webkit-box-sizing: border-box;
  1761. box-sizing: border-box;
  1762. margin-left: 100px;
  1763. }
  1764. /deep/.el-radio__input {
  1765. white-space: nowrap;
  1766. cursor: pointer;
  1767. outline: 0;
  1768. line-height: 1;
  1769. vertical-align: middle;
  1770. margin-top: -1px;
  1771. }
  1772. .title {
  1773. position: relative;
  1774. padding-left: 10px;
  1775. }
  1776. .title::before {
  1777. content: '';
  1778. display: inline-block;
  1779. width: 5px;
  1780. height: 30px;
  1781. background: #5473e8;
  1782. position: absolute;
  1783. left: 0;
  1784. }
  1785. .el-form {
  1786. padding: 0 15%;
  1787. display: flex;
  1788. flex-wrap: wrap;
  1789. margin-left: -50px;
  1790. margin-top: 15px;
  1791. width: 110%;
  1792. }
  1793. .el-button--primary {
  1794. background-color: #5878e8;
  1795. border-color: #5878e8;
  1796. }
  1797. .el-col {
  1798. background: #f6f7fc;
  1799. }
  1800. .bg-right {
  1801. text-align: right;
  1802. padding: 16px 20px;
  1803. }
  1804. .center {
  1805. position: relative;
  1806. top: 50px;
  1807. width: 40%;
  1808. height: 2000px;
  1809. margin: 0 auto;
  1810. margin-right: 180px;
  1811. }
  1812. /deep/.el-form-item__label {
  1813. width: 160px;
  1814. }
  1815. .inspector {
  1816. width: 50%;
  1817. }
  1818. /deep/.el-form-item--small .el-form-item__label,
  1819. .el-form-item--small .el-form-item__content {
  1820. text-align: left;
  1821. }
  1822. /deep/.el-input--small {
  1823. font-size: 13px;
  1824. position: relative;
  1825. display: inline-block;
  1826. }
  1827. .center1 .small-title {
  1828. margin-left: 323px;
  1829. }
  1830. .center1 {
  1831. width: 90%;
  1832. margin: 0 auto;
  1833. margin-left: 10px;
  1834. margin-top: 25px;
  1835. }
  1836. /deep/.el-input--small .el-input__inner {
  1837. height: 32px;
  1838. line-height: 32px;
  1839. }
  1840. /deep/.el-select {
  1841. display: inline-block;
  1842. position: relative;
  1843. width: 100%;
  1844. }
  1845. .annu {
  1846. height: 81px;
  1847. background: #ffffff;
  1848. border-radius: 4px;
  1849. }
  1850. .basicInformation .el-form-item {
  1851. width: 50.3333%;
  1852. border: none;
  1853. margin: 0;
  1854. }
  1855. .huom {
  1856. width: 100px;
  1857. }
  1858. .el-form {
  1859. font-size: 14px;
  1860. font-family: PingFangSC-Regular, PingFang SC;
  1861. font-weight: 400;
  1862. color: #8890b1;
  1863. line-height: 16px;
  1864. margin-left: 130px;
  1865. }
  1866. .a {
  1867. margin-left: -32px;
  1868. }
  1869. .el-radio-group {
  1870. margin-left: 80px;
  1871. }
  1872. .ding {
  1873. height: 23px;
  1874. background: #e8ecf6;
  1875. box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
  1876. }
  1877. .ziti {
  1878. width: 72px;
  1879. height: 20px;
  1880. font-size: 14px;
  1881. font-family: PingFangSC-Regular, PingFang SC;
  1882. font-weight: 400;
  1883. color: #8890b1;
  1884. line-height: 20px;
  1885. margin-left: 310px;
  1886. /* margin-top: 112px; */
  1887. }
  1888. .ziti1 {
  1889. width: 100px;
  1890. font-size: 16px;
  1891. font-family: PingFangSC-Medium, PingFang SC;
  1892. font-weight: 500;
  1893. color: #262626;
  1894. line-height: 22px;
  1895. margin-left: 381px;
  1896. margin-top: -21px;
  1897. }
  1898. .winseaview-view {
  1899. padding: 0 0 20px;
  1900. }
  1901. .container {
  1902. overflow: scroll;
  1903. height: 93vh;
  1904. }
  1905. .nav {
  1906. width: 380px;
  1907. height: 20px;
  1908. }
  1909. </style>