tranManagementWarehouseInOutTaskEdit.vue 68 KB

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