storageContractEdit.vue 58 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800
  1. <template>
  2. <div class="container">
  3. <el-row>
  4. <el-col :span="12">
  5. <h2 class="bg-left title">修改合同信息</h2>
  6. </el-col>
  7. <el-col :span="12" class="bg-right">
  8. <el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
  9. style="vertion-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
  10. </el-button>
  11. </el-col>
  12. </el-row>
  13. <div class="center">
  14. <ws-form ref="deptBudgetList" :rules="ruleDeptBudget" :model="deptBudgetList">
  15. <div class="remark">
  16. <h3>基本信息</h3>
  17. <p style="color: #8890b1">
  18. &nbsp;&nbsp;注:基本信息和货物信息均为必填项,“<span style="color:red">*</span>”
  19. 标记的条目提交后不可修改。
  20. </p>
  21. </div>
  22. <!--基本信息-->
  23. <ws-info-table>
  24. <!--合同编号-->
  25. <ws-form-item label="合同编号" span="1" prop="contractNo" class="readonly">
  26. <ws-input v-model="deptBudgetList.contractNo" placeholder="请输入合同编号" maxlength="50" size="small"
  27. :rules="ruleDeptBudget" />
  28. </ws-form-item>
  29. <!--运输方式-->
  30. <ws-form-item label="运输方式" span="1" prop="shippingType">
  31. <ws-input v-model="deptBudgetList.shippingType" placeholder="请输入运输方式" maxlength="100" size="small" />
  32. </ws-form-item>
  33. <!--买方-->
  34. <ws-form-item label="买方" span="1" prop="buyer" class="readonly">
  35. <el-select v-model="deptBudgetList.buyer" placeholder="请选择买方名称" class="typeselect" filterable clearable
  36. @change="buyerSelect">
  37. <el-option v-for="(item,index) in customerinfo" :key="index" :label="item.customerName"
  38. :value="item.customerName" />
  39. </el-select>
  40. </ws-form-item>
  41. <!--结算方式-->
  42. <ws-form-item label="结算方式" span="1" prop="settlementMethod">
  43. <ws-input v-model="deptBudgetList.settlementMethod" placeholder="请输入结算方式" maxlength="120" size="small" />
  44. </ws-form-item>
  45. <!--卖方-->
  46. <ws-form-item label="卖方" span="1" prop="seller" class="readonly">
  47. <el-autocomplete class="inline-input" v-model="deptBudgetList.seller" :fetch-suggestions="querySearch2"
  48. placeholder="请输入卖方名称" @select="handleSelect"></el-autocomplete>
  49. </ws-form-item>
  50. <ws-form-item label="交货方式" span="1" prop="seller" class="readonly">
  51. <el-radio v-model="deptBudgetList.deliverType" label="1">我方送货</el-radio>
  52. <el-radio v-model="deptBudgetList.deliverType" label="2">对方自提</el-radio>
  53. <!-- <el-radio v-model="deptBudgetList.deliverType" v-if="deptBudgetList.priceType == '随行就市'" disabled label="1">
  54. 我方自提</el-radio>
  55. <el-radio v-model="deptBudgetList.deliverType" v-else label="1">我方自提</el-radio>
  56. <el-radio v-model="deptBudgetList.deliverType" v-if="deptBudgetList.priceType == '随行就市'" disabled label="2">
  57. 对方送货</el-radio>
  58. <el-radio v-model="deptBudgetList.deliverType" v-else label="2">对方送货</el-radio> -->
  59. </ws-form-item>
  60. <!--买方电话-->
  61. <ws-form-item label="买方电话" span="1" prop="contractNo">
  62. <el-autocomplete class="inline-input" v-model="deptBudgetList.buyerPhone" :fetch-suggestions="querySearch3"
  63. placeholder="请输入买方电话" @select="handleSelect"></el-autocomplete>
  64. </ws-form-item>
  65. <!--包装方式-->
  66. <ws-form-item label="包装方式" span="1" prop="packingMethod">
  67. <ws-select v-model="deptBudgetList.packingMethod" placeholder="" class="typeselect" :value="value1"
  68. @change="selectpacking">
  69. <ws-option v-for="item in packtypeList" :key="item.constKey" :label="item.constValue"
  70. :value="item.constValue" />
  71. </ws-select>
  72. </ws-form-item>
  73. <!--卖方电话-->
  74. <ws-form-item label="卖方电话" span="1" prop="sellerPhone">
  75. <!-- <ws-input v-model="deptBudgetList.sellerPhone" placeholder="请输入卖方电话" maxlength="100" size="small" /> -->
  76. <el-autocomplete class="inline-input" v-model="deptBudgetList.sellerPhone" :fetch-suggestions="querySearch4"
  77. placeholder="请输入卖方电话" @select="handleSelect"></el-autocomplete>
  78. </ws-form-item>
  79. <!--验收方式-->
  80. <ws-form-item label="验收方式" span="1" prop="acceptanceMethod">
  81. <el-select v-model="deptBudgetList.acceptanceMethod" placeholder="请选择验收方式" style="width: 100%" clearable
  82. filterable @change="selectunitList">
  83. <el-option v-for="(item, index) in unitList" :key="item.constValue" :label="item.constValue"
  84. :value="item.constValue">
  85. <span class="unit-left" style="float: left">
  86. <span v-if="item.flag == 'delete'">
  87. {{ item.constValue }}</span>
  88. <!-- 新增文本框 -->
  89. <div style="width: 160px" v-if="item.flag !== 'delete'" @click.stop>
  90. <ws-input v-model="item.constValue" clearable maxlength="10" style="width: 100%"></ws-input>
  91. </div>
  92. </span>
  93. <span style="float: right; color: #8492a6; font-size: 13px">
  94. <!-- 对号 -->
  95. <i class="el-icon-check" style="line-height: 29px; margin-left: 10px" v-if="item.flag !== 'delete'"
  96. @click.stop="saveClick(item, index)"></i>
  97. <!-- 编辑 -->
  98. <i class="el-icon-edit" style="line-height: 29px; margin-left: 10px" v-if="item.flag == 'delete'"
  99. @click.stop="editClick(item, index)"></i>
  100. <!-- 删除 -->
  101. <i class="el-icon-delete" style="line-height: 29px" @click.stop="deleteClick(item, index)"></i>
  102. </span>
  103. </el-option>
  104. <!-- 新增按钮 -->
  105. <el-option value="" label="">
  106. <div style="
  107. text-align: right;
  108. border-top: 1px solid #dcdfe6;
  109. padding: 5px;
  110. ">
  111. <ws-button type="primary" @click.stop="addClick">{{
  112. $t('button.add')
  113. }}</ws-button>
  114. </div>
  115. </el-option>
  116. </el-select>
  117. </ws-form-item>
  118. <!--重量(吨)-->
  119. <ws-form-item label="重量(吨)" span="1" prop="weight">
  120. <ws-input @input="weightchange" v-model="deptBudgetList.weight" placeholder="请输入重量(吨)" maxlength="100"
  121. size="small" />
  122. </ws-form-item>
  123. <!--交货日期(起)-->
  124. <ws-form-item label="交货日期(起)" span="1" prop="deliveryDateStart">
  125. <ws-date-picker v-model="deptBudgetList.deliveryDateStart" type="date" placeholder="请选择交货日期(起)"
  126. value-format="yyyy-MM-dd" />
  127. </ws-form-item>
  128. <!--溢短装(%)-->
  129. <ws-form-item label="溢短装(%)" span="1" prop="overShort">
  130. <ws-input v-model="deptBudgetList.overShort" placeholder="请输入溢短装比例(%)" maxlength="100" size="small" />
  131. </ws-form-item>
  132. <!--交货日期(止)-->
  133. <ws-form-item label="交货日期(止)" span="1" prop="deliveryDateEnd">
  134. <ws-date-picker v-model="deptBudgetList.deliveryDateEnd" type="date" placeholder="请选择交货日期(止)"
  135. value-format="yyyy-MM-dd" />
  136. </ws-form-item>
  137. <ws-form-item label="货源所在地区" span="1" prop="sourceGoods">
  138. <!-- <el-cascader
  139. :options="options_"
  140. v-model="selectedOptions"
  141. clearable
  142. size="large"
  143. placeholder="请选择货源所在地区"
  144. style="width: 200%"
  145. @change="handleChange"
  146. /> -->
  147. <el-button @click="mapInputClick('source')" class='address-btn'>
  148. {{newSelectedOptions}}
  149. </el-button>
  150. </ws-form-item>
  151. <ws-form-item label="货源详细地址" span="1" prop="sourceGoods">
  152. <ws-input v-model="deptBudgetList.sourceGoods" placeholder="请输入货源详细地址" maxlength="20" size="small" />
  153. </ws-form-item>
  154. <ws-form-item label="交货所在地区" span="1" prop="placeDelivery">
  155. <el-button @click="mapInputClick('deliveryProv')" class="address-btn">
  156. {{ newSelectedOptions1 }}
  157. </el-button>
  158. </ws-form-item>
  159. <ws-form-item label="交货详细地址" span="1" prop="placeDelivery">
  160. <ws-input v-model="deptBudgetList.placeDelivery" placeholder="请输入交货详细地址" maxlength="20" size="small" />
  161. </ws-form-item>
  162. <ws-form-item label="代储费(元/吨·天)" span="1" prop="storageFee">
  163. <ws-input v-model="deptBudgetList.storageFee" placeholder="请输入仓储费" maxlength="20" size="small" />
  164. </ws-form-item>
  165. <!--合同单价(元/吨)-->
  166. <ws-form-item class="readonly" label="合同单价(元/吨)" span="1" prop="unitContractPrice">
  167. <ws-input @input="pricechange" v-model="deptBudgetList.unitContractPrice" placeholder="请输入合同单价"
  168. maxlength="100" size="small" />
  169. </ws-form-item>
  170. <ws-form-item label="代储费起算重量" span="1" prop="storageFeeWeight">
  171. <ws-input v-model="deptBudgetList.storageFeeWeight" placeholder="请输入代储费起算重量" maxlength="20" size="small" />
  172. </ws-form-item>
  173. <!--合同总价-->
  174. <ws-form-item label="合同总价" span="1" prop="totalContractPrice">
  175. <ws-input v-model="deptBudgetList.totalContractPrice" placeholder="请输入合同总价" maxlength="100" size="small" />
  176. </ws-form-item>
  177. <ws-form-item label="代储费起算日期" span="1" prop="storageFeeStartdate">
  178. <ws-date-picker v-model="deptBudgetList.storageFeeStartdate" type="date" placeholder="请选择代储费起算日期"
  179. value-format="yyyy-MM-dd" />
  180. </ws-form-item>
  181. <!--签订日期-->
  182. <ws-form-item label="签订日期" span="1" prop="signingDate">
  183. <ws-date-picker v-model="deptBudgetList.signingDate" type="date" placeholder="请选择合同签订日期"
  184. value-format="yyyy-MM-dd" />
  185. </ws-form-item>
  186. <ws-form-item label="代储费预计终止日期" span="1" prop="storageFeeEnddate">
  187. <ws-date-picker v-model="deptBudgetList.storageFeeEnddate" type="date" placeholder="请选择代储费预计终止日期"
  188. value-format="yyyy-MM-dd" />
  189. </ws-form-item>
  190. <ws-form-item label="最终实际成交量(吨)" span="1" prop="finalTradingVolume">
  191. <ws-input v-model="deptBudgetList.finalTradingVolume" placeholder="请输入最终实际成交量" maxlength="100"
  192. size="small" />
  193. </ws-form-item>
  194. </ws-info-table>
  195. </ws-form>
  196. </div>
  197. <!-- <base-card> -->
  198. <div class="wenzi">
  199. <h3>货物信息</h3>
  200. </div>
  201. <div class="center">
  202. <ws-form ref="deptBudgetList" :rules="ruleDeptBudget" :model="deptBudgetList">
  203. <!--货物信息-->
  204. <ws-info-table>
  205. <!--货名-->
  206. <ws-form-item label="货名" span="1" prop="goodsName">
  207. <div class="unchanged">
  208. {{ deptBudgetList.contractGoodsInfo.goodsName }}
  209. </div>
  210. <span class="unchangeable">*</span>
  211. </ws-form-item>
  212. <!--水分(%)<=-->
  213. <ws-form-item label="水分(%)<=" span="1" prop="contractNo">
  214. <ws-input v-model="deptBudgetList.contractGoodsInfo.waterContent" placeholder="请输入水分(%)" maxlength="100"
  215. size="small" />
  216. </ws-form-item>
  217. <!--品级-->
  218. <ws-form-item label="品级" span="1" prop="grade">
  219. <div class="unchanged">
  220. {{ deptBudgetList.contractGoodsInfo.grade }}
  221. </div>
  222. <span class="unchangeable">*</span>
  223. </ws-form-item>
  224. <!--杂质(%)<=-->
  225. <ws-form-item label="杂质(%)<=" span="1" prop="contractNo">
  226. <ws-input v-model="deptBudgetList.contractGoodsInfo.impurity" placeholder="请输入杂质(%)" maxlength="100"
  227. size="small" />
  228. </ws-form-item>
  229. <!--容重(克/升)>=-->
  230. <ws-form-item label="容重(克/升)>=" span="1" prop="contractNo">
  231. <ws-input v-model="deptBudgetList.contractGoodsInfo.bulkDensity" placeholder="请输入容重(克/升)" maxlength="100"
  232. size="small" />
  233. </ws-form-item>
  234. <!--霉变粒(%)<=-->
  235. <ws-form-item label="霉变粒(%)<=" span="1" prop="contractNo">
  236. <ws-input v-model="deptBudgetList.contractGoodsInfo.mildewGrain" placeholder="请输入霉变粒(%)" maxlength="100"
  237. size="small" />
  238. </ws-form-item>
  239. <!--热损伤(%)<=-->
  240. <ws-form-item label="热损伤(%)<=" span="1" prop="contractNo">
  241. <ws-input v-model="deptBudgetList.contractGoodsInfo.jiaorenli" placeholder="请输入热损伤(%)" maxlength="100"
  242. size="small" />
  243. </ws-form-item>
  244. <!--不完善粒(%)<=-->
  245. <ws-form-item label="不完善粒(%)<=" span="1" prop="contractNo">
  246. <ws-input v-model="deptBudgetList.contractGoodsInfo.imperfectGrain" placeholder="请输入不完善粒(%)" maxlength="100"
  247. size="small" />
  248. </ws-form-item>
  249. </ws-info-table>
  250. </ws-form>
  251. </div>
  252. <div class="wenzi">
  253. <h3>流程信息</h3>
  254. </div>
  255. <div class="center">
  256. <ws-form ref="deptBudgetList" :rules="ruleDeptBudget" :model="deptBudgetList">
  257. <!--流程信息-->
  258. <ws-info-table>
  259. <!--合同收入(元)-->
  260. <ws-form-item label="合同收入(元)" span="1" prop="goodsNameKey">
  261. <ws-input v-model="deptBudgetList.contractProcessInfo.goodsNameKey" placeholder="请输入合同收入(元)" maxlength="100"
  262. size="small" />
  263. </ws-form-item>
  264. <!--已开发票(元)-->
  265. <ws-form-item label="已开发票(元)" span="1" prop="goodsName">
  266. <ws-input v-model="deptBudgetList.contractProcessInfo.goodsName" placeholder="请输入已开发票(元))" maxlength="100"
  267. size="small" />
  268. </ws-form-item>
  269. <!--费用支出(元)-->
  270. <ws-form-item label="费用支出(元)" span="1" prop="contractNo">
  271. <ws-input v-model="deptBudgetList.contractProcessInfo.waterContent" placeholder="请输入费用支出(元)" maxlength="100"
  272. size="small" />
  273. </ws-form-item>
  274. <!--未开发票(元)-->
  275. <ws-form-item label="未开发票(元)" span="1" prop="contractNo">
  276. <ws-input v-model="deptBudgetList.contractProcessInfo.impurity" placeholder="请输入未开发票(元)" maxlength="100"
  277. size="small" />
  278. </ws-form-item>
  279. <!--未回款(元)-->
  280. <ws-form-item label="未回款(元)" span="1" prop="contractNo">
  281. <ws-input v-model="deptBudgetList.contractProcessInfo.mildewGrain" placeholder="请输入未回款(元)" maxlength="100"
  282. size="small" />
  283. </ws-form-item>
  284. <!--双章原件回收情况-->
  285. <ws-form-item label="双章原件回收情况" span="1" prop="grade">
  286. <ws-select v-model="deptBudgetList.contractProcessInfo.grade" placeholder="" class="typeselect"
  287. @change="selectpackingMethod">
  288. <ws-option v-for="item in ChapterTwoList" :key="item.constKey" :label="item.constValue"
  289. :value="item.constValue" />
  290. </ws-select>
  291. </ws-form-item>
  292. </ws-info-table>
  293. </ws-form>
  294. </div>
  295. <div class="wenzi">
  296. <h3>备注信息</h3>
  297. </div>
  298. <div class="center">
  299. <ws-form ref="deptBudgetList" :rules="ruleDeptBudget" :model="deptBudgetList">
  300. <!--备注信息-->
  301. <ws-input v-model="deptBudgetList.remarks" type="textarea" row="3" placeholder="请输入备注信息,不超过200字"
  302. maxlength="200" />
  303. <ws-upload ref="upload" :comp-id="compId" :appendix-ids="deptBudgetList.addressUrl" :editable="false" accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" v-hasPermission="
  304. `contractManagement.salesContract.salesContractInfo.appl`"/>
  305. </ws-form>
  306. </div>
  307. <div v-if="dialogVisible" class="map">
  308. <map-drag @marker="marker" :isShowaddress="true" v-on:addressListen="getAddress" :type="type">
  309. </map-drag>
  310. </div>
  311. <div style="text-align: right; padding: 10px" class="center">
  312. <el-button class="bg-bottom" type="primary" size="small" @click="submit()">提交</el-button>
  313. </div>
  314. </div>
  315. </template>
  316. <script>
  317. import {
  318. regionData,
  319. CodeToText,
  320. TextToCode
  321. } from 'element-china-area-data'
  322. import WsUpload from '@/components/WsUpload'
  323. import mapDrag from '@/components/mapdrag/mapdrag'
  324. import {
  325. examineList,
  326. editInfo,
  327. packList,
  328. xiala,
  329. addxiala,
  330. editxiala,
  331. delxiala,
  332. getRelationContractNo,
  333. getstafffind,
  334. getcustomerinfo
  335. } from '@/model/contarct/index'
  336. import { getstaff, } from '@/model/warehouse/index'
  337. export default {
  338. name: 'viewSpareMoney',
  339. components: {
  340. WsUpload,
  341. mapDrag
  342. },
  343. watch: {
  344. vesselId(val) {
  345. this.loaddata()
  346. },
  347. isShow(val) {
  348. this.showType = val
  349. },
  350. },
  351. data() {
  352. return {
  353. type: '',
  354. dialogVisible: false,
  355. newSelectedOptions1: '请选择交货所在地区',
  356. newSelectedOptions: '请选择货源所在地',
  357. //弹出框
  358. dialogViewSpareMoney: false,
  359. dialogApproveFormVisible: false,
  360. // 船舶类型
  361. monetaryKey: null,
  362. customerinfo: [],
  363. // 表格显示数据
  364. tableDate: [],
  365. // 是否显示
  366. showType: true,
  367. // 年
  368. year: '',
  369. // 提交类型
  370. submitType: true,
  371. options_: regionData,
  372. options:[],
  373. restaurants1: [],
  374. restaurants2: [],
  375. restaurants3: [],
  376. restaurants4: [],
  377. tableData: [{
  378. date: 1111,
  379. name: 'qqqq',
  380. address: 'errrtt'
  381. }],
  382. value1: '袋装',
  383. pickerBeginDateBefore: {
  384. disabledDate: (time) => {
  385. return time.getTime() > Date.now()
  386. },
  387. },
  388. selectunitList: {},
  389. uploadSuccess: {},
  390. selectgrade: {},
  391. goodnameList: {},
  392. unitList: {},
  393. packtypeList: [],
  394. compId: localStorage.getItem('ws-pf_compId'),
  395. appendixIdsAdd: '',
  396. size: 10,
  397. deptBudgetList: {
  398. contractGoodsInfo: {
  399. goodsName: '',
  400. },
  401. contractProcessInfo: {},
  402. sourceGoods:'',
  403. placeDelivery:'',
  404. },
  405. ruleDeptBudget: {},
  406. trainingMethods: {},
  407. isEdited: false,
  408. registered: {},
  409. selectCrtDuty: {},
  410. dutyList: {},
  411. sexList: {},
  412. selectDuty: {},
  413. gradeList: {},
  414. ChapterTwoList: {},
  415. selectIntendedShip: {},
  416. interviewTypeList: {},
  417. feedbackLeaders:[],//收货反馈负责人
  418. }
  419. },
  420. activated() {
  421. //cg.viewBudget
  422. //cg.viewSpareMoney
  423. // this.getVesselData();
  424. getstafffind({
  425. roles: 'd6a5c8a52da544309259f91f75de1ec6'
  426. })
  427. .toPromise()
  428. .then((response) => {
  429. this.options = response
  430. this.staffList = response
  431. })
  432. this.restaurants1 = JSON.parse(localStorage.getItem('deptBudgetList_data1'));
  433. this.restaurants2 = JSON.parse(localStorage.getItem('deptBudgetList_data2'));
  434. this.restaurants3 = JSON.parse(localStorage.getItem('deptBudgetList_data3'));
  435. this.restaurants4 = JSON.parse(localStorage.getItem('deptBudgetList_data4'));
  436. if (!this.restaurants1) this.restaurants1 = [];
  437. if (!this.restaurants2) this.restaurants2 = [];
  438. if (!this.restaurants3) this.restaurants3 = [];
  439. if (!this.restaurants4) this.restaurants4 = [];
  440. this.loaddata()
  441. this.editInfo()
  442. this.showType = this.isShow
  443. // console.log(this.$route.params)
  444. this.showType = this.isShow
  445. },
  446. methods: {
  447. createFilter(queryString) {
  448. return (restaurant) => {
  449. return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
  450. };
  451. },
  452. selectstaff(e) {
  453. this.deptBudgetList.personCharge = ''
  454. for (var i = 0; i < this.staffList.length; i++) {
  455. for (var j = 0; j < e.length; j++) {
  456. if (this.staffList[i].staffMobilePhone == e[j]) {
  457. this.deptBudgetList.personCharge += this.staffList[i].staffName + ' ' + this.staffList[i]
  458. .staffMobilePhone + ','
  459. }
  460. }
  461. }
  462. console.log(this.deptBudgetList)
  463. },
  464. buyerSelect(item) {
  465. // console.log(item)
  466. for (let i = 0; i < this.customerinfo.length; i++) {
  467. console.log(this.customerinfo[i].customerName, item)
  468. if (this.customerinfo[i].customerName == item) {
  469. this.deptBudgetList.buyerPhone = this.customerinfo[i].customerPhone
  470. }
  471. }
  472. },
  473. weightchange(e) {
  474. this.deptBudgetList.finalTradingVolume = e
  475. },
  476. pricechange(e) {
  477. this.deptBudgetList.totalContractPrice = e * this.deptBudgetList.weight
  478. },
  479. selectpackingMethod(e) {
  480. for (var i = 0; i < this.packtypeList.length; i++) {
  481. if (this.packtypeList[i].constValue == e) {
  482. this.deptBudgetList.acceptanceMethodKey =
  483. this.packtypeList[i].constKey
  484. }
  485. }
  486. },
  487. selectpacking(e) {
  488. for (var i = 0; i < this.packtypeList.length; i++) {
  489. if (this.packtypeList[i].constValue == e) {
  490. this.deptBudgetList.packingMethodKey = this.packtypeList[i].constKey
  491. }
  492. }
  493. },
  494. handleSelect(item) {
  495. console.log(item);
  496. },
  497. feedbackLeaderChange(e){
  498. this.deptBudgetList.feedbackLeader = this.feedbackLeaders[e].staffName
  499. this.deptBudgetList.feedbackLeaderPhone = this.feedbackLeaders[e].staffMobilePhone
  500. console.log( this.deptBudgetList.feedbackLeader,this.deptBudgetList.feedbackLeaderPhone)
  501. },
  502. marker(item) {
  503. this.deptBudgetList.warehousePositioning =
  504. item.lnglat.lat + ',' + item.lnglat.lng
  505. },
  506. getAddress(data) {
  507. console.log('getAddress', data)
  508. if (data[4] == 'source') {
  509. this.newSelectedOptions = data[0] + '/' + data[1] + '/' + data[2]
  510. this.deptBudgetList.sourceProvince = data[0]
  511. this.deptBudgetList.sourceCity = data[1]
  512. this.deptBudgetList.sourceArea = data[2]
  513. this.deptBudgetList.sourceGoods = data[3]
  514. this.deptBudgetList.sourceLocation=data[5].lat+','+data[5].lng
  515. } else {
  516. this.newSelectedOptions1 = data[0] + '/' + data[1] + '/' + data[2]
  517. this.deptBudgetList.deliveryProvince = data[0]
  518. this.deptBudgetList.deliveryCity = data[1]
  519. this.deptBudgetList.deliveryArea = data[2]
  520. this.deptBudgetList.placeDelivery = data[3]
  521. this.deptBudgetList.deliveryLocation=data[5].lat+','+data[5].lng
  522. }
  523. },
  524. mapInputClick(type) {
  525. this.dialogVisible = true
  526. this.type = type
  527. },
  528. blurMap() {
  529. this.dialogVisible = false
  530. },
  531. focusMap() {
  532. this.dialogVisible = true
  533. },
  534. // 关闭 dialog时 处理文件url 初始化upload组件
  535. handleClose() {
  536. this.dialogViewSpareMoney = false
  537. },
  538. returnsales() {
  539. this.deptBudgetList = {}
  540. this.$router.push({
  541. path: 'storageContract'
  542. })
  543. },
  544. handleChange(value) {
  545. this.selectedOptions = value
  546. },
  547. handleChange1(value) {
  548. this.selectedOptions1 = value
  549. },
  550. // 上传附件
  551. onChange() {
  552. this.$refs.upload
  553. .handleSaveBill()
  554. .then(async response => {
  555. this.deptBudgetList.addressUrl = response
  556. })
  557. .catch(res => {
  558. EventBus.$emit('error', (JSON.parse(res) || {}).message)
  559. this.$refs.upload.clearFiles()
  560. })
  561. },
  562. loaddata() {
  563. // 数据
  564. examineList({
  565. id: this.$route.query.id
  566. })
  567. .toPromise()
  568. .then((response) => {
  569. if(response.sourceProvince&&response.sourceCity&&response.sourceArea){
  570. this.newSelectedOptions=response.sourceProvince+ '/' + response.sourceCity + '/' + response.sourceArea
  571. }else if(response.sourceProvince&&response.sourceArea){
  572. this.newSelectedOptions=response.sourceProvince+ '/' + response.sourceArea
  573. }
  574. if(response.deliveryProvince&&response.deliveryCity&&response.deliveryArea){
  575. this.newSelectedOptions1=response.deliveryProvince+ '/' + response.deliveryCity + '/' + response.deliveryArea
  576. }else if(response.deliveryProvince&&response.deliveryArea){
  577. }
  578. this.deptBudgetList = response
  579. // var arr=this.deptBudgetList.personCharge.split(',')
  580. // for (let i = 0; i < arr.length; i++) {
  581. // if(arr[i].split(' ')[0]!=''){
  582. // name.push(arr[i].split(' ')[0])
  583. // }
  584. // }
  585. // this.
  586. // console.log(name)
  587. if (this.deptBudgetList.deliverType == 1) {
  588. this.deptBudgetList.deliverType1 = '我方送货'
  589. } else if (this.deptBudgetList.deliverType == 2) {
  590. this.deptBudgetList.deliverType1 = '对方自提'
  591. }
  592. if (this.deptBudgetList.agreementType == 1) {
  593. this.deptBudgetList.agreementType1 = '销售合同'
  594. } else if (this.deptBudgetList.agreementType == 2) {
  595. this.deptBudgetList.agreementType1 = '补充协议'
  596. }
  597. })
  598. // 包装方式
  599. packList({
  600. constId: 'CON1'
  601. })
  602. .toPromise()
  603. .then((response) => {
  604. this.packtypeList = response
  605. })
  606. // 验收方式
  607. this.getUnitList()
  608. // 货名
  609. packList({
  610. constId: 'CON2'
  611. })
  612. .toPromise()
  613. .then((response) => {
  614. this.goodnameList = response
  615. })
  616. // 品级
  617. packList({
  618. constId: 'CON3'
  619. })
  620. .toPromise()
  621. .then((response) => {
  622. this.gradeList = response
  623. })
  624. getcustomerinfo({
  625. compId: localStorage.getItem('ws-pf_compId'),
  626. }).toPromise()
  627. .then((response) => {
  628. var arr = []
  629. for (let i = 0; i < response.length; i++) {
  630. if (response[i].customerType == '个人客户') {
  631. arr.push({
  632. customerName: response[i].customerName,
  633. customerPhone: response[i].customerPhone
  634. })
  635. } else {
  636. arr.push({
  637. customerName: response[i].compName,
  638. customerPhone: response[i].customerPhone
  639. })
  640. }
  641. }
  642. this.customerinfo = arr
  643. })
  644. // 双章
  645. packList({
  646. constId: 'CON4'
  647. })
  648. .toPromise()
  649. .then((response) => {
  650. this.ChapterTwoList = response
  651. })
  652. // 收货反馈负责人
  653. getstaff({
  654. compId: localStorage.getItem('ws-pf_compId')
  655. })
  656. .toPromise()
  657. .then((response) => {
  658. this.feedbackLeaders = response
  659. })
  660. },
  661. getUnitList() {
  662. xiala({
  663. compId: localStorage.getItem('ws-pf_compId'),
  664. constCode: 'TYPEYAN',
  665. })
  666. .toPromise()
  667. .then((response) => {
  668. this.unitList = response
  669. let currItem
  670. this.unitList.forEach((item, index, arr) => {
  671. item.flag = 'delete'
  672. if (this.vModel == item.constKey) {
  673. currItem = item
  674. }
  675. })
  676. if (currItem) {
  677. this.selectContract(currItem.constValue)
  678. }
  679. })
  680. },
  681. // 编辑
  682. editClick(item, index) {
  683. const map = JSON.parse(JSON.stringify(item))
  684. if (Object.is(item.id, 1)) {
  685. return
  686. }
  687. if (Object.is(this.unitList[index].flag, 'delete')) {
  688. map.flag = 'check'
  689. this.$set(this.unitList, index, map)
  690. } else {
  691. map.flag = 'delete'
  692. this.$set(this.unitList, index, map)
  693. }
  694. },
  695. // 删除
  696. deleteClick(item, index) {
  697. if (Object.is(item.constKey, 1)) {
  698. return
  699. }
  700. if (!item.constValue) {
  701. this.unitList.splice(index, 1)
  702. return
  703. }
  704. delxiala({
  705. id: this.unitList[index].id
  706. })
  707. .toPromise()
  708. .then((response) => {
  709. this.getUnitList()
  710. this.pleaseChoose = ''
  711. })
  712. },
  713. querySearch1(queryString, cb) {
  714. var restaurants1 = this.restaurants1;
  715. var results = queryString ? restaurants1.filter(this.createFilter(queryString)) : restaurants1;
  716. // 调用 callback 返回建议列表的数据
  717. cb(results);
  718. },
  719. querySearch2(queryString, cb) {
  720. var restaurants2 = this.restaurants2;
  721. var results = queryString ? restaurants2.filter(this.createFilter(queryString)) : restaurants2;
  722. // 调用 callback 返回建议列表的数据
  723. cb(results);
  724. },
  725. querySearch3(queryString, cb) {
  726. var restaurants3 = this.restaurants3;
  727. var results = queryString ? restaurants3.filter(this.createFilter(queryString)) : restaurants3;
  728. // 调用 callback 返回建议列表的数据
  729. cb(results);
  730. },
  731. querySearch4(queryString, cb) {
  732. var restaurants4 = this.restaurants4;
  733. var results = queryString ? restaurants4.filter(this.createFilter(queryString)) : restaurants4;
  734. // 调用 callback 返回建议列表的数据
  735. cb(results);
  736. },
  737. saveClick(item, index) {
  738. // console.log(item)
  739. if (Object.is(item.id, 1)) {
  740. return
  741. }
  742. if (Object.is(this.unitList[index].flag, 'delete')) {
  743. this.$set(this.unitList, index, {
  744. flag: 'check'
  745. })
  746. } else {
  747. this.$set(this.unitList, index, {
  748. flag: 'delete'
  749. })
  750. }
  751. if (!item.constValue) {
  752. this.unitList.splice(index, 1)
  753. return
  754. }
  755. if (item.flag == 'add') {
  756. item.constKey = Math.random() * 20
  757. this.trainingMethods.compId = localStorage.getItem('ws-pf_compId')
  758. this.trainingMethods.constKey = item.constKey
  759. this.trainingMethods.constCode = 'TYPEYAN'
  760. this.trainingMethods.constValue = item.constValue
  761. this.trainingMethods.id = item.id
  762. addxiala(this.trainingMethods)
  763. .toPromise()
  764. .then((response) => {
  765. this.getUnitList()
  766. })
  767. } else if (item.flag == 'check') {
  768. this.trainingMethods.compId = localStorage.getItem('ws-pf_compId')
  769. this.trainingMethods.constKey = item.constKey
  770. this.trainingMethods.constCode = 'TYPEYAN'
  771. this.trainingMethods.constValue = item.constValue
  772. this.trainingMethods.id = item.id
  773. editxiala(this.trainingMethods)
  774. .toPromise()
  775. .then((response) => {
  776. this.getUnitList()
  777. })
  778. }
  779. },
  780. addClick() {
  781. this.unitList.push({
  782. flag: 'add',
  783. constValue: '',
  784. constKey: '',
  785. })
  786. },
  787. submit() {
  788. if (!this.deptBudgetList.contractNo) {
  789. this.$message({
  790. message: '合同编号不能为空',
  791. type: 'warning',
  792. })
  793. return
  794. }
  795. if (
  796. this.deptBudgetList.contractNo.length < 6 ||
  797. this.deptBudgetList.contractNo.length > 50
  798. ) {
  799. this.$message({
  800. message: '合同编号长度不符合要求,请输入6到50个字符之内!',
  801. type: 'warning',
  802. })
  803. return
  804. }
  805. if (!this.deptBudgetList.shippingType) {
  806. this.$message({
  807. message: '运输方式不能为空',
  808. type: 'warning',
  809. })
  810. return
  811. }
  812. if (
  813. this.deptBudgetList.shippingType.length < 1 ||
  814. this.deptBudgetList.shippingType.length > 20
  815. ) {
  816. this.$message({
  817. message: '运输方式长度不符合要求,请输入1到20个字符之内!',
  818. type: 'warning',
  819. })
  820. return
  821. }
  822. if (!this.deptBudgetList.buyer) {
  823. this.$message({
  824. message: '买方名称不能为空',
  825. type: 'warning',
  826. })
  827. return
  828. }
  829. if (this.deptBudgetList.buyer.length > 30) {
  830. this.$message({
  831. message: '买方名称长度不符合要求,请输入30个字符之内!',
  832. type: 'warning',
  833. })
  834. return
  835. }
  836. if (!this.deptBudgetList.settlementMethod) {
  837. this.$message({
  838. message: '结算方式不能为空',
  839. type: 'warning',
  840. })
  841. return
  842. }
  843. if (
  844. this.deptBudgetList.settlementMethod.length < 1 ||
  845. this.deptBudgetList.settlementMethod.length > 20
  846. ) {
  847. this.$message({
  848. message: '结算方式长度不符合要求,请输入1到20个字符之内!',
  849. type: 'warning',
  850. })
  851. return
  852. }
  853. if (!this.deptBudgetList.seller) {
  854. this.$message({
  855. message: '请输入卖方名称!',
  856. type: 'warning',
  857. })
  858. return
  859. }
  860. if (this.deptBudgetList.seller.length > 30) {
  861. this.$message({
  862. message: '卖方名称长度不符合要求,请输入30个字符之内!',
  863. type: 'warning',
  864. })
  865. return
  866. }
  867. if (!this.deptBudgetList.buyerPhone) {
  868. this.$message({
  869. message: '请输入买方电话!',
  870. type: 'warning',
  871. })
  872. return
  873. }
  874. // if (isNaN(this.deptBudgetList.buyerPhone)) {
  875. // this.$message({
  876. // message: '输入买方电话有误!',
  877. // type: 'warning',
  878. // })
  879. // return
  880. // }
  881. if (!this.deptBudgetList.sellerPhone) {
  882. this.$message({
  883. message: '请输入卖方电话!',
  884. type: 'warning',
  885. })
  886. return
  887. }
  888. if (isNaN(this.deptBudgetList.sellerPhone)) {
  889. this.$message({
  890. message: '输入卖方电话有误!',
  891. type: 'warning',
  892. })
  893. return
  894. }
  895. // if (this.deptBudgetList.deliverType == '2') {
  896. // if (!this.deptBudgetList.feedbackLeader) {
  897. // this.$message({
  898. // message: '请选择收货反馈负责人',
  899. // type: 'warning',
  900. // })
  901. // return
  902. // }
  903. // }
  904. if (!this.deptBudgetList.acceptanceMethod) {
  905. this.$message({
  906. message: '请选择验收方式',
  907. type: 'warning',
  908. })
  909. return
  910. }
  911. if (!this.deptBudgetList.weight) {
  912. this.$message({
  913. message: '请输入重量!',
  914. type: 'warning',
  915. })
  916. return
  917. }
  918. if (
  919. isNaN(this.deptBudgetList.weight) ||
  920. (String(this.deptBudgetList.weight).indexOf('.') != -1 &&
  921. String(this.deptBudgetList.weight).length -
  922. (String(this.deptBudgetList.weight).indexOf('.') + 1) >
  923. 3) ||
  924. this.deptBudgetList.weight < 0 ||
  925. this.deptBudgetList.weight > 200000
  926. ) {
  927. this.$message({
  928. message: '输入重量有误!',
  929. type: 'warning',
  930. })
  931. return
  932. }
  933. if (!this.deptBudgetList.storageFee) {
  934. this.$message({
  935. message: '代储费不能为空!',
  936. type: 'warning',
  937. })
  938. return
  939. }
  940. if (!this.deptBudgetList.storageFeeWeight) {
  941. this.$message({
  942. message: '代储费起算重量不能为空!',
  943. type: 'warning',
  944. })
  945. return
  946. }
  947. if (
  948. isNaN(this.deptBudgetList.storageFee) ||
  949. (String(this.deptBudgetList.storageFee).indexOf('.') != -1 &&
  950. String(this.deptBudgetList.storageFee).length -
  951. (String(this.deptBudgetList.storageFee).indexOf('.') + 1) >
  952. 2) ||
  953. this.deptBudgetList.storageFee < 0 ||
  954. this.deptBudgetList.storageFee > 1000
  955. ) {
  956. this.$message({
  957. message: '代储费填写错误!',
  958. type: 'warning',
  959. })
  960. return
  961. }
  962. if (
  963. isNaN(this.deptBudgetList.storageFeeWeight) ||
  964. (String(this.deptBudgetList.storageFeeWeight).indexOf('.') != -1 &&
  965. String(this.deptBudgetList.storageFeeWeight).length -
  966. (String(this.deptBudgetList.storageFeeWeight).indexOf('.') + 1) >
  967. 3) ||
  968. this.deptBudgetList.storageFeeWeight < 0 ||
  969. this.deptBudgetList.storageFeeWeight > 200000
  970. ) {
  971. this.$message({
  972. message: '代储费起算重量填写错误!',
  973. type: 'warning',
  974. })
  975. return
  976. }
  977. if (!this.deptBudgetList.deliveryDateStart) {
  978. this.$message({
  979. message: '请选择交货日期(起)',
  980. type: 'warning',
  981. })
  982. return
  983. }
  984. if (!this.deptBudgetList.overShort) {
  985. this.$message({
  986. message: '请输入溢短装!',
  987. type: 'warning',
  988. })
  989. return
  990. }
  991. if (
  992. isNaN(this.deptBudgetList.overShort) ||
  993. (String(this.deptBudgetList.overShort).indexOf('.') != -1 &&
  994. String(this.deptBudgetList.overShort).length -
  995. (String(this.deptBudgetList.overShort).indexOf('.') + 1) >
  996. 2) ||
  997. this.deptBudgetList.overShort < 0 ||
  998. this.deptBudgetList.overShort > 50
  999. ) {
  1000. this.$message({
  1001. message: '溢短装输入有误!',
  1002. type: 'warning',
  1003. })
  1004. return
  1005. }
  1006. if (!this.deptBudgetList.deliveryDateEnd) {
  1007. this.$message({
  1008. message: '请选择交货日期(止)',
  1009. type: 'warning',
  1010. })
  1011. return
  1012. }
  1013. if (!this.deptBudgetList.unitContractPrice) {
  1014. this.$message({
  1015. message: '请输入合同单价!',
  1016. type: 'warning',
  1017. })
  1018. return
  1019. }
  1020. if (
  1021. isNaN(this.deptBudgetList.unitContractPrice) ||
  1022. (String(this.deptBudgetList.unitContractPrice).indexOf('.') != -1 &&
  1023. String(this.deptBudgetList.unitContractPrice).length -
  1024. (String(this.deptBudgetList.unitContractPrice).indexOf('.') + 1) >
  1025. 2) ||
  1026. this.deptBudgetList.unitContractPrice <= 0 ||
  1027. this.deptBudgetList.unitContractPrice > 10000
  1028. ) {
  1029. this.$message({
  1030. message: '合同单价输入有误!',
  1031. type: 'warning',
  1032. })
  1033. return
  1034. }
  1035. if (!this.deptBudgetList.totalContractPrice) {
  1036. this.$message({
  1037. message: '请输入合同总价!',
  1038. type: 'warning',
  1039. })
  1040. return
  1041. }
  1042. if (
  1043. isNaN(this.deptBudgetList.totalContractPrice) ||
  1044. (String(this.deptBudgetList.totalContractPrice).indexOf('.') != -1 &&
  1045. String(this.deptBudgetList.totalContractPrice).length -
  1046. (String(this.deptBudgetList.totalContractPrice).indexOf('.') +
  1047. 1) >
  1048. 2) ||
  1049. this.deptBudgetList.totalContractPrice <= 0 ||
  1050. this.deptBudgetList.totalContractPrice > 1000000000
  1051. ) {
  1052. this.$message({
  1053. message: '合同总价输入有误!',
  1054. type: 'warning',
  1055. })
  1056. return
  1057. }
  1058. //时间
  1059. if (
  1060. new Date(this.deptBudgetList.deliveryDateStart).getTime() >
  1061. new Date(this.deptBudgetList.deliveryDateEnd).getTime()
  1062. ) {
  1063. this.$message({
  1064. message: '交货日期(止)选择错误',
  1065. type: 'warning',
  1066. })
  1067. return
  1068. }
  1069. if (!this.newSelectedOptions) {
  1070. this.$message({
  1071. message: '请选择货源所在地区!',
  1072. type: 'warning',
  1073. })
  1074. return
  1075. }
  1076. if (!this.deptBudgetList.sourceGoods) {
  1077. this.$message({
  1078. message: '请输入货源详细地址!',
  1079. type: 'warning',
  1080. })
  1081. return
  1082. }
  1083. if (!this.newSelectedOptions1) {
  1084. this.$message({
  1085. message: '请选择交货所在地区!',
  1086. type: 'warning',
  1087. })
  1088. return
  1089. }
  1090. if (!this.deptBudgetList.placeDelivery) {
  1091. this.$message({
  1092. message: '请输入交货详细地址!',
  1093. type: 'warning',
  1094. })
  1095. return
  1096. }
  1097. if (!this.deptBudgetList.signingDate) {
  1098. this.$message({
  1099. message: '请选择签订日期',
  1100. type: 'warning',
  1101. })
  1102. return
  1103. }
  1104. if (
  1105. isNaN(this.deptBudgetList.finalTradingVolume) ||
  1106. (String(this.deptBudgetList.finalTradingVolume).indexOf('.') != -1 &&
  1107. String(this.deptBudgetList.finalTradingVolume).length -
  1108. (String(this.deptBudgetList.finalTradingVolume).indexOf('.') + 1) >
  1109. 3) ||
  1110. this.deptBudgetList.finalTradingVolume < 0 ||
  1111. this.deptBudgetList.finalTradingVolume > 200000
  1112. ) {
  1113. this.$message({
  1114. message: '最终实际成交量有误!',
  1115. type: 'warning',
  1116. })
  1117. return
  1118. }
  1119. //货物信息
  1120. if (!this.deptBudgetList.contractGoodsInfo.goodsName) {
  1121. this.$message({
  1122. message: '请选择货名',
  1123. type: 'warning',
  1124. })
  1125. return
  1126. }
  1127. if (!this.deptBudgetList.contractGoodsInfo.waterContent) {
  1128. this.$message({
  1129. message: '请输入水分',
  1130. type: 'warning',
  1131. })
  1132. return
  1133. }
  1134. if (
  1135. (this.deptBudgetList.contractGoodsInfo.waterContent &&
  1136. String(this.deptBudgetList.contractGoodsInfo.waterContent).indexOf(
  1137. '.'
  1138. ) != -1 &&
  1139. String(this.deptBudgetList.contractGoodsInfo.waterContent).length -
  1140. (String(this.deptBudgetList.contractGoodsInfo.waterContent).indexOf(
  1141. '.'
  1142. ) +
  1143. 1) >
  1144. 2) ||
  1145. this.deptBudgetList.contractGoodsInfo.waterContent > 40 ||
  1146. this.deptBudgetList.contractGoodsInfo.waterContent < 0
  1147. ) {
  1148. this.$message({
  1149. message: '水分输入错误',
  1150. type: 'warning',
  1151. })
  1152. return
  1153. }
  1154. if (!this.deptBudgetList.contractGoodsInfo.grade) {
  1155. this.$message({
  1156. message: '请选择品级',
  1157. type: 'warning',
  1158. })
  1159. return
  1160. }
  1161. if (!this.deptBudgetList.contractGoodsInfo.impurity) {
  1162. this.$message({
  1163. message: '请输入杂质',
  1164. type: 'warning',
  1165. })
  1166. return
  1167. }
  1168. if (
  1169. (this.deptBudgetList.contractGoodsInfo.impurity &&
  1170. String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') !=
  1171. -1 &&
  1172. String(this.deptBudgetList.contractGoodsInfo.impurity).length -
  1173. (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf(
  1174. '.'
  1175. ) +
  1176. 1) >
  1177. 2) ||
  1178. this.deptBudgetList.contractGoodsInfo.impurity > 40 ||
  1179. this.deptBudgetList.contractGoodsInfo.impurity < 0
  1180. ) {
  1181. this.$message({
  1182. message: '杂质输入错误',
  1183. type: 'warning',
  1184. })
  1185. return
  1186. }
  1187. if (!this.deptBudgetList.contractGoodsInfo.bulkDensity) {
  1188. this.$message({
  1189. message: '请输入容重',
  1190. type: 'warning',
  1191. })
  1192. return
  1193. }
  1194. if (
  1195. (this.deptBudgetList.contractGoodsInfo.bulkDensity &&
  1196. String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf(
  1197. '.'
  1198. ) != -1 &&
  1199. String(this.deptBudgetList.contractGoodsInfo.bulkDensity).length -
  1200. (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf(
  1201. '.'
  1202. ) +
  1203. 1) >
  1204. 2) ||
  1205. this.deptBudgetList.contractGoodsInfo.bulkDensity > 1000 ||
  1206. this.deptBudgetList.contractGoodsInfo.bulkDensity < 0
  1207. ) {
  1208. this.$message({
  1209. message: '容重输入错误',
  1210. type: 'warning',
  1211. })
  1212. return
  1213. }
  1214. if (!this.deptBudgetList.contractGoodsInfo.mildewGrain) {
  1215. this.$message({
  1216. message: '请输入霉变粒',
  1217. type: 'warning',
  1218. })
  1219. return
  1220. }
  1221. if (
  1222. !this.deptBudgetList.contractGoodsInfo.mildewGrain ||
  1223. (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
  1224. '.'
  1225. ) != -1 &&
  1226. String(this.deptBudgetList.contractGoodsInfo.mildewGrain).length -
  1227. (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
  1228. '.'
  1229. ) +
  1230. 1) >
  1231. 2) ||
  1232. this.deptBudgetList.contractGoodsInfo.mildewGrain > 40 ||
  1233. this.deptBudgetList.contractGoodsInfo.mildewGrain < 0
  1234. ) {
  1235. this.$message({
  1236. message: '霉变粒输入错误',
  1237. type: 'warning',
  1238. })
  1239. return
  1240. }
  1241. if (!this.deptBudgetList.contractGoodsInfo.jiaorenli) {
  1242. this.$message({
  1243. message: '请输入热损伤',
  1244. type: 'warning',
  1245. })
  1246. return
  1247. }
  1248. if (
  1249. !this.deptBudgetList.contractGoodsInfo.jiaorenli ||
  1250. (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf('.') !=
  1251. -1 &&
  1252. String(this.deptBudgetList.contractGoodsInfo.jiaorenli).length -
  1253. (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf(
  1254. '.'
  1255. ) +
  1256. 1) >
  1257. 2) ||
  1258. this.deptBudgetList.contractGoodsInfo.jiaorenli > 40 ||
  1259. this.deptBudgetList.contractGoodsInfo.jiaorenli < 0
  1260. ) {
  1261. this.$message({
  1262. message: '热损伤输入错误',
  1263. type: 'warning',
  1264. })
  1265. return
  1266. }
  1267. if (!this.deptBudgetList.contractGoodsInfo.imperfectGrain) {
  1268. this.$message({
  1269. message: '请输入不完善粒',
  1270. type: 'warning',
  1271. })
  1272. return
  1273. }
  1274. if (
  1275. !this.deptBudgetList.contractGoodsInfo.imperfectGrain ||
  1276. (String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).indexOf(
  1277. '.'
  1278. ) != -1 &&
  1279. String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).length -
  1280. (String(
  1281. this.deptBudgetList.contractGoodsInfo.imperfectGrain
  1282. ).indexOf('.') +
  1283. 1) >
  1284. 2) ||
  1285. this.deptBudgetList.contractGoodsInfo.imperfectGrain > 40 ||
  1286. this.deptBudgetList.contractGoodsInfo.imperfectGrain < 0
  1287. ) {
  1288. this.$message({
  1289. message: '不完善粒输入错误',
  1290. type: 'warning',
  1291. })
  1292. return
  1293. }
  1294. if (this.deptBudgetList.contractProcessInfo.goodsNameKey) {
  1295. if (
  1296. !this.deptBudgetList.contractProcessInfo.goodsNameKey > 1000000000 ||
  1297. this.deptBudgetList.contractProcessInfo.goodsNameKey < 100 ||
  1298. (String(this.deptBudgetList.contractProcessInfo.goodsNameKey).indexOf(
  1299. '.'
  1300. ) != -1 &&
  1301. String(this.deptBudgetList.contractProcessInfo.goodsNameKey).length -
  1302. (String(
  1303. this.deptBudgetList.contractProcessInfo.goodsNameKey
  1304. ).indexOf('.') +
  1305. 1) >
  1306. 2)
  1307. ) {
  1308. this.$message({
  1309. message: '合同收入金额输入错误',
  1310. type: 'warning',
  1311. })
  1312. return
  1313. }
  1314. }
  1315. if (
  1316. this.deptBudgetList.contractProcessInfo.waterContent > 10000000 ||
  1317. this.deptBudgetList.contractProcessInfo.waterContent < 0 ||
  1318. (String(this.deptBudgetList.contractProcessInfo.waterContent).indexOf(
  1319. '.'
  1320. ) != -1 &&
  1321. String(this.deptBudgetList.contractProcessInfo.waterContent).length -
  1322. (String(
  1323. this.deptBudgetList.contractProcessInfo.waterContent
  1324. ).indexOf('.') +
  1325. 1) >
  1326. 2)
  1327. ) {
  1328. this.$message({
  1329. message: '费用支出输入错误',
  1330. type: 'warning',
  1331. })
  1332. return
  1333. }
  1334. if (
  1335. (this.deptBudgetList.contractProcessInfo.goodsName > 1000000000) |
  1336. (this.deptBudgetList.contractProcessInfo.goodsName < 0) ||
  1337. (String(this.deptBudgetList.contractProcessInfo.goodsName).indexOf(
  1338. '.'
  1339. ) != -1 &&
  1340. String(this.deptBudgetList.contractProcessInfo.goodsName).length -
  1341. (String(this.deptBudgetList.contractProcessInfo.goodsName).indexOf(
  1342. '.'
  1343. ) +
  1344. 1) >
  1345. 2)
  1346. ) {
  1347. this.$message({
  1348. message: '已开发票金额输入错误',
  1349. type: 'warning',
  1350. })
  1351. return
  1352. }
  1353. if (
  1354. (this.deptBudgetList.contractProcessInfo.impurity > 1000000000) |
  1355. (this.deptBudgetList.contractProcessInfo.impurity < 0) ||
  1356. (String(this.deptBudgetList.contractProcessInfo.impurity).indexOf(
  1357. '.'
  1358. ) != -1 &&
  1359. String(this.deptBudgetList.contractProcessInfo.impurity).length -
  1360. (String(this.deptBudgetList.contractProcessInfo.impurity).indexOf(
  1361. '.'
  1362. ) +
  1363. 1) >
  1364. 2)
  1365. ) {
  1366. this.$message({
  1367. message: '未开发票金额输入错误',
  1368. type: 'warning',
  1369. })
  1370. return
  1371. }
  1372. if (
  1373. (!this.deptBudgetList.contractProcessInfo.mildewGrain > 1000000000) |
  1374. (this.deptBudgetList.contractProcessInfo.mildewGrain < 0) ||
  1375. (String(this.deptBudgetList.contractProcessInfo.mildewGrain).indexOf(
  1376. '.'
  1377. ) != -1 &&
  1378. String(this.deptBudgetList.contractProcessInfo.mildewGrain).length -
  1379. (String(
  1380. this.deptBudgetList.contractProcessInfo.mildewGrain
  1381. ).indexOf('.') +
  1382. 1) >
  1383. 2)
  1384. ) {
  1385. this.$message({
  1386. message: '未回款金额输入错误',
  1387. type: 'warning',
  1388. })
  1389. return
  1390. }
  1391. this.$confirm(`确定提交本次修改?`, {
  1392. cancelButtonText: '取消',
  1393. confirmButtonText: '确定',
  1394. type: 'warning'
  1395. })
  1396. .then(() => {
  1397. this.$refs.deptBudgetList.validate((valid) => {
  1398. if (valid) {
  1399. this.deptBudgetList.compId = this.compId
  1400. this.deptBudgetList.contractType = 1
  1401. editInfo(this.deptBudgetList)
  1402. .toPromise()
  1403. .then((response) => {
  1404. this.$message.success('编辑成功')
  1405. this.deptBudgetList = {}
  1406. this.$router.push({
  1407. path: 'storageContract'
  1408. })
  1409. })
  1410. } else {
  1411. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  1412. return false
  1413. }
  1414. })
  1415. })
  1416. },
  1417. editInfo() {
  1418. editInfo({})
  1419. },
  1420. // getList(){}
  1421. },
  1422. }
  1423. </script>
  1424. <style lang="scss" scoped>
  1425. /deep/.ws-info-table .el-form-item .el-form-item__content {
  1426. padding: 0 25px;
  1427. }
  1428. /deep/.ws-info-table .el-form-item {
  1429. border-right: 1px solid #cdd2dc;
  1430. border-bottom: 1px solid #cdd2dc;
  1431. }
  1432. .title {
  1433. position: relative;
  1434. }
  1435. .title::before {
  1436. content: '';
  1437. display: inline-block;
  1438. width: 5px;
  1439. height: 30px;
  1440. background: #5473e8;
  1441. position: absolute;
  1442. left: 0;
  1443. }
  1444. .el-button--primary {
  1445. background-color: #5878e8;
  1446. border-color: #5878e8;
  1447. }
  1448. .el-col {
  1449. background: #f6f7fc;
  1450. }
  1451. .readonly {
  1452. position: relative;
  1453. }
  1454. .readonly:after {
  1455. content: '*';
  1456. color: #ff2727;
  1457. position: absolute;
  1458. right: 8px;
  1459. z-index: 10;
  1460. top: 21%;
  1461. font-size: 20px;
  1462. }
  1463. /deep/.ws-info-table .el-form-item .el-form-item__content {
  1464. padding: 0 25px;
  1465. border-left: 1px solid #cdd2dc;
  1466. background: #fafbfc;
  1467. }
  1468. /deep/.ws-info-table .el-form-item .el-form-item__label {
  1469. width: 140px;
  1470. text-align: center;
  1471. background: #f0f2f6;
  1472. // border: 1px solid #cdd2dc;
  1473. }
  1474. .button-container {
  1475. display: flex;
  1476. flex-wrap: nowrap;
  1477. justify-content: space-between;
  1478. align-items: center;
  1479. background-color: #fff;
  1480. width: 100%;
  1481. height: 50px;
  1482. padding: 0 10px;
  1483. &>div {
  1484. margin-left: 10px;
  1485. display: flex;
  1486. flex-wrap: nowrap;
  1487. flex-direction: row;
  1488. &>span {
  1489. line-height: 50px;
  1490. }
  1491. }
  1492. /deep/.auditFlow-box {
  1493. position: unset;
  1494. margin-left: 10px;
  1495. &/deep/.auditFlow-icon {
  1496. width: auto;
  1497. padding-right: 30px;
  1498. }
  1499. &/deep/.auditFlow-main {
  1500. position: absolute;
  1501. }
  1502. }
  1503. }
  1504. .box-app {
  1505. display: inline-block;
  1506. margin-left: 30px;
  1507. line-height: 50px;
  1508. }
  1509. /deep/.el-dialog {
  1510. .el-form-item {
  1511. margin-bottom: 0 !important;
  1512. .el-input--medium {
  1513. textarea {
  1514. min-height: 100px !important;
  1515. }
  1516. }
  1517. }
  1518. }
  1519. .collapse-bottom {
  1520. margin-bottom: 20px;
  1521. }
  1522. .input-main .textarea .el-textarea__inner {
  1523. width: 100%;
  1524. z-index: 1;
  1525. }
  1526. .bg-left {
  1527. padding-left: 30px;
  1528. }
  1529. .bg-right {
  1530. padding: 10px;
  1531. text-align: right;
  1532. }
  1533. .bg-bottom {
  1534. margin: 6px 0px;
  1535. }
  1536. .wenzi {
  1537. width: 70%;
  1538. margin: 0 auto;
  1539. }
  1540. .wenzi h3 {
  1541. display: inline-block;
  1542. left: 30px;
  1543. }
  1544. .wenzi p {
  1545. display: inline-block;
  1546. }
  1547. .center {
  1548. width: 70%;
  1549. margin: 0 auto;
  1550. }
  1551. .el-form-item {
  1552. width: 50%;
  1553. }
  1554. .el-form-item__label {
  1555. text-align: center;
  1556. }
  1557. /*.crt-main .textarea /deep/ .el-form-item__label {*/
  1558. /* height: 82px;*/
  1559. /*}*/
  1560. // 控制select为只读的时候显示样式
  1561. .hide-sel {
  1562. .el-input__inner {
  1563. border: 0px;
  1564. }
  1565. .el-icon-arrow-up {
  1566. display: none;
  1567. }
  1568. .el-textarea__inner {
  1569. background-color: #fff !important;
  1570. border: 0;
  1571. }
  1572. .el-date-editor {
  1573. i {
  1574. display: none;
  1575. }
  1576. }
  1577. .is-disabled {
  1578. .el-input__inner:hover {
  1579. background-color: #fff !important;
  1580. border: 0;
  1581. }
  1582. color: #606266;
  1583. .el-input__inner {
  1584. background-color: #fff !important;
  1585. border: 0;
  1586. color: #606266;
  1587. }
  1588. .el-textarea__inner {
  1589. background-color: #fff !important;
  1590. border: 0;
  1591. color: #606266;
  1592. }
  1593. }
  1594. }
  1595. // 控制select为只读的时候显示样式
  1596. /deep/.ws-class-table-col {
  1597. height: auto;
  1598. padding: 0px 2px;
  1599. /deep/.el-input__inner {
  1600. padding: 0px 2px;
  1601. }
  1602. }
  1603. /deep/.is-disabled {
  1604. .el-input__prefix,
  1605. .el-input__suffix {
  1606. display: none;
  1607. }
  1608. .el-input__inner {
  1609. background-color: #fff;
  1610. border-color: #fff !important;
  1611. color: #000 !important;
  1612. font-size: 14px;
  1613. cursor: text;
  1614. padding: 0 !important;
  1615. }
  1616. }
  1617. .winseaview-view {
  1618. padding: 0 0 20px;
  1619. }
  1620. .container {
  1621. overflow: scroll;
  1622. height: 93vh;
  1623. }
  1624. //*号
  1625. .unchangeable {
  1626. position: absolute;
  1627. width: 9px;
  1628. height: 22px;
  1629. font-size: 16px;
  1630. font-family: PingFangSC-Medium, PingFang SC;
  1631. font-weight: 500;
  1632. color: #ff2727;
  1633. line-height: 22px;
  1634. display: inline-block;
  1635. right: 14px;
  1636. }
  1637. /deep/.el-input,
  1638. /deep/.el-date-editor {
  1639. font-size: 13px;
  1640. }
  1641. /deep/.el-textarea {
  1642. width: 101%;
  1643. margin: 0px;
  1644. }
  1645. /deep/el-date-editor--date {
  1646. width: 200px;
  1647. }
  1648. .unchanged {
  1649. position: absolute;
  1650. left: 37px;
  1651. width: 102px;
  1652. height: 14px;
  1653. font-size: 14px;
  1654. font-weight: 400;
  1655. color: #afb5cb;
  1656. line-height: 14px;
  1657. }
  1658. /deep/.el-input--small .el-input__inner {
  1659. height: 32px;
  1660. line-height: 32px;
  1661. }
  1662. /deep/.el-form-item.is-success .el-input__inner,
  1663. /deep/.el-cascader .el-input .el-input__inner,
  1664. /deep/.el-textarea__inner {
  1665. color: #8890b1;
  1666. }
  1667. .addressUrls {
  1668. width: 100%;
  1669. display: flex;
  1670. margin-top: 10px;
  1671. }
  1672. .addressUrls-item {
  1673. position: relative;
  1674. display: flex;
  1675. }
  1676. .icon-guanbi {
  1677. position: absolute;
  1678. right: 8px;
  1679. }
  1680. .addressUrl {
  1681. margin: 0px 10px;
  1682. border-radius: 3px;
  1683. }
  1684. //上传文件成功标识
  1685. /deep/.el-upload-list__item-status-label {
  1686. position: absolute;
  1687. right: 22px;
  1688. top: -1px;
  1689. line-height: inherit;
  1690. display: none;
  1691. }
  1692. .map {
  1693. position: fixed;
  1694. top: 0;
  1695. bottom: 0;
  1696. left: 0;
  1697. right: 0;
  1698. margin: auto;
  1699. width: 850px;
  1700. height: 400px;
  1701. background: gainsboro;
  1702. border-radius: 20px;
  1703. padding: 10px;
  1704. box-sizing: border-box;
  1705. z-index: 99;
  1706. }
  1707. .amap-container {
  1708. width: 100% !important;
  1709. }
  1710. .address-btn {
  1711. width: 100%;
  1712. text-align: left;
  1713. color:#000;
  1714. border:1px solid #ccc;
  1715. }
  1716. .inline-input {
  1717. width: 100%;
  1718. }
  1719. </style>