buyEdit.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677
  1. <template>
  2. <view class="center">
  3. <view class="area">
  4. <view class="c-row b-b">
  5. <text class="tit">名头</text>
  6. <view class="con-list">
  7. <text @click="navToDetailPage">{{deptList.buyer}}</text>
  8. </view>
  9. </view>
  10. <view class="c-row b-b">
  11. <text class="tit">标题</text>
  12. <view class="con-list">
  13. <input maxlength='16' minlength='2' placeholder="请输入标题,不超过16个字" name="input" v-model="deptList.title"></input>
  14. </view>
  15. </view>
  16. <view class="c-row b-b">
  17. <text class="tit">货名</text>
  18. <view class="con-list">
  19. <input placeholder="请输入货名,如玉米" name="input" v-model="deptList.goodsName"></input>
  20. </view>
  21. </view>
  22. <view class="c-row b-b">
  23. <text class="tit">采购量(吨)</text>
  24. <view class="con-list">
  25. <input placeholder="请输入采购重量,如1000" name="input" v-model="deptList.plannedPurchaseVolume"></input>
  26. </view>
  27. </view>
  28. <view class="c-row b-b">
  29. <text class="tit">最小成交量(吨)</text>
  30. <view class="con-list">
  31. <input placeholder="请输入最小成交量" name="input" v-model="deptList.minimumVolume"></input>
  32. </view>
  33. </view>
  34. <view class="c-row b-b">
  35. <text class="tit">类型</text>
  36. <view class="con-list">
  37. {{deptList.procurementPlanType}}
  38. </view>
  39. </view>
  40. <view class="c-row b-b">
  41. <text class="tit">价格类型</text>
  42. <view class="con-list">
  43. <!-- <input placeholder="请填写价格类型" name="input" v-model="deptList.priceType"></input> -->
  44. {{deptList.priceType}}
  45. </view>
  46. </view>
  47. <view class="c-row b-b" v-if="this.typesIndex != 1">
  48. <text class="tit">单价(元/吨)</text>
  49. <view class="con-list">
  50. <input placeholder="请填写单价" name="input" v-model="deptList.procurementPrice"></input>
  51. </view>
  52. </view>
  53. <view class="c-row b-b" v-if="this.typesIndex == 1">
  54. <text class="tit">基差(元/吨)</text>
  55. <view class="con-list">
  56. <input placeholder="请输入基差" name="input" v-model="deptList.basisPrice"></input>
  57. </view>
  58. </view>
  59. <view class="c-row b-b">
  60. <text class="tit">产地</text>
  61. <view class="con-list">
  62. <view @click='regionchange1'>{{region1}}</view>
  63. <u-picker :params='params1' @confirm='regionpicker1' mode="region" v-model="show1" ></u-picker>
  64. </view>
  65. </view>
  66. <view class="c-row b-b">
  67. <text class="tit">收货地区</text>
  68. <view class="con-list">
  69. <view @click='regionchange'>{{region}}</view>
  70. <u-picker :params='params' @confirm='regionpicker' mode="region" v-model="show" ></u-picker>
  71. </view>
  72. </view>
  73. <view class="c-row b-b">
  74. <text class="tit">买方手机号</text>
  75. <view class="con-list">
  76. <input placeholder="请输入买方手机号" name="input" v-model="deptList.buyerPhone"></input>
  77. </view>
  78. </view>
  79. <view class="c-row ">
  80. <button @click='getcode' type="default">{{sendText}}</button>
  81. <view class="con-list">
  82. <input placeholder="请填写6位短信验证码" name="input" v-model="deptList.title1"></input>
  83. </view>
  84. </view>
  85. </view>
  86. <view class="area">
  87. <view class="c-row b-b">
  88. <checkbox style='transform: scale(0.8);' :checked="checked" @click='checkedbox'></checkbox><text style="font-size: 14px; ">完善更多信息<text style="font-size: 10px; color: #AFB3BF;">(选填,可由客服人员代为完善)</text></text>
  89. </view>
  90. <view v-if='checked' class="c-row b-b">
  91. <text class="tit">水分(%)<= </text>
  92. <view class="con-list">
  93. <input placeholder="请填写水分占比" name="input" v-model="deptList.waterContent"></input>
  94. </view>
  95. </view>
  96. <view v-if='checked' class="c-row b-b">
  97. <text class="tit">容重(g/L)<= </text>
  98. <view class="con-list">
  99. <input placeholder="请填写容重" name="input" v-model="deptList.bulkDensity"></input>
  100. </view>
  101. </view>
  102. <view v-if='checked' class="c-row b-b">
  103. <text class="tit">热损伤(%)<= </text>
  104. <view class="con-list">
  105. <input placeholder="请填写热损伤占比" name="input" v-model="deptList.jiaorenli"></input>
  106. </view>
  107. </view>
  108. <view v-if='checked' class="c-row b-b">
  109. <text class="tit">杂质(%)<= </text>
  110. <view class="con-list">
  111. <input placeholder="请填写杂质占比" name="input" v-model="deptList.impurity"></input>
  112. </view>
  113. </view>
  114. <view v-if='checked' class="c-row b-b">
  115. <text class="tit">霉变粒(%)<= </text>
  116. <view class="con-list">
  117. <input placeholder="请填写霉变粒占比" name="input" v-model="deptList.mildewGrain"></input>
  118. </view>
  119. </view>
  120. <view v-if='checked' class="c-row b-b">
  121. <text class="tit">不完整粒(%)<= </text>
  122. <view class="con-list">
  123. <input placeholder="请填写不完整粒占比" name="input" v-model="deptList.imperfectGrain"></input>
  124. </view>
  125. </view>
  126. <view v-if='checked' class="c-row b-b">
  127. <text class="tit">蛋白(%)<= </text>
  128. <view class="con-list">
  129. <input placeholder="请填写蛋白占比" name="input" v-model="deptList.protein"></input>
  130. </view>
  131. </view>
  132. <view v-if='checked' class="c-row b-b">
  133. <text class="tit">粒型 </text>
  134. <picker @change="liChange" :value="liIndex" :range="liType" class="con-list" v-model="deptList.grain">
  135. <view class="con-list">
  136. {{liIndex>-1?liType[liIndex]:'请选择粒型'}}
  137. </view>
  138. </picker>
  139. </view>
  140. <view v-if='checked' class="c-row b-b">
  141. <text class="tit">品级 </text>
  142. <picker @change="pinChange" :value="pinIndex" :range="pinType" class="con-list" v-model="deptList.grade">
  143. <view class="con-list">
  144. {{pinIndex>-1?pinType[pinIndex]:'请选择品级'}}
  145. </view>
  146. </picker>
  147. </view>
  148. <view v-if='checked' class="c-row b-b">
  149. <text class="tit">产出年份</text>
  150. <picker @change="nianChange" :value="nianIndex" :range="nianType" class="con-list">
  151. <view class="con-list">
  152. {{nianIndex>-1?nianType[nianIndex]:'请选择产出年份'}}
  153. </view>
  154. </picker>
  155. </view>
  156. <view v-if='checked' class="c-row b-b">
  157. <text class="tit">包装方式</text>
  158. <picker @change="baoChange" :value="baoIndex" :range="baoType" class="con-list">
  159. <view class="con-list">
  160. {{baoIndex>-1?baoType[baoIndex]:'请选择包装方式'}}
  161. </view>
  162. </picker>
  163. </view>
  164. <view v-if='checked&&baoIndex==2||!checked&&baoIndex==3' class="c-row b-b">
  165. <text class="tit">袋装备注</text>
  166. <view class="con-list">
  167. <input placeholder="请填写袋装备注" name="input" v-model="deptList.baggingNotes"></input>
  168. </view>
  169. </view>
  170. <view v-if='checked' class="c-row b-b">
  171. <text class="tit">运费承担方</text>
  172. <picker @change="chengChange" :value="chengIndex" :range="chengType" class="con-list">
  173. <view class="con-list">
  174. {{chengIndex>-1?chengType[chengIndex]:'请选择运费承担方'}}
  175. </view>
  176. </picker>
  177. </view>
  178. </view>
  179. <button @click="commit()" class="btn">重新发布</button>
  180. </view>
  181. </template>
  182. <script>
  183. import {
  184. mapState
  185. } from 'vuex';
  186. export default {
  187. data() {
  188. return {
  189. types: '',
  190. goods:{},
  191. typesType: ["现货", "期货"],
  192. typesIndex: 0,
  193. deptList: {
  194. salePlanTypeKey:0,
  195. grainKey:0,
  196. gradeKey:0,
  197. packingTypeKey:0,
  198. freightPayerKey:-1,
  199. priceType: "定价采购",
  200. procurementPlanType:"现货",
  201. grain:"不限",
  202. grade:"不限",
  203. outputYear:"2020",
  204. packingType:"不限",
  205. freightPayer:"",
  206. },
  207. params:{
  208. province: true,
  209. city: true,
  210. area: true,
  211. },
  212. params1:{
  213. province: true,
  214. city: true,
  215. },
  216. checked:true,
  217. insertProcurementPlanInfo: {},
  218. liIndex: 0,
  219. liType: ['不限','塔粮', '筛粮', '中粒', '大粒'],
  220. pinIndex: -1,
  221. pinType: ['不限', '一等品', '二等品', '三等品', '等外'],
  222. nianIndex: 3,
  223. nianType: ['2023', '2022', '2021', '2020', '2019', '2018', '2017', '2016', '2015', '2014', '2013', '2012',
  224. '2011'
  225. ],
  226. id:0,
  227. sendText:'获取验证码',
  228. show:false,
  229. show1:false,
  230. region:'请选择收货地区',
  231. region1:'请选择产地',
  232. baoIndex: 0,
  233. baoType: ['不限', '散装', '大袋', '小袋'],
  234. chengIndex: -1,
  235. chengType: ['可议', '买方承担', '卖方承担']
  236. }
  237. },
  238. computed: {
  239. ...mapState(['hasLogin','userInfo'])
  240. },
  241. onLoad(options){
  242. this.id=options.id
  243. if(options.customerName){
  244. this.deptList.buyer = options.customerName
  245. }
  246. },
  247. onShow(){
  248. this.getList()
  249. var that=this
  250. this.$api.doRequest('get', '/identityAuthenticationInfo/getInfo',{commonId:this.userInfo.id}).then(res => {
  251. if(res.data.code==200){
  252. if(res.data.data.customerTypeFlag==1){
  253. that.$set(this.deptList,'buyer',res.data.data.customerName)
  254. }else{
  255. that.$set(this.deptList,'buyer',res.data.data.compName)
  256. }
  257. this.goods=res.data.data
  258. }
  259. uni.hideLoading()
  260. })
  261. },
  262. methods: {
  263. getList(){
  264. this.$api.doRequest('get','/procurementPlanInfo/getProcurementPlan',{id:this.id}).then(res => {
  265. if(res.data.code==200){
  266. this.deptList = res.data.data
  267. let number = this.deptList.basisPrice
  268. this.deptList.basisPrice = Math.abs(number)
  269. this.region1=this.deptList.outputPrivate+'-'+this.deptList.outputCity
  270. this.region=this.deptList.receivePrivate+'-'+this.deptList.receiveCity+'-'+this.deptList.receiveArea
  271. if(this.deptList.procurementPlanTypeKey==2){
  272. this.typesIndex=1
  273. }else if(this.deptList.procurementPlanTypeKey==1){
  274. this.typesIndex=0
  275. }
  276. if(this.deptList.grainKey==1){
  277. this.liIndex=0
  278. }else if(this.deptList.grainKey==2){
  279. this.liIndex=1
  280. }else if(this.deptList.grainKey==3){
  281. this.liIndex=2
  282. }else if(this.deptList.grainKey==4){
  283. this.liIndex=3
  284. }else if(this.deptList.grainKey==5){
  285. this.liIndex=4
  286. }
  287. this.baoIndex=this.deptList.packingTypeKey
  288. this.pinIndex=this.deptList.gradeKey
  289. if(this.deptList.freightPayerKey==1){
  290. this.chengIndex=0
  291. }else if(this.deptList.freightPayerKey==2){
  292. this.chengIndex=1
  293. }else if(this.deptList.freightPayerKey==3){
  294. this.chengIndex=2
  295. }
  296. // let number = this.deptList.basisPrice
  297. // deptList.basisPrice
  298. }
  299. })
  300. .catch(res => {
  301. uni.showToast({
  302. title: res.errmsg,
  303. icon:'none',
  304. duration: 2000
  305. })
  306. });
  307. },
  308. getcode(){
  309. var that = this
  310. if(/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(this.deptList.buyerPhone)){
  311. this.$api.doRequest('get','/commonUser/sendVerifyCode',{phone:this.deptList.buyerPhone}).then(res => {
  312. if(res.data.code==200){
  313. that.sendDisabled = true
  314. let sec = 60
  315. let interval = setInterval(() => {
  316. sec--;
  317. that.sendText = sec + 's后重发'
  318. if (sec <= 0) {
  319. that.sendDisabled = false
  320. that.sendText = "获取验证码"
  321. clearInterval(interval)
  322. }
  323. }, 1000)
  324. }else{
  325. uni.showToast({
  326. title: res.data.message,
  327. icon:'none',
  328. duration: 2000
  329. })
  330. }
  331. })
  332. .catch(res => {
  333. uni.showToast({
  334. title: res.data.message,
  335. icon:'none',
  336. duration: 2000
  337. })
  338. });
  339. }else{
  340. uni.showToast({
  341. title: '请输入正确的手机号',
  342. icon:'none',
  343. duration: 2000
  344. })
  345. }
  346. },
  347. regionpicker(e){
  348. this.deptList.receivePrivate=e.province.label
  349. this.deptList.receiveCity=e.city.label
  350. this.deptList.receiveArea=e.area.label
  351. this.region=e.province.label+'-'+e.city.label+'-'+e.area.label
  352. },
  353. regionchange(){
  354. this.show=true
  355. },
  356. regionpicker1(e){
  357. this.deptList.outputPrivate=e.province.label
  358. this.deptList.outputCity=e.city.label
  359. this.region1=e.province.label+'-'+e.city.label
  360. },
  361. regionchange1(){
  362. this.show1=true
  363. },
  364. checkedbox(e){
  365. this.checked = !this.checked
  366. },
  367. typeChange(e) {
  368. this.typesIndex = e.detail.value
  369. if(e.detail.value==0){
  370. this.deptList.priceType = '定价采购'
  371. this.deptList.procurementPlanTypeKey =2
  372. }else{
  373. this.deptList.priceType = '期货盘面价+基差'
  374. this.deptList.procurementPlanTypeKey =1
  375. }
  376. this.deptList.procurementPlanType = this.typesType[this.typesIndex];
  377. },
  378. navToDetailPage() {
  379. // if (index == 1) {
  380. uni.navigateTo({
  381. url: `/pageD/myRelease/Identity_switching?id=`+this.id
  382. })
  383. },
  384. commit() {
  385. // if (!this.deptList.goodsName) {
  386. // this.$api.msg('货名1不能为空')
  387. // return
  388. // }
  389. if (!this.deptList.title) {
  390. this.$api.msg('标题不能为空')
  391. return
  392. }
  393. if (this.deptList.title.length>16||this.deptList.title.length<2) {
  394. this.$api.msg('标题输入错误')
  395. return
  396. }
  397. if (!this.deptList.goodsName) {
  398. this.$api.msg('货名不能为空')
  399. return
  400. }
  401. if (this.deptList.goodsName.length>6||this.deptList.goodsName.length<1) {
  402. this.$api.msg('货名输入错误')
  403. return
  404. }
  405. if (!this.deptList.plannedPurchaseVolume) {
  406. this.$api.msg('采购量不能为空')
  407. return
  408. }
  409. if (this.deptList.plannedPurchaseVolume>100000||this.deptList.plannedPurchaseVolume<1) {
  410. this.$api.msg('采购量输入错误')
  411. return
  412. }
  413. // var plannedPurchaseVolume = this.deptList.plannedPurchaseVolume.toString()
  414. if (this.deptList.plannedPurchaseVolume.toString().indexOf(".") != -1) {
  415. if(this.deptList.plannedPurchaseVolume.split('.')[1].length>2){
  416. this.$api.msg('采购量输入错误')
  417. return
  418. }
  419. }
  420. if (!this.deptList.minimumVolume) {
  421. this.$api.msg('最小成交量不能为空')
  422. return
  423. }
  424. if (this.deptList.minimumVolume>100000||this.deptList.minimumVolume<1) {
  425. this.$api.msg('最小成交量输入错误')
  426. return
  427. }
  428. if (this.deptList.minimumVolume.toString().indexOf('.')!=-1) {
  429. if(this.deptList.minimumVolume.split('.')[1].length>2){
  430. this.$api.msg('最小成交量输入错误')
  431. return
  432. }
  433. }
  434. if (!this.deptList.procurementPlanType) {
  435. this.$api.msg('类型不能为空')
  436. return
  437. }
  438. if (!this.deptList.priceType) {
  439. this.$api.msg('价格类型不能为空')
  440. return
  441. }
  442. if(this.deptList.procurementPlanType == '现货'){
  443. if (!this.deptList.procurementPrice) {
  444. this.$api.msg('单价不能为空')
  445. return
  446. }
  447. if (this.deptList.procurementPrice>100000||this.deptList.procurementPrice<1) {
  448. this.$api.msg('单价输入错误')
  449. return
  450. }
  451. if (this.deptList.procurementPrice.indexOf('.')!=-1) {
  452. if(this.deptList.procurementPrice.split('.')[1].length>2){
  453. this.$api.msg('单价输入错误')
  454. return
  455. }
  456. }
  457. }else if(this.deptList.procurementPlanType == '期货'){
  458. if (!this.deptList.basisPrice) {
  459. this.$api.msg('基差不能为空')
  460. return
  461. }
  462. if (this.deptList.basisPrice>10000||this.deptList.basisPrice<1) {
  463. this.$api.msg('基差输入错误')
  464. return
  465. }
  466. if (this.deptList.basisPrice.toString().indexOf('.')!=-1) {
  467. if(this.deptList.basisPrice.toString().split('.')[1].length>2){
  468. this.$api.msg('基差输入错误')
  469. return
  470. }
  471. }
  472. }
  473. if (!this.deptList.buyerPhone) {
  474. this.$api.msg('买方手机号不能为空')
  475. return
  476. }
  477. if(this.checked == false){
  478. if (this.deptList.waterContent&&this.deptList.waterContent<1||
  479. this.deptList.waterContent&&this.deptList.waterContent>40) {
  480. this.$api.msg('水分输入错误')
  481. return
  482. }
  483. if (this.deptList.waterContent&&this.deptList.waterContent.indexOf('.')!=-1) {
  484. if(this.deptList.waterContent.split('.')[1].length>2){
  485. this.$api.msg('水分输入错误')
  486. return
  487. }
  488. }
  489. if (this.deptList.bulkDensity&&this.deptList.bulkDensity<500||
  490. this.deptList.bulkDensity&&this.deptList.bulkDensity>1000) {
  491. this.$api.msg('容重输入错误')
  492. return
  493. }
  494. if (this.deptList.jiaorenli&&this.deptList.jiaorenli<1||
  495. this.deptList.jiaorenli&&this.deptList.jiaorenli>40) {
  496. this.$api.msg('热损伤输入错误')
  497. return
  498. }
  499. if (this.deptList.jiaorenli&&this.deptList.jiaorenli.indexOf('.')!=-1) {
  500. if(this.deptList.jiaorenli.split('.')[1].length>2){
  501. this.$api.msg('热损伤输入错误')
  502. return
  503. }
  504. }
  505. if (this.deptList.impurity&&this.deptList.impurity<1||
  506. this.deptList.impurity&&this.deptList.impurity>40) {
  507. this.$api.msg('杂质输入错误')
  508. return
  509. }
  510. if (this.deptList.impurity&&this.deptList.impurity.indexOf('.')!=-1) {
  511. if(this.deptList.impurity.split('.')[1].length>2){
  512. this.$api.msg('杂质输入错误')
  513. return
  514. }
  515. }
  516. if (this.deptList.mildewGrain&&this.deptList.mildewGrain<1||
  517. this.deptList.mildewGrain&&this.deptList.mildewGrain>40) {
  518. this.$api.msg('霉变粒输入错误')
  519. return
  520. }
  521. if (this.deptList.mildewGrain&&this.deptList.mildewGrain.indexOf('.')!=-1) {
  522. if(this.deptList.mildewGrain.split('.')[1].length>2){
  523. this.$api.msg('霉变粒输入错误')
  524. return
  525. }
  526. }
  527. if (this.deptList.imperfectGrain&&this.deptList.imperfectGrain<1||
  528. this.deptList.imperfectGrain&&this.deptList.imperfectGrain>40) {
  529. this.$api.msg('不完整粒输入错误')
  530. return
  531. }
  532. if (this.deptList.imperfectGrain&&this.deptList.imperfectGrain.indexOf('.')!=-1) {
  533. if(this.deptList.imperfectGrain.split('.')[1].length>2){
  534. this.$api.msg('不完整粒输入错误')
  535. return
  536. }
  537. }
  538. if (this.deptList.protein && this.deptList.protein < 1 ||
  539. this.deptList.protein && this.deptList.protein > 80) {
  540. this.$api.msg('蛋白输入错误')
  541. return
  542. }
  543. if (this.deptList.protein && this.deptList.protein.indexOf('.')!=-1) {
  544. if(this.deptList.protein.split('.')[1].length>2){
  545. this.$api.msg('蛋白输入错误')
  546. return
  547. }
  548. }
  549. }
  550. this.insertProcurementPlanInfo = this.deptList
  551. if(this.deptList.procurementPlanType == '期货'){
  552. this.insertProcurementPlanInfo.basisPrice=-this.insertProcurementPlanInfo.basisPrice
  553. }
  554. this.insertProcurementPlanInfo.commonId = this.userInfo.id
  555. this.insertProcurementPlanInfo.compId = "2710b21efc1e4393930c5dc800010dc4"
  556. uni.showModal({
  557. content: '重新发布后交易信息将进入待审核状态,是否确定重新发布?',
  558. success: (res) => {
  559. if(res.confirm) {
  560. this.$api.doRequest('post', '/procurementPlanInfo/api/editProcurementPlan', this
  561. .insertProcurementPlanInfo).then(res => {
  562. if(res.data.code==200){
  563. uni.showToast({
  564. title: "发布成功",
  565. icon: 'none',
  566. })
  567. this.deptList={}
  568. uni.navigateTo({
  569. url: `/pages/release/release`
  570. })
  571. }else{
  572. uni.showToast({
  573. title: res.data.message,
  574. icon: 'none',
  575. duration: 2000
  576. })
  577. }
  578. })
  579. .catch(res => {
  580. uni.showToast({
  581. title: res.errmsg,
  582. icon: 'none',
  583. duration: 2000
  584. })
  585. });
  586. }
  587. }
  588. })
  589. },
  590. liChange(e) {
  591. this.liIndex = e.detail.value
  592. this.litypes = this.liType[this.liIndex];
  593. this.deptList.grainKey = e.detail.value+1
  594. this.deptList.grain = this.liType[this.liIndex]
  595. },
  596. pinChange(e) {
  597. this.pinIndex = e.detail.value
  598. this.pintypes = this.pinType[this.pinIndex];
  599. this.deptList.gradeKey = e.detail.value
  600. this.deptList.grade = this.pinType[this.pinIndex]
  601. },
  602. nianChange(e) {
  603. this.nianIndex = e.detail.value
  604. this.niantypes = this.nianType[this.nianIndex];
  605. this.deptList.outputYear = this.baoType[this.baoIndex]
  606. },
  607. baoChange(e) {
  608. this.baoIndex = e.detail.value
  609. this.baotypes = this.baoType[this.baoIndex];
  610. this.deptList.packingTypeKey = e.detail.value
  611. this.deptList.packingType = this.baoType[this.baoIndex];
  612. },
  613. chengChange(e) {
  614. this.chengIndex = e.detail.value
  615. this.chengtypes = this.chengType[this.chengIndex];
  616. this.deptList.freightPayerKey = e.detail.value+1
  617. this.deptList.freightPayer = this.chengType[this.chengIndex];
  618. }
  619. }
  620. }
  621. </script>
  622. <style>
  623. .center {
  624. padding: 10px 20px;
  625. background-color: #F5F6FA;
  626. }
  627. .c-row {
  628. display: -webkit-box;
  629. display: -webkit-flex;
  630. display: flex;
  631. -webkit-box-align: center;
  632. -webkit-align-items: center;
  633. align-items: center;
  634. padding: 20rpx 30rpx;
  635. position: relative;
  636. }
  637. .con-list {
  638. -webkit-box-flex: 1;
  639. -webkit-flex: 1;
  640. flex: 1;
  641. display: -webkit-box;
  642. display: -webkit-flex;
  643. display: flex;
  644. -webkit-box-orient: vertical;
  645. -webkit-box-direction: normal;
  646. -webkit-flex-direction: column;
  647. flex-direction: column;
  648. color: #AFB3BF;
  649. line-height: 40rpx;
  650. text-align: right;
  651. padding-right: 20rpx;
  652. font-size: 14px;
  653. }
  654. .area{
  655. background-color: #FFFFFF;
  656. border-radius: 20px;
  657. margin-top: 10px;
  658. }
  659. .btn{
  660. margin-top: 10px;
  661. border-radius: 20px;
  662. background-color: #22C572;
  663. color: #FFFFFF;
  664. }
  665. </style>