浏览代码

报价单添加折扣/品牌/领域

zhaoxiaohai 3 年之前
父节点
当前提交
b4ab64778e

+ 13 - 7
packageA/offers/addProjectOffer.js

@@ -40,17 +40,19 @@ Page({
             valueName: "itemtype",
             checking: "base",
             required: true
-        }, /* {
-            label: "电话",
+        }, {
+            label: "折扣(%)",
             error: false,
             errMsg: "",
+            hint: "请输入0-100整数!",
             type: "number",
             value: "",
-            valueName: "telephone",
-            placeholder: "固定电话 例:0573-12345678",
-            checking: "base",
-            required: false
-        }, */ {
+            placeholder: "请填写折扣(%)",
+            valueName: "discountrate", //绑定的字段名称
+            required: false, //必填
+            checking: `^([1-9]?\\d|100)$`, //0-100%
+            slot: "discountrate"
+        }, {
             label: "报价日期",
             error: false,
             errMsg: "",
@@ -156,6 +158,9 @@ Page({
                     required: true
                 };
                 form.splice(1, form[1].label == "选择客户" ? 1 : 0, obj);
+                this.setData({
+                    address: data.item.province + data.item.city + data.item.county + data.item.address
+                })
                 break;
             case "sys_enterpriseid":
                 obj = {
@@ -205,6 +210,7 @@ Page({
         content.contactsid = content.contactsid ? content.contactsid[1][0] : 0;
         content.begdate = content.invaliddate[0];
         content.enddate = content.invaliddate[1];
+        content.address = this.data.address;
         delete(content.invaliddate)
         _Http.basic({
             "id": 20221020164803,

+ 3 - 1
packageA/offers/addProjectOffer.wxml

@@ -1,5 +1,7 @@
 <Yl_Headline title='基本信息' type='switch' switchLabel='仅显示必填信息' switch='{{showAll}}' bind:callBack='onChange' />
-<Yl_field id='Form' form='{{form}}' showAll='{{!showAll}}' bind:onConfirm='onConfirm' bind:interrupt="interrupt" />
+<Yl_field id='Form' form='{{form}}' showAll='{{!showAll}}' bind:onConfirm='onConfirm' bind:interrupt="interrupt">
+    <view slot='discountrate' style="margin-right: 36rpx;">%</view>
+</Yl_field>
 <view style="height: 100rpx;" />
 <view class="new-footer">
     <van-button custom-class='new-submit' disabled='{{disabled}}' bindclick='submit'>提交</van-button>

+ 9 - 7
packageA/offers/addSetclientOffer.js

@@ -41,17 +41,19 @@ Page({
             valueName: "itemtype",
             checking: "base",
             required: true
-        }, /* {
-            label: "电话",
+        }, {
+            label: "折扣(%)",
             error: false,
             errMsg: "",
+            hint: "请输入0-100整数!",
             type: "number",
             value: "",
-            valueName: "telephone",
-            placeholder: "固定电话 例:0573-12345678",
-            checking: "base",
-            required: false
-        }, */ {
+            placeholder: "请填写折扣(%)",
+            valueName: "discountrate", //绑定的字段名称
+            required: false, //必填
+            checking: `^([1-9]?\\d|100)$`, //0-100%
+            slot: "discountrate"
+        }, {
             label: "报价日期",
             error: false,
             errMsg: "",

+ 3 - 1
packageA/offers/addSetclientOffer.wxml

@@ -1,5 +1,7 @@
 <Yl_Headline title='基本信息' type='switch' switchLabel='仅显示必填信息' switch='{{showAll}}' bind:callBack='onChange' />
-<Yl_field id='Form' form='{{form}}' showAll='{{!showAll}}' bind:onConfirm='onConfirm' bind:interrupt="interrupt" />
+<Yl_field id='Form' form='{{form}}' showAll='{{!showAll}}' bind:onConfirm='onConfirm' bind:interrupt="interrupt">
+    <view slot='discountrate' style="margin-right: 36rpx;">%</view>
+</Yl_field>
 <view style="height: 100rpx;" />
 <view class="new-footer">
     <van-button custom-class='new-submit' disabled='{{disabled}}' bindclick='submit'>提交</van-button>

+ 11 - 2
packageA/offers/detail.js

@@ -145,8 +145,11 @@ Page({
             label: "产品系列",
             value: res.data.itemtype
         }, {
-            label: "电话",
-            value: res.data.telephone
+            label: "领域",
+            value: res.data.tradefields
+        }, {
+            label: "品牌",
+            value: res.data.brandname
         }, {
             label: "项目名称",
             value: res.data.projectname
@@ -156,6 +159,9 @@ Page({
         }, {
             label: "客户",
             value: res.data.enterprisename
+        }, {
+            label: "电话",
+            value: res.data.telephone
         }, {
             label: "客户联系人",
             value: res.data.contactsname
@@ -168,6 +174,9 @@ Page({
         }, {
             label: "有效期",
             value: res.data.begdate + ' - ' + res.data.enddate
+        }, {
+            label: "折扣(%)",
+            value: res.data.discountrate + '%'
         }, {
             label: "总金额",
             value: res.data.sumamount