Browse Source

报价单

zhaoxiaohai 3 years ago
parent
commit
67b28ca153

+ 9 - 6
packageA/offers/addProjectOffer.js

@@ -41,16 +41,16 @@ Page({
             checking: "base",
             required: false
         }, {
-            label: "有效截止期",
+            label: "有效期",
             error: false,
             errMsg: "",
-            type: "date",
+            type: "dateRange",
             start: getTime.formatTime(new Date(), '-').split(' ')[0],
-            value: "",
-            placeholder: "报价有效截止日期",
+            value: [getTime.formatTime(new Date(), '-').split(' ')[0], ""],
+            placeholder: ['生效日期', '截止日期'],
             valueName: "invaliddate",
             checking: "base",
-            required: false
+            required: true
         }],
         "content": {
             "sa_quotedpriceid": 0, //报价单id
@@ -168,7 +168,10 @@ Page({
         content.sys_enterpriseid = content.sys_enterpriseid[1][0] || '';
         content.sa_projectid = content.sa_projectid[1][0] || '';
         content.contactsid = content.contactsid[1][0] || '';
-        console.log(content)
+
+        content.begdate = content.invaliddate[0];
+        content.enddate = content.invaliddate[1];
+        delete(content.invaliddate)
         _Http.basic({
             "id": 20221020164803,
             "version": 1,

+ 9 - 7
packageA/offers/addSetclientOffer.js

@@ -35,22 +35,22 @@ Page({
             errMsg: "",
             type: "date",
             start: getTime.formatTime(new Date(), '-').split(' ')[0],
-            value: "",
+            value: getTime.formatTime(new Date(), '-').split(' ')[0],
             placeholder: "报价日期",
             valueName: "billdate",
             checking: "base",
             required: false
         }, {
-            label: "有效截止期",
+            label: "有效期",
             error: false,
             errMsg: "",
-            type: "date",
+            type: "dateRange",
             start: getTime.formatTime(new Date(), '-').split(' ')[0],
-            value: "",
-            placeholder: "报价有效截止日期",
+            value: [getTime.formatTime(new Date(), '-').split(' ')[0], ""],
+            placeholder: ['生效日期', '截止日期'],
             valueName: "invaliddate",
             checking: "base",
-            required: false
+            required: true
         }],
         "content": {
             "sa_quotedpriceid": 0, //报价单id
@@ -135,7 +135,9 @@ Page({
         };
         content.sys_enterpriseid = content.sys_enterpriseid[1][0] || '';
         content.contactsid = content.contactsid[1][0] || '';
-        console.log(content)
+        content.begdate = content.invaliddate[0];
+        content.enddate = content.invaliddate[1];
+        delete(content.invaliddate)
         _Http.basic({
             "id": 20221020164803,
             "version": 1,

+ 0 - 10
packageA/offers/modules/list/index.scss

@@ -34,16 +34,6 @@
         }
     }
 
-    .tag-box {
-
-        .tag {
-            height: 40rpx;
-            font-size: 20rpx;
-            padding: 0 12rpx;
-            margin-right: 8rpx;
-        }
-    }
-
     .exp {
         height: 34rpx;
         font-size: 24rpx;

+ 1 - 6
packageA/offers/modules/list/index.wxml

@@ -1,14 +1,9 @@
 <My_empty wx:if="{{list.length==0}}" />
-<navigator class="offer-list" url="#" wx:for="{{list}}" wx:key="item.billno">
+<navigator class="offer-list" url="/packageA/offers/detail?sa_quotedpriceid={{item.sa_quotedpriceid}}" wx:for="{{list}}" wx:key="item.billno">
     <view class="title">
         <text class="line-1">单号:{{item.billno}}</text>
         <view class="status" style="background-color: {{backColor.getColor(item.status)}};">{{item.status}}</view>
     </view>
-    <view class="tag-box">
-        <van-tag custom-class='tag' wx:if="{{item.quotedpricetype}}" wx:for-item='tag' color='#FA8C16' round>{{item.quotedpricetype}}</van-tag>
-        <van-tag custom-class='tag' wx:for="{{item.tags.systemtag}}" wx:key="index" wx:for-item='tag' color='#FA8C16' round>{{tag}}</van-tag>
-        <van-tag custom-class='tag' wx:for="{{item.tags.datatag}}" wx:key="index" wx:for-item='tag' color='#FAAB16' round>{{tag}}</van-tag>
-    </view>
     <view class="exp line-1">客户:<text>{{item.enterprisename}}</text></view>
     <view class="exp line-1">报价日期:<text>{{item.billdate}}</text></view>
     <view class="exp line-1">特价:<text>{{item.specialoffer==1?'是':'否'}}</text></view>

+ 10 - 11
packageA/offers/modules/project/index.js

@@ -16,7 +16,7 @@ Component({
                     "sa_projectid": id
                 },
             }).then(res => {
-                console.log("项目商机", this.data.list)
+                console.log("项目商机", res)
                 if (res.msg != '成功') return wx.showToast({
                     title: res.msg,
                     icon: "none"
@@ -30,24 +30,23 @@ Component({
         },
         /* 获取列表标签 */
         getTags() {
-            let list = this.data.list,
-                ownerids = list.map(v => v.sa_projectid);
+            let item = this.data.list[0];
             _Http.basic({
-                "id": 20221018102001,
+                "id": 20220929085401,
                 "content": {
                     nocache: true,
                     "ownertable": "sa_project",
-                    ownerids
+                    ownerid: item.sa_projectid
                 }
             }).then(res => {
                 console.log("标签", res)
-                for (let key in res.data) {
-                    let index = list.findIndex(v => v.sa_projectid == key);
-                    list[index].tags = res.data[key]
-                };
-                console.log(list)
+                if (res.msg != '成功') return wx.showToast({
+                    title: res.msg,
+                    icon: "none"
+                });
+                item.tags = res.data
                 this.setData({
-                    list
+                    "list[0]": item
                 })
             })
         },