linwenxin 1 tahun lalu
induk
melakukan
f8e17864b7

+ 22 - 5
src/views/secondHandMall/commodityManagement/form.vue

@@ -17,7 +17,7 @@
       <el-button v-if="formData.id && ~['ON'].indexOf(formData.status)" type="primary" size="small"
         @click="setStatus('OFF')">下架</el-button>
       <el-button v-if="formData.id && ~['ON', 'OFF'].indexOf(formData.status)" type="primary" size="small"
-        @click="setStatus('SALE')">转销售</el-button>
+        @click="zhuanxiaoshou">转销售</el-button>
       <el-button v-if="formData.id && ~['OFF'].indexOf(formData.status)" type="primary" size="small"
         @click="setStatus('ON')">重新上架</el-button>
       <el-button size="small" @click="handleClose">取消</el-button>
@@ -201,7 +201,7 @@ export default {
       ]
     },
     // esOrderInfo
-    formItems2() {
+    formItems2 () {
       return [{
         name: 'slot-component',
         md: 24,
@@ -250,7 +250,7 @@ export default {
                     </div>
                 </div>
               </el-col>
-              <el-col xs={24} sm={24} md={8} lg={8} xl={8}>
+              {~['SEND','OVER'].indexOf(this?.formData?.esOrderInfo?.status)?<el-col xs={24} sm={24} md={8} lg={8} xl={8}>
                 <div class='info'>
                   <div class='info_title'>物流信息</div>
                   <div class='info_bottom'>
@@ -264,13 +264,20 @@ export default {
                       <div>快递单号:{this?.formData?.esOrderInfo?.logisticsNo}</div>
                       <div>快递公司:{this?.formData?.esOrderInfo?.logisticsName}</div>
                       <el-button type='primary' size='small' onClick={() => { 
-                      
+                        this.$router.push({
+                          name: 'orderManagement',
+                          params: {
+                            pageName: this?.formData?.esOrderInfo?.esOrderId,
+                            pageType: 'materialFlow',
+                            pageCode: this?.formData?.esOrderInfo?.esOrderId,
+                          },
+                        })
                       }}>查看物流
                       </el-button>
                     </div>
                   </div>
                 </div>
-              </el-col>
+              </el-col>:null}
             </el-row>
           </div>)
         }
@@ -428,6 +435,16 @@ export default {
     },
     handleClose() {
       this.$emit('back')
+    },
+    zhuanxiaoshou(){
+      this.$router.push({
+        name: 'orderManagement',
+        params: {
+          pageName: this.detailId,
+          pageType: 'add',
+          pageCode: this.detailId,
+        },
+      })
     }
   }
 }

+ 63 - 0
src/views/secondHandMall/orderManagement/add.vue

@@ -440,6 +440,69 @@ export default {
     })
     esGoodsList({"pageNum":1,"pageSize":-1,"params":[{"param":"a.status","compare":"=","value":"ON"}]}).then(res=>{
       this.esGoodsList = res.data.records
+      if(this?.$route?.params?.pageType==="add" && this?.$route?.params?.pageCode){
+        var data = this.esGoodsList.find( item => item.id===this?.$route?.params?.pageCode )
+        this.formData.esOrderInfos.push({
+          "area": "",
+          "brandName": data?.brand ||'',
+          "city": "",
+          "companyName": "",
+          "companyWechatId": "",
+          "createBy": "",
+          "createTime": "",
+          "energyLabel": data?.mark ||'',
+          "esCategoryId": data?.categoryId ||'',
+          "esCategoryName": data?.categoryName ||'',
+          "esGoodsId": this?.$route?.params?.pageCode,
+          "esGoodsName": "",
+          "esOrderId": "",
+          "fileUrl": "",
+          "goodsNote": "",
+          "goodsPrice": "",
+          "goodsUrl": "",
+          "logisticsCode": "",
+          "logisticsName": "",
+          "logisticsNo": "",
+          "num": "",
+          "overTime": "",
+          "payStartTime": "",
+          "payTime": "",
+          "payType": "",
+          "pickType": "",
+          "power": data?.power ||'',
+          "productionTime": data?.makeDate ||'',
+          "province": "",
+          "receAddress": "",
+          "refundNum": 0,
+          "refundPrice": 0,
+          "remark": "",
+          "saleType": 2,
+          "sellId": "",
+          "sellMobile": "",
+          "sellName": "",
+          "sellTime": "",
+          "sellUrl": "",
+          "sendName": "",
+          "sendTime": "",
+          "source": "",
+          "status": "",
+          "street": "",
+          "totalAmount": (Number(data?.price) * Number(data?.qty)).toFixed(2),
+          "transactionId": "",
+          "unit": '台',
+          "updateBy": "",
+          "updateTime": "",
+          "userAddressId": "",
+          "userMobile": "",
+          "userName": "",
+          "wechatUserId": "",
+          "wechatUserMobile": "",
+          "wechatUserName": "",
+          "wechatUserUrl": "",
+          sjNum:data?.qty ||''
+        })
+        this.isEditTableIndex = 0
+      }
     })
   },
   methods: {

+ 18 - 0
src/views/secondHandMall/orderManagement/index.vue

@@ -222,6 +222,9 @@ export default {
   components: {add, detailsV, materialFlow, deliverGoods},
   data() {
     return {
+      pageType:this?.$route?.params?.pageType,
+      pageCode:this?.$route?.params?.pageCode,
+      pagePam:this?.$route?.params?.pagePam,
       screenForm: { // 筛选表单数据
         orderId: '', // 订单号
         esGoodsName: '', // 商品名称
@@ -247,6 +250,21 @@ export default {
   },
   created() {
     this.getList();
+    if(this.pageType==="detail" && this.pageCode){
+      this.$nextTick(()=>{
+        this.viewDetails({esOrderId:this.pageCode},0)
+      })
+    }
+    if(this.pageType==="materialFlow" && this.pageCode){
+      this.$nextTick(()=>{
+        this.viewMaterialFlow({esOrderId:this.pageCode})
+      })
+    }
+    if(this.pageType==="add" && this.pageCode){
+      this.$nextTick(()=>{
+        this.add()
+      })
+    }
   },
   methods: {
     quedingesOrderPayOk(row){