Browse Source

更新页面

auqfypeu 5 years ago
parent
commit
03e08190ab

+ 14 - 14
Member/MemberUI/package-lock.json

@@ -1209,8 +1209,8 @@
     },
     "@types/quill": {
       "version": "1.3.10",
-      "resolved": "https://registry.npmjs.org/@types/quill/-/quill-1.3.10.tgz",
-      "integrity": "sha512-IhW3fPW+bkt9MLNlycw8u8fWb7oO7W5URC9MfZYHBlA24rex9rs23D5DETChu1zvgVdc5ka64ICjJOgQMr6Shw==",
+      "resolved": "https://registry.npm.taobao.org/@types/quill/download/@types/quill-1.3.10.tgz",
+      "integrity": "sha1-3B97ZYf37pS99SkbySKJ9vBJdhM=",
       "requires": {
         "parchment": "^1.1.2"
       }
@@ -6371,8 +6371,8 @@
     },
     "fast-diff": {
       "version": "1.1.2",
-      "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.1.2.tgz",
-      "integrity": "sha512-KaJUt+M9t1qaIteSvjc6P3RbMdXsNhK61GRftR6SNxqmhthcd9MGIi4T+o0jD8LUSpSnSKXE20nLtJ3fOHxQig=="
+      "resolved": "https://registry.npm.taobao.org/fast-diff/download/fast-diff-1.1.2.tgz",
+      "integrity": "sha1-S2LEK44D3j+EhGC2OQeZIGldAVQ="
     },
     "fast-glob": {
       "version": "2.2.2",
@@ -16505,8 +16505,8 @@
     },
     "parchment": {
       "version": "1.1.4",
-      "resolved": "https://registry.npmjs.org/parchment/-/parchment-1.1.4.tgz",
-      "integrity": "sha512-J5FBQt/pM2inLzg4hEWmzQx/8h8D0CiDxaG3vyp9rKrQRSDgBlhjdP5jQGgosEajXPSQouXGHOmVdgo7QmJuOg=="
+      "resolved": "https://registry.npm.taobao.org/parchment/download/parchment-1.1.4.tgz",
+      "integrity": "sha1-rt7Xq5OP6SHUw0vDOc4RaLwv/eU="
     },
     "parse-asn1": {
       "version": "5.1.1",
@@ -18291,8 +18291,8 @@
     },
     "quill": {
       "version": "1.3.7",
-      "resolved": "https://registry.npmjs.org/quill/-/quill-1.3.7.tgz",
-      "integrity": "sha512-hG/DVzh/TiknWtE6QmWAF/pxoZKYxfe3J/d/+ShUWkDvvkZQVTPeVmUJVu1uE6DDooC4fWTiCLh84ul89oNz5g==",
+      "resolved": "https://registry.npm.taobao.org/quill/download/quill-1.3.7.tgz?cache=0&sync_timestamp=1568013373674&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fquill%2Fdownload%2Fquill-1.3.7.tgz",
+      "integrity": "sha1-2lsvOixHDpMjQM2/NmjJ8h+Shug=",
       "requires": {
         "clone": "^2.1.1",
         "deep-equal": "^1.0.1",
@@ -18304,15 +18304,15 @@
       "dependencies": {
         "eventemitter3": {
           "version": "2.0.3",
-          "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-2.0.3.tgz",
+          "resolved": "https://registry.npm.taobao.org/eventemitter3/download/eventemitter3-2.0.3.tgz?cache=0&sync_timestamp=1560950873670&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feventemitter3%2Fdownload%2Feventemitter3-2.0.3.tgz",
           "integrity": "sha1-teEHm1n7XhuidxwKmTvgYKWMmbo="
         }
       }
     },
     "quill-delta": {
       "version": "3.6.3",
-      "resolved": "https://registry.npmjs.org/quill-delta/-/quill-delta-3.6.3.tgz",
-      "integrity": "sha512-wdIGBlcX13tCHOXGMVnnTVFtGRLoP0imqxM696fIPwIf5ODIYUHIvHbZcyvGlZFiFhK5XzDC2lpjbxRhnM05Tg==",
+      "resolved": "https://registry.npm.taobao.org/quill-delta/download/quill-delta-3.6.3.tgz",
+      "integrity": "sha1-sZ/SuJQSMBxg4f8hPY2GDqwPEDI=",
       "requires": {
         "deep-equal": "^1.0.1",
         "extend": "^3.0.2",
@@ -19543,7 +19543,7 @@
     },
     "react-dom-factories": {
       "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/react-dom-factories/-/react-dom-factories-1.0.2.tgz",
+      "resolved": "https://registry.npm.taobao.org/react-dom-factories/download/react-dom-factories-1.0.2.tgz",
       "integrity": "sha1-63cFxNs2+1AbOqOP91lhaqD/luA="
     },
     "react-draggable": {
@@ -19656,8 +19656,8 @@
     },
     "react-quill": {
       "version": "1.3.3",
-      "resolved": "https://registry.npmjs.org/react-quill/-/react-quill-1.3.3.tgz",
-      "integrity": "sha512-T9RubLaWJ8gCfp7sOqmFupjiTiEp/EdGqhCG+PWGKc5UHiK6xIWNKWYsOHHEhQ+sZCKs8u/DPx47gc1VfFmcLg==",
+      "resolved": "https://registry.npm.taobao.org/react-quill/download/react-quill-1.3.3.tgz",
+      "integrity": "sha1-lbjgiK1OSsxsecL4W9wEYO6+COs=",
       "requires": {
         "@types/quill": "1.3.10",
         "@types/react": "*",

File diff suppressed because it is too large
+ 577 - 577
Member/MemberUI/src/pages/datastatis/member_statis.js


+ 1 - 1
Member/MemberUI/src/pages/ingproduct/DashBoardExcel.js

@@ -48,7 +48,7 @@ export default class DashBoardExcel extends React.PureComponent {
     normFile = e => {
         this.cancelClick();
         if(e.file!=null&&e.file.response!=null&&e.file.response.data!=null){
-            this.imageHandler(e.file.thumbUrl)
+            this.imageHandler(e.file.response.data)
         }
       };
 

+ 2 - 2
Member/MemberUI/src/pages/ingproduct/add_product.js

@@ -93,8 +93,8 @@ class BirdFormDemoPage extends React.Component {
       fileList.push({
         uid: '-'+e.file.size,
         name: e.file.name,
-        url: e.file.thumbUrl,
-        thumbUrl: e.file.thumbUrl,
+        url: e.file.response.data,
+        thumbUrl: e.file.response.data,
       })
   } else if(e.file.status=="removed"){
     if(e.fileList.length<=0){

+ 11 - 2
Member/MemberUI/src/pages/ingproduct/mem_order.js

@@ -81,9 +81,18 @@ class tag_setting extends React.Component {
         read:APIV4+"/memorder/orderList"
       },
       checkable: true,
+      afterQuery:	function(filters,result){
+        if(self.refs.grid.state.filterRules!=null){
+          let gridDatas=util.object.deepClone(self.refs.grid.state.gridDatas);     
+          for(var item of gridDatas.items){
+            item["CreationDate1"]=item.CreationDate.split(".")[0];
+          }       
+          self.refs.grid.setState({gridDatas:gridDatas});
+        }
+        },
       columns: [
         { title: "订单号", data: "OrdersCode", type: "text", editor: {} },
-        { title: "下单时间", data: "CreationDate",type: "text", editor: {} },
+        { title: "下单时间", data: "CreationDate1",type: "text", editor: {} },
         { title: "下单人", data: "nickname", type: "text", editor: {},query:true },
         { title: "收货人", data: "Consignee",  type: "text", editor: {} },
         { title: "收货地区", data: "ADeliveryAddress", type: "text",  editor: {}},
@@ -116,7 +125,7 @@ class tag_setting extends React.Component {
       ]
     };
     return <div>
-                <BirdGrid gridOption={gridOption} ref={this.state.getdDisdatas}></BirdGrid>
+                <BirdGrid gridOption={gridOption} ref={this.state.getdDisdatas} ref="grid"></BirdGrid>
            </div>
   }
 }

+ 76 - 4
Member/MemberUI/src/pages/ingproduct/mem_product.js

@@ -8,10 +8,13 @@ import {Modal,
   Row,
   Col,
   message,
+  Select,
+  InputNumber,
   DatePicker,
   Input
 } from 'antd';
-const { APIV3,APIV4 } = config
+const { APIV3,APIV4 } = config;
+const { TextArea } = Input;
 class tag_setting extends React.Component {
   constructor(props) {
     super(props)
@@ -21,8 +24,10 @@ class tag_setting extends React.Component {
       formConfirmLoading:false,
       formVisiable:false,
       logVisiable:false,
+      numVisiable:false,
       levelProduct:[],//商品等级
-      productObj:[]
+      productObj:[],
+      productArr:{}
     }
   }
 
@@ -75,7 +80,8 @@ cancelClick() {
     levelProduct:[],
     memLog:[],
     formVisiable: false,
-    formConfirmLoading: false
+    formConfirmLoading: false,
+    productArr:[]
   });
 }
 cancellogClick() {
@@ -84,6 +90,32 @@ cancellogClick() {
     memLog:[]
   });
 }
+
+oknumClick(){
+  let self=this
+  var productObj= self.state.productObj;
+  var productArr= self.state.productArr;
+  if(productObj!=null && productObj.ProductCode!=null && productArr!=null){
+    productArr["productCode"]=productObj.ProductCode
+    let user = util.auth.getUser();
+    request({
+      url:APIV4+"/memorder/editProductAmount?MemberId="+user.id+"&MemberName="+user.rolename,
+      method: "post",
+      data:productArr
+    }).then(function (result) {
+      message.success(result.msg);
+      self.cancelClick();
+      self.refs.grid.query();
+    }) 
+  } 
+}
+
+cancelnumClick() {
+  this.setState({
+    numVisiable: false,
+    productArr:[]
+  });
+}
 onCancelInput(item,index,event){//等级,输入框,输入框值
   let Inputval= event.target.value;
   let self = this
@@ -105,10 +137,18 @@ onCancelInput(item,index,event){//等级,输入框,输入框值
   componentDidMount(){ 
     let self=this;
  }
+
+ onChangeSel(itme,event){
+   let self= this
+   let productArr=self.state.productArr;
+   productArr[itme]=event
+   self.setState({productArr:productArr})
+ }
+
   render() {
     let self = this;
     let user = util.auth.getUser();
-    let {levelProduct,productObj,memLog}=self.state;
+    let {levelProduct,productObj,memLog,productArr}=self.state;
     let level=[]
     if(levelProduct!=null && levelProduct.length>0){
       level = levelProduct.map((data, rowIndex) => {
@@ -230,6 +270,16 @@ onCancelInput(item,index,event){//等级,输入框,输入框值
                 })
             });
             }
+          },{
+            name: '编辑库存',          
+            color: 'red',
+            onClick: (data) => {  
+              console.log(data)
+                self.setState({
+                  numVisiable:true,
+                  productObj:data
+                })
+            }
           }
          
         ]
@@ -288,6 +338,28 @@ onCancelInput(item,index,event){//等级,输入框,输入框值
                   onOk={() => self.cancellogClick()}>                 
                   <BirdGrid gridOption={gridOptionsLog} ref="grid"></BirdGrid>
                 </Modal>
+
+                <Modal title="编辑库存"
+                  width="55%"
+                  visible={self.state.numVisiable}
+                  onCancel={() => self.cancelnumClick()}
+                  onOk={() => self.oknumClick()}>   
+                  <Row>
+                    <Col>
+                    <div style={{margin:"10px 20px"}}><span style={{marginRight:"5%"}}>商品名称:</span>{productObj.ProductName}</div>
+                    <div style={{margin:"10px 20px"}}><span style={{marginRight:"7%"}}>原库存:</span>{productObj.Amount}</div>
+                    <div style={{margin:"10px 20px"}}><span style={{marginRight:"5%"}}>修改库存:</span> 
+                    <Select onChange={self.onChangeSel.bind(self,"code")} style={{width:"15%"}}>
+                    <Option value="1">增加</Option>
+                    <Option value="2">减少</Option>
+                  </Select>
+                  <InputNumber style={{width:"40%"}} onChange={self.onChangeSel.bind(self,"num")} type={"number"} value={productArr.num}></InputNumber>                                     
+                    </div>
+                    <div style={{margin:"10px 20px"}}><span style={{marginRight:"8%"}}>备注:</span><InputNumber style={{width:"60%"}} value={productArr.remark} onChange={self.onChangeSel.bind(self,"remark")}></InputNumber></div>
+                    </Col>
+                  </Row>              
+                  
+                </Modal>
            </div>
   }
 }

+ 7 - 7
Member/MemberUI/src/pages/member/ES_Memberbase.js

@@ -10,7 +10,7 @@ import { Modal,message } from 'antd';
 import util from '../../utils/util';
 import request from "../../utils/request"
 
-const { APIV3 } = config
+const { APIV3,APIV4 } = config
 
 class BirdGridElasticPage extends React.Component {
   constructor(props) {
@@ -37,7 +37,7 @@ class BirdGridElasticPage extends React.Component {
     // });
     //初始化下单平台
     request({
-      url:"/web/Mem_Terminaldoc/getSourcePlatForms",
+      url:APIV4+"/memberList/getSourcePlatForms",
       method:"get"
     }).then((result) => {
       let terminals = {};
@@ -65,7 +65,7 @@ class BirdGridElasticPage extends React.Component {
     let gridOption = {
       title: "ES会员列表",
       url: {
-        read: "/web/ES_Member/index"
+        read: APIV4+"/memberList/index"
       },
       checkable: true,
       primaryKey:"_id",
@@ -145,7 +145,7 @@ class BirdGridElasticPage extends React.Component {
         { title: "昵称", data: "MemberNickName", type: "text", editor: {}, query: true, isRequired: true },
         { title: "电话号码", data: "MemUsualPhone", type: "text", editor: {}, query: true, isRequired: true },
         { title: "下单平台", data:"Terminals.MemSourcePlatforms", type:"dropdown", query:true, 
-          source:{url:"/web/Mem_Terminaldoc/getSourcePlatForms",multi:true},editor:{}, 
+          source:{url:APIV4+"/memberList/getSourcePlatForms",multi:true},editor:{}, 
           render: (value,data) => {
             if(value) {
               return this.state.terminals[value.TerminalCode];
@@ -153,9 +153,9 @@ class BirdGridElasticPage extends React.Component {
           },hide:true
         },
         { title: "下单终端", data: "Terminals.TerminalCode", type: "dropdown", query:true, 
-          source:{url:"/web/Mem_Terminaldoc/getterms",multi:true},editor: {}, hide: true},
+          source:{url:APIV4+"/memberList/getterms",multi:true},editor: {}, hide: true},
         { title: "首次下单终端", data: "OriginType", type: "dropdown", query:true, 
-          source:{url:"/web/Mem_Terminaldoc/getterms",multi:true},editor: {}},
+          source:{url:APIV4+"/memberList/getterms",multi:true},editor: {}},
         // { title: "地区", data:"MemUsualAreaCode", type:"region", query:true, hide:true },
         { title: "省", data:"MemUsualProvinceCode", type:"dropdown", query:true, hide:true, source:{data:this.state.provinces}, editor:{}},
         { title: "市", data:"MemUsualCityCode", type:"dropdown", query:true, hide:true,source:{data:this.state.cities}, editor:{}},
@@ -163,7 +163,7 @@ class BirdGridElasticPage extends React.Component {
         { title: "住址", data: "MemUsualAddress", type: "text", editor: {} },
         { title: "出生日期", data:"MemberBirthday", type:"date", query:true, hide:true },
         { title: "选项性别(是男性,否女性)", data:"Gender", type:"dropdown",
-          source:{url:"/web/Mem_Terminaldoc/getgender"}, query:true, hide:true},
+          source:{url:APIV4+"/memberList/getgender"}, query:true, hide:true},
         {
           title: "操作选项", type: "command", actions: [
             {

+ 164 - 35
Member/MemberUI/src/pages/memberPoints/memberPoints.js

@@ -1,7 +1,8 @@
 import React from 'react';
-import { Modal, Select, Descriptions, Button, Input } from 'antd';
+import { Modal, Select, Descriptions, Button, Input ,message} from 'antd';
 import { BirdGrid } from 'components/Grid';
 import { config, request, util } from 'utils'
+import { jrequest } from 'utils/request';
 
 
 const { Option } = Select;
@@ -14,22 +15,73 @@ class MemberPoints extends React.Component {
         this.state = {
             value: '',
             visible: false,
-            visibleLogs: false
+            visibleLogs: false,
+            memPointsLog: [],
+            visibleEvidence: false,
+            evidenceData: {},
+            weixinUserInfo:{},
+            addPointLog:{},
+            increaseOrDecrease : "add",
+            pointIncrease: 0,
+            pointIncreaseDesc:'人为增加或者减少积分'
+
         };
 
     }
 
-    showModal = () => {
+    showModal = (data) => {
         this.setState({
             visible: true,
+            weixinUserInfo: data
         });
     };
 
     handleOk = (e) => {
+        let self  = this;
         console.log(e);
+        let addPointLog = this.state.addPointLog;
+        addPointLog.secretPhone = this.state.weixinUserInfo.secretPhone;
+        addPointLog.id = this.state.weixinUserInfo.id;
+        addPointLog.increase = this.state.increaseOrDecrease === "add" ? true:false;
+        addPointLog.action = this.state.increaseOrDecrease === "add" ? '人为增加积分': '人为减少积分';
+        addPointLog.remark = this.state.pointIncreaseDesc;
+        addPointLog.value = this.state.pointIncrease;
+        addPointLog.terminalName = "会员中心"
+        addPointLog.terminalAction = "人为增加或者减少积分"
+        if(this.state.pointIncrease <= 0){
+            message.error("增加或者减少的积分不能小于等于0");
+            return;
+        }
+
+        if(addPointLog.increase){
+            addPointLog.balance = parseInt(this.state.weixinUserInfo.point) + parseInt(this.state.pointIncrease);
+        }else{
+            addPointLog.balance = parseInt(this.state.weixinUserInfo.point) - parseInt(this.state.pointIncrease);
+        }
+        console.log(addPointLog);
+        if(addPointLog.balance < 0){
+            message.error("变更后的积分不能为负数");
+            return;
+        }
+
+       
         this.setState({
             visible: false,
         });
+
+        jrequest({
+            url: "/wechatInfo/addPoint",
+            method: "post",
+            data:addPointLog
+        }).then(result => {
+            if (result.success) {
+                message.success("保存成功");
+                self.refs.grid.reload();
+            } else {
+                message.error("保存失败");
+            }
+        });
+
     };
 
     handleCancel = (e) => {
@@ -39,12 +91,6 @@ class MemberPoints extends React.Component {
         });
     };
 
-    showModalLogs = () => {
-        this.setState({
-            visibleLogs: true,
-        });
-    };
-
 
     handleCancelLogs = (e) => {
         console.log(e);
@@ -54,14 +100,53 @@ class MemberPoints extends React.Component {
         });
     };
 
+    //弹出证据链查看模态框
+    showModalEvidence = (data) => {
+        this.setState({
+            evidenceData: data,
+            visibleEvidence: true,
+        });
+    }
+
+     //关闭证据链查看模态框
+     handleCancelEvidence = () => {
+        this.setState({
+            visibleEvidence: false
+        })
+    }
+
+    // 增加或者减少
+    increaseOrDecrease =(event) =>{
+        console.log(event);
+        this.setState({
+            increaseOrDecrease: event
+        })
+    }
+    // 增加或者减少的积分数
+    pointIncrease =(event) =>{
+        console.log(event.target.value);
+        this.setState({
+            pointIncrease: event.target.value
+        })
+    }
+    // 增加或者减少的积分数
+    pointIncreaseDesc =(event) =>{
+        console.log(event.target.value);
+        this.setState({
+            pointIncreaseDesc: event.target.value
+        })
+    }
+
 
     render() {
 
+        let self = this;
+
         let gridOption = {
             title: "表格示例",
             url: {
                 // read: APIV4 + "/userPointLog/logs",
-                read: JAPIV + "/userPointLog/logsCondition",
+                read: JAPIV + "/wechatInfo/query",
                 // add: "/test/add",
                 // edit: "/test/edit",
                 // delete: "/test/delete"
@@ -72,18 +157,32 @@ class MemberPoints extends React.Component {
             //actions: [{ name: '外部按钮', color: 'error', onClick: function () { } }],
             columns: [
                 { title: "会员ID", data: "id", type: "text", editor: {} },
-                { title: "姓名(昵称)", data: "crtUser", type: "number" },
+                { title: "姓名(昵称)", data: "nickname", type: "number" },
                 { title: "手机号", data: "secretPhone", type: "number", query: true },
-                { title: "积分余额", data: "balance", type: "text", editor: {} },
+                { title: "积分余额", data: "point", type: "text", editor: {} },
                 {
                     title: "操作选项", type: "command", actions: [{
                         name: '更改',
                         color: '#1880FF',
-                        onClick: this.showModal
+                        onClick: (data) => {
+                            this.showModal(data)
+                        }
                     }, {
                         name: '日志',
                         color: '#1880FF',
-                        onClick: this.showModalLogs
+                        onClick: (data) => {
+                            jrequest({
+                                //url: APIV3+"/web/memProduct/getProductLog?staffId="+user.staffid,
+                                url: JAPIV + "/userPointLog/logsConditionOneUser?secretPhone=" + data.secretPhone,
+                                method: "get",
+                                //data:{productCode:data.ProductCode}
+                            }).then((result) => {
+                                self.setState({
+                                    memPointsLog: result.content,
+                                    visibleLogs: true,
+                                })
+                            });
+                        }
                     }]
                 }
             ]
@@ -91,31 +190,25 @@ class MemberPoints extends React.Component {
 
         let gridOptionLogs = {
             title: "表格示例",
-            url: {
-                // read: APIV4 + "/userPointLog/logs",
-                read: "/api/v1/table",
-                // add: "/test/add",
-                // edit: "/test/edit",
-                // delete: "/test/delete"
-            },
+            dataSource: this.state.memPointsLog,
             pageSize: 8,
-            checkable: true,
+            checkable: false,
             //actions: [{ name: '外部按钮', color: 'error', onClick: function () { } }],
             columns: [
                 { title: "会员ID", data: "id", type: "text", editor: {}, hide: true },
-                { title: "时间", data: "field-datetime", type: "datetime", editor: {} },
-                { title: "变更积分值", data: "crtUser", type: "number" },
-                { title: "原始积分值", data: "secretPhone", type: "number" },
+                { title: "时间", data: "lastUpdate", type: "text", editor: {} },
+                { title: "变更积分值", data: "value", type: "number" },
+                { title: "原始积分值", data: "origin", type: "number" },
                 { title: "变更后积分值", data: "balance", type: "text", editor: {} },
-                { title: "用户行为终端", data: "balance", type: "text", editor: {} },
-                { title: "用户行为", data: "balance", type: "text", editor: {} },
-                { title: "备注", data: "balance", type: "text", editor: {} },
+                { title: "用户行为终端", data: "terminalName", type: "text", editor: {} },
+                { title: "用户行为", data: "terminalAction", type: "text", editor: {} },
+                { title: "备注", data: "remark", type: "text", editor: {} },
                 {
                     title: "证据链", type: "command", actions: [{
                         name: '查看',
                         color: '#1880FF',
                         onClick: (data) => {
-                            console.log(data)
+                            this.showModalEvidence(data);
                         }
                     }]
                 }
@@ -124,7 +217,7 @@ class MemberPoints extends React.Component {
         };
 
         const selectBefore = (
-            <Select defaultValue="增加" style={{ width: 90 }}>
+            <Select value={this.state.increaseOrDecrease} style={{ width: 90 }} onChange={this.increaseOrDecrease}>
                 <Option value="add">增加</Option>
                 <Option value="delete">减少</Option>
             </Select>
@@ -144,14 +237,14 @@ class MemberPoints extends React.Component {
                         </Button>,
                     ]}
                 >
-                    <Descriptions column={1} style={{ margin: '25px 20px 0 0' }}>
-                        <Descriptions.Item label="原积分">100000</Descriptions.Item>
+                    <Descriptions column={1} style={{ margin: '25px 20px 0 0', borderColor: "red" }}>
+                        <Descriptions.Item label="原积分">{this.state.weixinUserInfo.point}</Descriptions.Item>
                         <Descriptions.Item label="变更积分">
                             <div style={{ marginBottom: 16 }}>
-                                <Input addonBefore={selectBefore} addonAfter="积分" />
+                                <Input addonBefore={selectBefore} addonAfter="积分" onChange={this.pointIncrease} placeholder={this.state.pointIncrease}></Input>
                             </div>
                         </Descriptions.Item>
-                        <Descriptions.Item label="原因说明"><Input /></Descriptions.Item>
+                        <Descriptions.Item label="原因说明"><Input onChange={this.pointIncreaseDesc} placeholder={this.state.pointIncreaseDesc}></Input></Descriptions.Item>
 
                     </Descriptions>
 
@@ -164,9 +257,45 @@ class MemberPoints extends React.Component {
                     footer={null}
                     width={1000}
                 >
-                    <BirdGrid gridOption={gridOptionLogs} ref="grid" />
+                    <BirdGrid gridOption={gridOptionLogs} ref="grid1" />
 
                 </Modal>
+
+
+                <Modal
+                    title="证据链"
+                    visible={this.state.visibleEvidence}
+                    onCancel={this.handleCancelEvidence}
+                    footer={[
+                        <Button key="submit" type="primary" onClick={this.handleCancelEvidence} >
+                            返回
+                                </Button>,
+                    ]}
+                    width="80%"
+                >
+                    <div style={{ width: '96%', margin: '30px 0 20px 2%', border: "none" }}>
+                        <Descriptions title="基础信息" bordered column={2} style={{ border: "none" }}>
+                            <Descriptions.Item label="数据来源平台">{this.state.evidenceData.terminalName}</Descriptions.Item>
+                            <Descriptions.Item label="订单编号" span={2}>{this.state.evidenceData.dataCode}</Descriptions.Item>
+                            <Descriptions.Item label="用户行为" span={2}>{this.state.evidenceData.terminalAction}</Descriptions.Item>
+                        </Descriptions>
+                        <Descriptions title="变量字段" bordered column={2} style={{ margin: '25px 20px 0 0' }}>
+                            <Descriptions.Item label="订单金额">{this.state.evidenceData.orderAmount}</Descriptions.Item>
+                            <Descriptions.Item label="优惠金额">{this.state.evidenceData.discountedPrice}</Descriptions.Item>
+                            <Descriptions.Item label="物流运费">{this.state.evidenceData.transportCost}</Descriptions.Item>
+                            <Descriptions.Item label="实付金额">{this.state.evidenceData.payment}</Descriptions.Item>
+                        </Descriptions>
+                        {/* <Descriptions title="成长值计算" column={1} style={{ margin: '25px 20px 0 0' }}>
+                                    <Descriptions.Item label="计算公式">{this.state.evidenceData.remark}</Descriptions.Item>
+                                    <Descriptions.Item label="成长值变动">500.00 *  5% = 25</Descriptions.Item>
+                                </Descriptions> */}
+                        <Descriptions title="积分值计算" column={1} style={{ margin: '25px 20px 0 0' }}>
+                            <Descriptions.Item label="计算公式">{this.state.evidenceData.remark}</Descriptions.Item>
+                            <Descriptions.Item label="积分值变动">{this.state.evidenceData.payment}*{this.state.evidenceData.remark ? this.state.evidenceData.remark.split("*")[1] : ""}={this.state.evidenceData.value}</Descriptions.Item>
+                        </Descriptions>
+                    </div>
+                </Modal>
+
             </div>
 
         );

+ 66 - 40
Member/MemberUI/src/pages/pointsRule/pointsRule.js

@@ -4,7 +4,7 @@ import { BirdGrid } from 'components/Grid';
 import { Tabs, Row, Col, InputNumber, Button, Select, Descriptions, Modal,message } from 'antd';
 import { config} from 'utils';
 import BraftEditor from 'braft-editor';
-import 'braft-editor/dist/index.css';
+// import 'braft-editor/dist/index.css';
 import { jrequest } from 'utils/request';
 
 const { TabPane } = Tabs;
@@ -25,10 +25,10 @@ class PointsRule extends React.Component {
             RMB: "",
             selectedPoints: "",
             selectedRMB: "",
-            toBeConsumedPoint: 0,
-            beHandedPoint: 0,
-            consumedPoint: 0,
-            expiredPoint: 0,
+            pointsToBeConsumed: 0,
+            pointsSendOut: 0,
+            pointsExpired: 0,
+            pointsConsumed: 0,
             evidenceData: {},
             visible: false,
             editorState: null,
@@ -39,41 +39,40 @@ class PointsRule extends React.Component {
 
         //获取积分清零规则
         jrequest({
-            url: "/userPointLog/desc",
+            url: "/userPointClearRule/rule",
             method: "get"
         }).then(result => {
-            let obj = result.data;
+            console.log(result);
             this.setState({
-                pointsClearRule: "积分清零规则",
-                selectedPointsClearRul: "积分清零规则"
+                pointsClearRule: result.data.description,
+                selectedPointsClearRule: result.data.description
             });
         });
 
         //获取积分兑换RMB规则
         jrequest({
-            url: "/userPointLog/levels",
+            url: "/userPointRmbRule/rule",
             method: "get"
         }).then(result => {
-            let obj = result.data;
             this.setState({ 
-                points:10,
-                RMB:1,
-                selectedPoints:10,
-                selectedRMB:1
+                points:parseInt(result.data.description),
+                RMB:parseInt(result.data.description.split("=")[1]),
+                selectedPoints:parseInt(result.data.description),
+                selectedRMB:parseInt(result.data.description.split("=")[1])
             });
         });
 
         //获取待消费、已发放、已消费、已过期积分
         jrequest({
-            url: "/userLevelSetting/desc",
+            url: "/userPointStastic/point",
             method: "get"
         }).then(result => {
             let obj = result.data;
             this.setState({
-                toBeConsumedPoint: obj.toBeConsumedPoint,
-                beHandedPoint: obj.beHandedPoint,
-                consumedPoint: obj.consumedPoint,
-                expiredPoint: obj.expiredPoint,
+                pointsSendOut: obj.pointsSendOut,
+                pointsConsumed: obj.pointsConsumed,
+                pointsExpired: obj.pointsExpired,
+                pointsToBeConsumed: obj.pointsToBeConsumed,
             });
         });
 
@@ -137,7 +136,20 @@ class PointsRule extends React.Component {
         this.setState({
             pointsClearRule: this.state.selectedPointsClearRule,
             visiblePointsClearRule: false,
-        })
+        });
+        jrequest({
+            url: "/userPointClearRule/rule",
+            method: "post",
+            data:{"description":this.state.selectedPointsClearRule}
+        }).then(result => {
+            if (result.success) {
+                message.success("保存成功");
+                this.refreshData();
+            } else {
+                message.error("保存失败");
+            }
+        });
+
     }
 
 
@@ -178,7 +190,19 @@ class PointsRule extends React.Component {
             points:this.state.selectedPoints,
             RMB:this.state.selectedRMB,
             visiblePointsToRMB: false,
-        })
+        });
+        jrequest({
+            url: "/userPointRmbRule/rule",
+            method: "post",
+            data:{"description":this.state.selectedPoints + "积分" + "=" + this.state.selectedRMB + "人民币"}
+        }).then(result => {
+            if (result.success) {
+                message.success("保存成功");
+                this.refreshData();
+            } else {
+                message.error("保存失败");
+            }
+        });
     }
 
     //弹出证据链查看模态框
@@ -241,9 +265,11 @@ class PointsRule extends React.Component {
             checkable: false,
             //actions: [{ name: '外部按钮', color: 'error', onClick: function () { } }],
             columns: [
-                { title: "时间", data: "crtDate", type: "date", editor: {}, query: true},
+                { title: "时间", data: "crtDate", type: "text", editor: {}, query: true},
                 { title: "积分值", data: "balance", editor: {}, type: "number" },
-                { title: "用户", data: "secretPhone", type: "text" },
+                { title: "用户", type: "text",render(){
+                    return <div>***********</div>
+                } },
                 { title: "用户行为端口", data: "terminalName", type: "text",  editor: {}, query: true },
                 { title: "用户行为", data: "terminalAction", type: "text", editor: {}, query: true },
                 { title: "用户原积分", data: "origin", type: "number" },
@@ -253,7 +279,7 @@ class PointsRule extends React.Component {
                         name: '查看',
                         color: '#67c23a',
                         onClick: (data) => {
-                            console.log(data);
+                            //console.log(data);
                             this.showModalEvidence(data);
                         }
                     }]
@@ -269,7 +295,7 @@ class PointsRule extends React.Component {
                             <Row gutter={24}>
                                 <Col span={16} offset={1}>
                                     <Panel className="text-col" header={false} cover>
-                                        <table style={{ width: "80%", textAlign: "left",margin:"0 10%"}}>
+                                        <table style={{ width: "80%", textAlign: "left",margin:"0 10%", border:"none"}}>
                                             <tr>
                                                 <td><b>积分清零规则</b></td>
                                                 <td><b>{self.state.pointsClearRule}</b></td>
@@ -295,7 +321,7 @@ class PointsRule extends React.Component {
                                         <Panel className="text-col" header={false} cover>
                                             <h3 className="text-muted">待消费</h3>
                                             <h3>
-                                                <b>{self.state.toBeConsumedPoint}</b>
+                                                <b>{self.state.pointsToBeConsumed.toLocaleString()}</b>
                                             </h3>
                                         </Panel>
                                     </Col>
@@ -303,7 +329,7 @@ class PointsRule extends React.Component {
                                         <Panel className="text-col" header={false} cover>
                                             <h3 className="text-muted">已发放</h3>
                                             <h3>
-                                                <b>{self.state.beHandedPoint}</b>
+                                                <b>{self.state.pointsSendOut.toLocaleString()}</b>
                                             </h3>
                                         </Panel>
                                     </Col>
@@ -311,7 +337,7 @@ class PointsRule extends React.Component {
                                         <Panel className="text-col" header={false} cover>
                                             <h3 className="text-muted">已消费</h3>
                                             <h3>
-                                                <b>{self.state.consumedPoint}</b>
+                                                <b>{self.state.pointsConsumed.toLocaleString()}</b>
                                             </h3>
                                         </Panel>
                                     </Col>
@@ -319,7 +345,7 @@ class PointsRule extends React.Component {
                                         <Panel className="text-col" header={false} cover>
                                             <h3 className="text-muted">已过期</h3>
                                             <h3>
-                                                <b>{self.state.expiredPoint}</b>
+                                                <b>{self.state.pointsExpired.toLocaleString()}</b>
                                             </h3>
                                         </Panel>
                                     </Col>
@@ -386,25 +412,25 @@ class PointsRule extends React.Component {
                             ]}
                             width="80%"
                         >
-                            <div style={{ width: '96%', margin: '30px 0 20px 2%' }}>
-                                <Descriptions title="基础信息" bordered column={2} >
+                            <div style={{ width: '96%', margin: '30px 0 20px 2%' , border:"none"}}>
+                                <Descriptions title="基础信息" bordered column={2} style={{border:"none"}}>
                                     <Descriptions.Item label="数据来源平台">{this.state.evidenceData.terminalName}</Descriptions.Item>
-                                    <Descriptions.Item label="订单编号" span={2}>{this.state.evidenceData.id}</Descriptions.Item>
+                                    <Descriptions.Item label="订单编号" span={2}>{this.state.evidenceData.dataCode}</Descriptions.Item>
                                     <Descriptions.Item label="用户行为" span={2}>{this.state.evidenceData.terminalAction}</Descriptions.Item>
                                 </Descriptions>
                                 <Descriptions title="变量字段" bordered column={2} style={{ margin: '25px 20px 0 0' }}>
-                                    <Descriptions.Item label="订单金额(数据库字段名)">{this.state.evidenceData.payment}</Descriptions.Item>
+                                    <Descriptions.Item label="订单金额">{this.state.evidenceData.orderAmount}</Descriptions.Item>
                                     <Descriptions.Item label="优惠金额">{this.state.evidenceData.discountedPrice}</Descriptions.Item>
                                     <Descriptions.Item label="物流运费">{this.state.evidenceData.transportCost}</Descriptions.Item>
-                                    <Descriptions.Item label="实付金额">{this.state.evidenceData.orderAmount}</Descriptions.Item>
+                                    <Descriptions.Item label="实付金额">{this.state.evidenceData.payment}</Descriptions.Item>
                                 </Descriptions>
-                                <Descriptions title="成长值计算" column={1} style={{ margin: '25px 20px 0 0' }}>
-                                    <Descriptions.Item label="计算公式">订单金额 * 5%</Descriptions.Item>
+                                {/* <Descriptions title="成长值计算" column={1} style={{ margin: '25px 20px 0 0' }}>
+                                    <Descriptions.Item label="计算公式">{this.state.evidenceData.remark}</Descriptions.Item>
                                     <Descriptions.Item label="成长值变动">500.00 *  5% = 25</Descriptions.Item>
-                                </Descriptions>
+                                </Descriptions> */}
                                 <Descriptions title="积分值计算" column={1} style={{ margin: '25px 20px 0 0' }}>
-                                    <Descriptions.Item label="计算公式">订单金额 * 5%</Descriptions.Item>
-                                    <Descriptions.Item label="积分值变动">500.00 *  5% = 25</Descriptions.Item>
+                                    <Descriptions.Item label="计算公式">{this.state.evidenceData.remark}</Descriptions.Item>
+                                    <Descriptions.Item label="积分值变动">{this.state.evidenceData.payment}*{this.state.evidenceData.remark ? this.state.evidenceData.remark.split("*")[1] : ""}={this.state.evidenceData.value}</Descriptions.Item>
                                 </Descriptions>
                             </div>
                         </Modal>

+ 44 - 44
Member/MemberUI/src/utils/config.js

@@ -1,45 +1,45 @@
-const APIV1 = '/api/v1'
-const APIV2 = '/api/v2' 
-const APIV3 = 'http://localhost:8004'
-const JAPIV = 'http://localhost:8005'
-const APIV4 = 'http://localhost:8005' 
-module.exports =  {
-  name: '亮健会员中心',
-  prefix: 'bird',
-  footerText: 'bird admin  © 2018 360lj.com',
-  logo: '/logo.svg',
-  iconFontCSS: '/iconfont.css',
-  iconFontJS: '/iconfont.js',
-  CORS: ['http://119.27.191.247:80','http://localhost:57251','http://localhost:8000',
-  'http://localhost:8001','http://localhost:8002','http://localhost:8003',
-  'http://coop.360lj.com:8004','http://coop.360lj.com:8005',
-  'https://localhost','https://coop.360lj.com',' https://localhost:44351',
-  'http://119.130.113.245:57254',
-  'http://119.130.113.245:8004','http://119.130.113.245:8005','http://119.130.113.245:8005','http://localhost:8004','http://localhost:8005'],
-  //YQL: ['http://localhost:57251'],
-  openPages: ['/login','/'],
-  apiPrefix: '/api/v1',
-  webApiPrefix:APIV3,
-  APIV1,
-  APIV2,
-  APIV3,
-  APIV4,
-  color:{
-    success:'#52c41a',
-    warn:'#E6A23C',
-    error:'#ff4d4f'
-  },
-  api: {
-    userLogin: `${APIV3}/web/login/index`,
-    userLogout: `${APIV3}/web/login/logout`,
-    //menus: `${APIV1}/menus`,
-    menus: `${APIV3}/web/auth/menus`,
-    getDic:`${APIV1}/getdic?key=`,
-    upload:`${APIV3}/web/upload/uploadprofile`,
-    //getFileName:`/file/getName?url=`,
-    getFileName:`${APIV3}/`,
-    getOperationToken:`${APIV3}/web/login/getOperationToken`,
-    permissions:`${APIV3}/web/auth/permissions`
-  },
-  JAPIV, 
+const APIV1 = '/api/v1'
+const APIV2 = '/api/v2' 
+const APIV3 = 'http://localhost:8004'
+const JAPIV = 'http://localhost:8005'
+const APIV4 = 'http://localhost:8005' 
+module.exports =  {
+  name: '亮健会员中心',
+  prefix: 'bird',
+  footerText: 'bird admin  © 2018 360lj.com',
+  logo: '/logo.svg',
+  iconFontCSS: '/iconfont.css',
+  iconFontJS: '/iconfont.js',
+  CORS: ['http://119.27.191.247:80','http://localhost:57251','http://localhost:8000',
+  'http://localhost:8001','http://localhost:8002','http://localhost:8003',
+  'http://coop.360lj.com:8004','http://coop.360lj.com:8005',
+  'https://localhost','https://coop.360lj.com',' https://localhost:44351',
+  'http://119.130.113.245:57254',
+  'http://119.130.113.245:8004','http://119.130.113.245:8005','http://119.130.113.245:8005','http://localhost:8004','http://localhost:8005'],
+  //YQL: ['http://localhost:57251'],
+  openPages: ['/login','/'],
+  apiPrefix: '/api/v1',
+  webApiPrefix:APIV3,
+  APIV1,
+  APIV2,
+  APIV3,
+  APIV4,
+  color:{
+    success:'#52c41a',
+    warn:'#E6A23C',
+    error:'#ff4d4f'
+  },
+  api: {
+    userLogin: `${APIV3}/web/login/index`,
+    userLogout: `${APIV3}/web/login/logout`,
+    //menus: `${APIV1}/menus`,
+    menus: `${APIV3}/web/auth/menus`,
+    getDic:`${APIV1}/getdic?key=`,
+    upload:`${APIV3}/web/upload/uploadprofile`,
+    //getFileName:`/file/getName?url=`,
+    getFileName:`${APIV3}/`,
+    getOperationToken:`${APIV3}/web/login/getOperationToken`,
+    permissions:`${APIV3}/web/auth/permissions`
+  },
+  JAPIV, 
 }

+ 2 - 2
Member/MemberWeb/Controllers/Mem_DataDictoryTagTypeController.cs

@@ -86,9 +86,9 @@ namespace SupplierWeb.Controllers
             string resultMax = "";
             List<SqlParameter> parametersMax = new List<SqlParameter>();
             bool successMax = DataAccess.GetOneValue(
-                "select max(Value) from mem_DataDictory where ParentId = '5552'",
+                "select max(cast(Value as int)) from mem_DataDictory where ParentId = '5552'",
                 parametersMax.ToArray(), out v, out resultMax);
-            int IdValue = int.Parse((string)v) + 1;
+            int IdValue = Convert.ToInt32(v) + 1;
 
             if (data != null)
             {