collectionContractEdit.vue 50 KB

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