tranManagementWarehouseInOutTaskEdit.vue 69 KB

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