浏览代码

no message

linwenxin 7 月之前
父节点
当前提交
759c5ba188
共有 1 个文件被更改,包括 7 次插入9 次删除
  1. 7 9
      src/packageAttachment/pages/applicationParts/applicationPartsForm.vue

+ 7 - 9
src/packageAttachment/pages/applicationParts/applicationPartsForm.vue

@@ -20,19 +20,17 @@
                 <radio-group
                   @change="
                     d => {
-                      form.applyCategoryValue = d.detail.value
+                      form.applyCategory = d.detail.value
                     }
                   "
                 >
                   <label style="margin-right: 20upx">
-                    <radio value="HOME" :checked="form.applyCategoryValue === 'HOME'" />家用空调
+                    <radio value="HOME" :checked="form.applyCategory === 'HOME'" />家用空调
                   </label>
-                  <label> <radio value="TRADE" :checked="form.applyCategoryValue === 'TRADE'" />商用空调 </label>
+                  <label> <radio value="TRADE" :checked="form.applyCategory === 'TRADE'" />商用空调 </label>
                   <br />
                   <br />
-                  <label>
-                    <radio value="ELEC" :checked="form.applyCategoryValue === 'ELEC'" />生活电器(小家电)
-                  </label>
+                  <label> <radio value="ELEC" :checked="form.applyCategory === 'ELEC'" />生活电器(小家电) </label>
                 </radio-group>
               </view>
             </view>
@@ -246,7 +244,7 @@ export default {
       this.form.itemList.splice(index, 1)
     },
     save() {
-      if (~['', undefined].indexOf(this.form.applyCategoryValue)) {
+      if (~['', undefined].indexOf(this.form.applyCategory)) {
         uni.showModal({
           title: '提示',
           content: '必须选择申请类别',
@@ -280,9 +278,9 @@ export default {
       }
       //
       this.$api
-        .post('/app/worker/parts-sales/add', this.form)
+        .postJson('/app/worker/parts-sales/add', this.form)
         .then(res => {
-          if (res.code === 1) {
+          if (res.code === 200) {
             uni.redirectTo({
               url: `/packageAttachment/pages/applicationParts/confirmOrder?id=${res.data.id}`
             })