shish 4 лет назад
Родитель
Сommit
bb8bf2a616

+ 1 - 0
hdApp/src/admin/home/apply.vue

@@ -45,6 +45,7 @@ export default {
           list: [
             { name: "制作单", img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`, url: "/admin/work/list",pf:1},
             { name: "制作统计", img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`, url: "/admin/work/statCat",pf:1},
+            { name: "制作设置", img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`, url: "/admin/work/set",pf:1},
           ]
         },
         {

+ 20 - 16
hdApp/src/admin/work/list.vue

@@ -1,13 +1,11 @@
 <template>
   <view class="app-main app-content">
     <view class="input-wrap_box">
-
       <view @click="setSearchType" style="font-size:30upx;margin-right:10upx;color:#666666">
       <text>{{searchTypeName}}</text>
+      <i class="iconfont iconsanjiao_xia"></i>
       </view>
-
       <view> <AppSearchModule placeholder="请输入" @input="searchFn"/> </view>
-
       <view class="select-dn_bx">
         <DateSelect class="bar" top="0" @selectDateFn="selectDateFn" defaultShowName='时间' />
       </view>
@@ -59,7 +57,7 @@ export default {
   data() {
     return {
     	orderId:'',
-      seekVal: "",
+      searchText: "",
       isShow: false,
       customizationTime: [],
       customizationTimeType: "",
@@ -88,8 +86,8 @@ export default {
         categoryId: "",
         usageId: "",
       },
-      searchType:1, // 默认搜索类别为:编号
-      searchTypeName:'号',
+      searchType:1,
+      searchTypeName:'美团号',
       searchTime:'',
       startTime:'',
       endTime:''
@@ -141,15 +139,15 @@ export default {
     setSearchType(){
       let that = this
       uni.showActionSheet({
-        itemList: ['搜索类型:', '名称', '编号'],
+        itemList: ['搜索类型:', '美团号', '编号'],
         success: function (respond) {
           let currentIndex = respond.tapIndex
           if(currentIndex == 0){
-            that.$msg('搜索类型出错')
+            that.$msg('请选择类型')
             return false
           }
-          that.searchType = Number(currentIndex) - 1
-          that.searchTypeName = that.searchType == 0 ? '名称' : '编号'
+          that.searchType = Number(currentIndex)
+          that.searchTypeName = that.searchType == 0 ? '美团号' : '编号'
           that.searchFn()
         }
       })
@@ -163,19 +161,25 @@ export default {
     },
     searchFn(e) {
       this.resetList();
-      this.seekVal = e;
+      this.searchText = e;
       this._list()
     },
     _list() {
-      return getWorkList({
+      let params = {
         searchTime: this.searchTime,
         startTime: this.startTime,
         endTime: this.endTime,
         status: this.tabs[this.tabIndex].id,
-        name: this.seekVal,
-        page: this.list.page,
-        searchType:this.searchType,
-      }).then((res) => {
+        page: this.list.page
+      }
+      if(this.searchType == 1){
+        params = {...params,thirdSn:this.searchText}
+      }else if(this.searchType == 2){
+        params = {...params,sn:this.searchText}
+      }else{
+
+      }
+      return getWorkList(params).then((res) => {
         this.completes(res);
         if (this.$util.isEmpty(res.data)){
           return false

+ 102 - 0
hdApp/src/admin/work/set.vue

@@ -0,0 +1,102 @@
+<template>
+  <div class="app-content">
+    <div>
+      <form @submit="formSubmit">
+        <div class="module-com input-line-wrap">
+
+          <tui-list-cell class="line-cell" :arrow="false">
+            <div class="tui-title">美团独立:</div>
+
+            <radio-group class="tui-input" @change="aloneChange">
+              <label class="list" for="cModelBz">
+                <radio id="cModelBz" value="0" :checked="alone == 0" />
+                <span class="checkbox-text">否</span>
+              </label>
+              <label class="list" for="cModeJy">
+                <radio id="cModeJy" value="1" :checked="alone == 1" />
+                <span class="checkbox-text">是</span>
+              </label>
+            </radio-group>
+
+          </tui-list-cell>
+
+        </div>
+        <div class="confirm-btn">
+          <button class="admin-button-com big blue" formType="submit">保存</button>
+        </div>
+      </form>
+    </div>
+  </div>
+</template>
+<script>
+import TuiListCell from "@/components/plugin/list-cell";
+import { updateMtAlone } from "@/api/shop/ext.js";
+export default {
+  name: "set",
+  components: {TuiListCell},
+  data() {
+    return {
+      form:{
+        cgPerCost:'',
+      },
+      hasLoad:false,
+      alone:0
+    };
+  },
+  onLoad() {
+  },
+  onShow() {
+
+  },
+  methods: {
+    aloneChange(e){
+			  let value = e.detail.value
+        this.alone = value
+    },
+    formSubmit() {
+      let that = this
+      updateMtAlone({alone:that.alone}).then(res=>{
+          if(res.code == 1){
+            that.$msg('操作成功')
+            uni.navigateBack({})
+          }
+      })
+    }
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.app-content {
+  min-height: calc(100vh - 20upx);
+  padding-top: 20upx;
+}
+.prompt-text {
+  color: $fontColor3;
+  padding-left: 30upx;
+  margin-bottom: 30upx;
+}
+.module-com {
+  margin-bottom: 20upx;
+  .member-wrap {
+    .member-det {
+      font-size: 24upx;
+      margin-left: 20upx;
+    }
+  }
+  .remark-wrap {
+    align-items: flex-start;
+    .remark {
+      height: 240upx;
+    }
+  }
+}
+// 按钮
+.confirm-btn {
+  width: calc(100% - 60upx);
+  margin: 60upx 30upx 20upx;
+  .admin-button-com {
+    width: 100%;
+  }
+}
+</style>

+ 4 - 0
hdApp/src/api/shop/ext.js

@@ -3,3 +3,7 @@ import https from '@/plugins/luch-request_0.0.7/request'
 export const getGhsXj = data => {
 	return https.get('/shop-ext/get-ghs-xj', data)
 }
+
+export const updateMtAlone = data => {
+	return https.get('/shop-ext/update-mt-alone', data)
+}

+ 2 - 1
hdApp/src/pages.json

@@ -17,7 +17,8 @@
 				{"path": "statCatItem","style": {"navigationBarTitleText": "明细"}},
 				{"path": "addResult","style": {"navigationBarTitleText": "新建成功"}},
 				{"path": "list","style": {"navigationBarTitleText": "列表","enablePullDownRefresh": true}},
-				{"path": "detail","style": {"navigationBarTitleText": "详情"}}
+				{"path": "detail","style": {"navigationBarTitleText": "详情"}},
+				{"path": "set","style": {"navigationBarTitleText": "设置"}}
 			]
 		},
 		{

+ 27 - 2
hdPad/src/pages/home/components/workList.vue

@@ -26,6 +26,13 @@
                 </view>
             </view>
         </scroll-view>
+        <view style="width:35upx;height:35upx;position:fixed;bottom:10upx;left:178upx;background-color:#3385FF;border-radius:30upx;display:flex;justify-content:center;align-items:center;
+        font-size:16upx;color:white;" @click="select()">查</view>
+
+		<uni-popup ref="inputDialog" type="dialog">
+			<uni-popup-dialog ref="inputClose"  mode="input" :title="snTitle" value="" placeholder="请输入" @confirm="dialogInputConfirm"></uni-popup-dialog>
+		</uni-popup>
+
     </view>
 </template>
 <script>
@@ -56,7 +63,10 @@ export default {
             selectOrderId:0,
             triggered:false,
             _freshing: false,
-            today:''
+            today:'',
+            sn:'',
+            thirdSn:'',
+            snTitle:'编号'
         }
     },
     watch:{
@@ -69,8 +79,23 @@ export default {
     },
     created(){
         this.getWorkInfo()
+        if(this.mt == 'yes'){
+            this.snTitle = '美团编号'
+        }
     },
     methods:{
+        dialogInputConfirm(val){
+            this.resetList()
+            if(this.mt == 'yes'){
+                this.thirdSn = val
+            }else{
+                this.sn = val
+            }
+            this.getWorkInfo()
+        },
+        select(){
+            this.$refs.inputDialog.open('center')
+        },
         onRefresh(){
             if (this._freshing){
                 return
@@ -113,7 +138,7 @@ export default {
             }
         },
         getWorkInfo(){
-            let params = {page: this.list.page,status:this.status}
+            let params = {page: this.list.page,status:this.status,sn:this.sn,thirdSn:this.thirdSn}
             if(this.mt == 'yes'){
                 params = {...params,fromType:4}
             }