salesContractEdit.vue 53 KB

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