Sfoglia il codice sorgente

预估手术量,bug修复

qymljy 5 mesi fa
parent
commit
9369366076

+ 2 - 1
app.json

@@ -89,7 +89,8 @@
                 "tryOut/index",
                 "tryOut/detail",
                 "tryOut/insert",
-                "dealer/Salesperson/insert"
+                "dealer/Salesperson/insert",
+                "hospital/Surgery/update"
             ]
         },
         {

+ 10 - 0
components/Yl_field/index.js

@@ -48,6 +48,8 @@ Component({
       wx.navigateTo({
         url: '/prsx/select/options/index?data=' + JSON.stringify(item),
       })
+      
+
     },
     route(e) {
       const {
@@ -261,6 +263,14 @@ Component({
         [`form[${i}].value`]: item.value
       });
       this.confirm();
+      if (item.interrupt) this.triggerEvent("interrupt", {
+        data: this.data.form[i],
+        form: this.data.form,
+        temporary: {
+          item,
+          index:i
+        }
+      });
     },
     /* 是否完成必填项 */
     confirm() {

+ 1 - 1
components/Yl_field/index.wxss

@@ -25,7 +25,7 @@
 }
 
 .picker .content {
-    width: 480rpx;
+    width: 460rpx;
     min-height: 48rpx;
     line-height: 48rpx;
     box-sizing: border-box;

+ 9 - 2
project.private.config.json

@@ -10,12 +10,19 @@
     "condition": {
         "miniprogram": {
             "list": [
+                {
+                    "name": "prsx/select/docter/index",
+                    "pathName": "prsx/select/docter/index",
+                    "query": "params=%7B%22content%22%3A%7B%22sa_customersid%22%3A6737%2C%22pageNumber%22%3A1%2C%22pageSize%22%3A20%2C%22where%22%3A%7B%22condition%22%3A%22%22%7D%7D%2C%22id%22%3A2025102310134602%7D&radio=true&result=%5B%22%22%5D&value=%5B%22%22%2C%5B%22%22%5D%5D",
+                    "scene": null,
+                    "launchMode": "default"
+                },
                 {
                     "name": "prsx/dealer/Salesperson/insert",
                     "pathName": "prsx/dealer/Salesperson/insert",
                     "query": "sa_agentsid=3529&name=undefined",
-                    "scene": null,
-                    "launchMode": "default"
+                    "launchMode": "default",
+                    "scene": null
                 },
                 {
                     "name": "prsx/dealer/detail",

+ 20 - 1
prsx/hospital/Surgery/index.js

@@ -51,7 +51,13 @@ Component({
           title: res.data,
           icon: "none"
         });
-
+        for (let i = 0; i < res.data.length; i++) {
+          // console.log("手术数量:" + surgeries[i]);
+          let str = res.data[i].types
+          let array = str.split(',');
+          res.data[i].types = array
+          console.log(res.data[i].types)
+        }
         this.setData({
           "content.pageNumber": res.pageNumber + 1,
           "content.pageTotal": res.pageTotal,
@@ -62,6 +68,19 @@ Component({
       })
     },
 
+    update(e) {
+      const page = getCurrentPages().find(v => v.__route__ == 'prsx/hospital/detail'),
+        detail = page.data.detail;
+      const item = e.currentTarget.dataset.item
+      console.log(detail,'detail555')
+      wx.navigateTo({
+        url: `/prsx/hospital/Surgery/update?data=${JSON.stringify(item)}&enterprisename=${detail.enterprisename}`,
+        complete(e) {
+          console.log(e)
+        }
+      })
+    },
+
     toSearch() {
       if (this.data.showSearch && this.data.content.where.condition) {
         this.data.content.where.condition = '';

+ 103 - 94
prsx/hospital/Surgery/index.scss

@@ -1,115 +1,124 @@
 .head {
-	display: flex;
-	align-items: center;
-	width: 100vw;
-	height: 120rpx;
-	padding: 0 20rpx 0 30rpx;
-	box-sizing: border-box;
+  display: flex;
+  align-items: center;
+  width: 100vw;
+  height: 120rpx;
+  padding: 0 20rpx 0 30rpx;
+  box-sizing: border-box;
 
-	.count {
-		font-size: 28rpx;
-		font-family: PingFang SC-Regular, PingFang SC;
-		color: #333333;
-	}
+  .count {
+    font-size: 28rpx;
+    font-family: PingFang SC-Regular, PingFang SC;
+    color: #333333;
+  }
 
-	.expand {
-		flex: 1;
-		display: flex;
-		align-items: center;
-		justify-content: flex-end;
+  .expand {
+    flex: 1;
+    display: flex;
+    align-items: center;
+    justify-content: flex-end;
 
-		.but {
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			flex-shrink: 0;
-			width: 80rpx;
-			height: 80rpx;
-			background: #FFFFFF;
-			border-radius: 8rpx;
-			border: 2rpx solid #CCCCCC;
-			margin-left: 20rpx;
-			color: #666666;
-		}
-	}
+    .but {
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      flex-shrink: 0;
+      width: 80rpx;
+      height: 80rpx;
+      background: #FFFFFF;
+      border-radius: 8rpx;
+      border: 2rpx solid #CCCCCC;
+      margin-left: 20rpx;
+      color: #666666;
+    }
+  }
 }
 
 .custom-class {
-	--search-background-color: #fff !important;
-	padding-right: 10rpx !important;
+  --search-background-color: #fff !important;
+  padding-right: 10rpx !important;
 }
 
 .project-item {
-	display: flex;
-	align-items: center;
-	background-color: #fff;
-	width: 690rpx;
-	border-radius: 8rpx;
-	margin: 0 auto 20rpx;
-	padding: 20rpx 30rpx;
-	box-sizing: border-box;
+  display: flex;
+  align-items: center;
+  background-color: #fff;
+  width: 690rpx;
+  border-radius: 8rpx;
+  margin: 0 auto 20rpx;
+  padding: 20rpx 30rpx;
+  box-sizing: border-box;
 
-	.main {
-		position: relative;
-		overflow: hidden;
-		width: 100%;
+  .main {
+    position: relative;
+    overflow: hidden;
+    width: 100%;
 
-		.label {
-			font-size: 30rpx;
-			font-family: PingFang SC-Regular, PingFang SC;
-			color: #333333;
-		}
+    .iconfont-box {
+      position: absolute;
+      top: -20rpx;
+      right: -30rpx;
+      padding: 30rpx;
+      color: #B5B5B5;
+      border-radius: 8rpx;
+    }
 
-		.tag-box {
-			display: flex;
-			align-items: center;
-			width: 100%;
+    .label {
+      font-size: 30rpx;
+      font-family: PingFang SC-Regular, PingFang SC;
+      color: #333333;
+    }
 
-			.datatag,
-			.systemtag {
-				flex-shrink: 0;
-				margin-top: 6rpx;
-				background: #3874f6;
-				color: #ffffff;
-				margin-right: 10rpx;
-				display: flex;
-				align-items: center;
-				height: 40rpx;
-				font-size: 20rpx;
-				padding: 0 10rpx;
-				border-radius: 20rpx;
-				font-family: PingFang SC-Regular, PingFang SC;
-			}
+    .tag-box {
+      display: flex;
+      align-items: center;
+      width: 100%;
 
-			.datatag {
-				background: #FA8C16;
-			}
-		}
+      .datatag,
+      .systemtag {
+        flex-shrink: 0;
+        margin-top: 6rpx;
+        background: #3874f6;
+        color: #ffffff;
+        margin-right: 10rpx;
+        display: flex;
+        align-items: center;
+        height: 40rpx;
+        font-size: 20rpx;
+        padding: 0 10rpx;
+        border-radius: 20rpx;
+        font-family: PingFang SC-Regular, PingFang SC;
+      }
 
-		.replenish {
-			display: flex;
-			min-height: 34rpx;
-			font-size: 24rpx;
-			font-family: PingFang SC-Regular, PingFang SC;
-			color: #333333;
-			margin-top: 8rpx;
-			word-break: break-all;
-			white-space: pre-wrap;
-		}
+      .datatag {
+        background: #FA8C16;
+      }
+    }
 
-		.icon-shezhijieduan {
-			position: absolute;
-			right: 0;
-			top: 0;
-			font-family: PingFang SC, PingFang SC;
-			font-size: 28rpx;
-			color: #3874F6;
-		}
-	}
+    .replenish {
+      display: flex;
+      min-height: 34rpx;
+      font-size: 24rpx;
+      font-family: PingFang SC-Regular, PingFang SC;
+      color: #333333;
+      margin-top: 8rpx;
+      word-break: break-all;
+      white-space: pre-wrap;
+    }
+
+    .icon-shezhijieduan {
+      position: absolute;
+      right: 0;
+      top: 0;
+      font-family: PingFang SC, PingFang SC;
+      font-size: 28rpx;
+      color: #3874F6;
+    }
+  }
 }
 
 .line-1 {
-	overflow: hidden;
-	white-space: nowrap;
-	text-overflow: ellipsis;
+  overflow: hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;
 }

+ 13 - 7
prsx/hospital/Surgery/index.wxml

@@ -9,8 +9,8 @@
     </navigator>
   </view>
 </view>
-<navigator class="project-item" wx:for="{{list}}">
-  <view class="main">
+<navigator class="project-item" wx:for="{{list}}" wx:key="index">
+  <view class="main" data-item="{{item}}" bind:tap="update">
     <view class="label">
       {{item.year}}
     </view>
@@ -22,13 +22,19 @@
       <text style="color: #666;">备注:</text>
       <text>{{item.remarks || '--'}}</text>
     </view>
-
     <view class="replenish">
-      <text>{{item.types || '--'}}</text>
+      <text style="color: #666;">最近编辑时间:</text>
+      <text>{{item.changedate || '--'}}</text>
     </view>
-
-    <view class="iconfont icon-shezhijieduan" catchtap="setKeyDoctor" data-item="{{item}}">
-      {{ !item.isKeyDoctor ? '设为关键' : '取消关键'}}
+    <view wx:if="{{item.types.length > 0 && item.types[0]}}">
+      <view style="height: 20rpx;" />
+      <van-divider contentPosition="center"></van-divider>
+      <view class="replenish" wx:for="{{item.types}}" wx:key="id">
+        <text>{{item || '--'}}</text>
+      </view>
+    </view>
+    <view wx:if="{{disabled}}" class="iconfont-box" data-item="{{item}}" bind:tap="update">
+      <view class="iconfont icon-bianji1" />
     </view>
   </view>
 </navigator>

+ 342 - 0
prsx/hospital/Surgery/update.js

@@ -0,0 +1,342 @@
+let _Http = getApp().globalData.http,
+  count = null;
+
+Page({
+  data: {
+    loading: false,
+    showAll: false,
+    repetitionShow: false,
+    repetitionList: [],
+    sa_customersid: '',
+    content: {
+      sa_surgeryforecastid: 0,
+      sa_surgeryforecast_itemsid:0
+    },
+    disabled: true,
+    list: [],
+    formData: [], // 表单数据数组
+    isAdd: false,
+    isUpdate: false,
+    nowIndex: 0,
+    oldQty:0
+  },
+  async onLoad(options) {
+    let data = JSON.parse(options.data);
+    console.log(data, 'options.data')
+    this.data.content.sa_surgeryforecastid = data.sa_surgeryforecastid
+    this.data.sa_customersid = data.sa_customersid
+    this.setPreview(data, options.enterprisename);
+    let formData = [{
+        label: "手术类型",
+        id: 1,
+        error: false,
+        errMsg: "",
+        type: "option",
+        optionNmae: "operationtype",
+        optionType: "radio", //复选   radio 单选
+        value: '',
+        placeholder: "手术类型",
+        valueName: "type",
+        checking: "base",
+        required: true,
+        interrupt: true
+      },
+      {
+        label: "预估手术量",
+        id: 1,
+        error: false,
+        errMsg: "",
+        type: "number",
+        value: '',
+        placeholder: "预估手术量",
+        valueName: "qty",
+        checking: "base",
+        required: true,
+        interrupt: true
+      },
+      {
+        label: "医生",
+        id: 1,
+        error: false,
+        errMsg: "",
+        type: "route",
+        url: "/prsx/select/docter/index",
+        value: '',
+        placeholder: "医生",
+        valueName: "sa_doctorid",
+        checking: "base",
+        required: true,
+        params: {
+          "content": {
+            sa_customersid: data.sa_customersid,
+            "pageNumber": 1,
+            "pageSize": 20,
+            "where": {
+              "condition": ""
+            }
+          },
+          "id": 2025102310134602,
+        },
+        query: "&radio=true",
+        interrupt: true,
+        required: false
+      }
+    ]
+    this.setData({
+      loading: false,
+      detail: data,
+      formData: formData
+    })
+    this.getList(data, true)
+    getApp().globalData.Language.getLanguagePackage(this, options.data ? '编辑预估手术量' : '编辑预估手术量');
+
+  },
+  getList(data, init = false) {
+    let content = {
+      sa_surgeryforecastid: this.data.content.sa_surgeryforecastid
+    };
+    if (init) {
+      content.pageNumber = 1
+      content.pageTotal = 1
+    }
+    _Http.basic({
+      "id": 2025111316192502,
+      content
+    }).then(res => {
+      console.log('预估手术量明细', res)
+      if (res.code != '1') return wx.showToast({
+        title: res.data,
+        icon: "none"
+      });
+      this.setData({
+        "content.pageNumber": res.pageNumber + 1,
+        "content.pageTotal": res.pageTotal,
+        "content.total": res.total,
+        list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data)
+      })
+    })
+  },
+  insetr() {
+    // this.data.isAdd = true
+    this.setData({
+      isAdd: true,
+      nowIndex: 1
+    })
+    this.data.list.unshift({
+      doctorname: "",
+      hospitaldepname: "",
+      qty: '',
+      rowindex: 1,
+      sa_customersid: this.data.sa_customersid,
+      sa_doctorid: '',
+      sa_hospitaldepid: '',
+      sa_surgeryforecast_itemsid: 0,
+      sa_surgeryforecastid: this.data.content.sa_surgeryforecastid,
+      type: "",
+    })
+    this.data.list.forEach((item, index) => {
+      item.rowindex = index + 1
+    })
+    this.setData({
+      list: this.data.list
+    })
+  },
+  setPreview(res, enterprisename) {
+    /* 摘要信息 */
+    let briefs = [{
+      label: "医院",
+      value: enterprisename
+    }, {
+      label: "预估手术总量",
+      value: res.sumqty
+    }];
+    this.setData({
+      briefs
+    });
+  },
+  interrupt(e) {
+    console.log('修改111')
+    if (!this.data.isAdd || !this.data.isUpdate) {
+      this.data.isUpdate = true
+      this.setData({
+        isUpdate: this.data.isUpdate
+      })
+    }
+    const {
+      data,
+      form,
+      temporary
+    } = e.detail;
+    console.log(data, form, temporary, '获取的数据////')
+    console.log(e.detail, 'detail')
+    if (temporary.item.label == '医生') {
+      form.find(v => v.label == '医生').value = data.value;
+      wx.navigateBack()
+    }
+    this.selectComponent("#Form").confirm();
+    this.setData({
+      formData: e.detail.form
+    })
+  },
+  deleteItem(e) {
+    console.log(this.data.briefs.find(v => v.label == '预估手术总量').value)
+    console.log(e)
+    const {
+      item
+    } = e.currentTarget.dataset,
+      that = this;
+    if (item.sa_surgeryforecast_itemsid == 0) {
+      this.data.list.shift()
+      this.data.list.forEach((item, index) => {
+        item.rowindex = index + 1
+      })
+      this.setData({
+        list: this.data.list,
+        isAdd: false
+      })
+    } else {
+      if (this.data.isAdd) {
+        wx.showModal({
+          content: `请先完善当前添加功能再进行其他操作`,
+          complete: ({
+            confirm
+          })
+        })
+      } else {
+        let oldQty = item.qty
+        wx.showModal({
+          content: `是否确定删除该预估手术量`,
+          complete: ({
+            confirm
+          }) => {
+            if (confirm) _Http.basic({
+              "id": "2025111315465402",
+              "content": {
+                sa_surgeryforecast_itemsids: [item.sa_surgeryforecast_itemsid]
+              },
+            }).then(res => {
+              wx.showToast({
+                title: res.code == 1 ? '删除成功' : res.msg,
+                icon: "none"
+              })
+              if (res.code == 1) {
+                this.data.briefs.find(v => v.label == '预估手术总量').value = Number(this.data.briefs.find(v => v.label == '预估手术总量').value) - Number(oldQty)
+                this.setData({
+                  briefs: this.data.briefs
+                })
+                that.getList(item, true)
+                setTimeout(() => {
+                  getCurrentPages().forEach(v => {
+                    //更新列表
+                    if (v.selectComponent("#Surgery")) {
+                      let page = v.selectComponent("#Surgery");
+                      page.getList('', true)
+                    };
+                  })
+                }, 300)
+              }
+            })
+          }
+        })
+      }
+    }
+  },
+  /* 表单必填项是否完成 */
+  onConfirm({
+    detail
+  }) {
+    this.setData({
+      disabled: detail
+    })
+  },
+  // 是否显示全部
+  onChange({
+    detail
+  }) {
+    this.setData({
+      showAll: detail
+    })
+  },
+  async submit() {
+    if (!this.data.disabled) {
+      this.setData({
+        loading: true
+      })
+      let data = this.selectComponent("#Form").submit(),
+        content = this.data.content
+      data.sa_doctorid = data.sa_doctorid.length ? data.sa_doctorid[1][0] : 0
+      _Http.basic({
+        "id": 2025111315454902,
+        "content": {
+          ...content,
+          ...data,
+        }
+      }).then(res => {
+        this.setData({
+          loading: false
+        })
+        wx.showToast({
+          title: res.code != '1' ? res.msg : '添加成功',
+          icon: "none",
+          mask: res.code == '1'
+        })
+        if (res.code != '1') return;
+        this.setData({
+          nowIndex: 0,
+          isAdd: false
+        })
+        this.data.briefs.find(v => v.label == '预估手术总量').value = Number(this.data.briefs.find(v => v.label == '预估手术总量').value) + (Number(data.qty)-Number(this.data.oldQty))
+        this.setData({
+          briefs: this.data.briefs
+        })
+        getCurrentPages().forEach(v => {
+          switch (v.route) {
+            case 'prsx/hospital/detail':
+              v.getDetail()
+              break;
+          }
+        })
+        setTimeout(() => {
+          getCurrentPages().forEach(v => {
+            //更新列表
+            if (v.selectComponent("#Surgery")) {
+              let page = v.selectComponent("#Surgery");
+              page.getList('', true)
+            };
+          })
+          this.setData({
+            isAdd: false
+          })
+          this.getList()
+        }, 300)
+      })
+    }
+  },
+  update(e) {
+    console.log(e, '编辑信息')
+    let rowIndex = e.currentTarget.dataset.item.rowindex
+    let data = e.currentTarget.dataset.item
+    console.log(data, 'data数据')
+    this.setData({
+      nowIndex: rowIndex,
+      oldQty:data.qty
+    })
+    let form = this.data.formData.map(v => {
+      if (v.valueName == 'sa_doctorid') {
+        console.log(v,'v的数据输出')
+        v.value = [data.doctorname, [data.sa_doctorid]]
+      } else {
+        v.value = data[v.valueName] || "";
+      }
+      return v
+    })
+    this.setData({
+      disabled: false,
+      content: {
+        sa_surgeryforecastid: data.sa_surgeryforecastid,
+        sa_surgeryforecast_itemsid:data.sa_surgeryforecast_itemsid
+      },
+      formData: form
+    })
+  }
+})

+ 3 - 0
prsx/hospital/Surgery/update.json

@@ -0,0 +1,3 @@
+{
+    "usingComponents": {}
+}

+ 252 - 0
prsx/hospital/Surgery/update.scss

@@ -0,0 +1,252 @@
+.head {
+  display: flex;
+  align-items: center;
+  width: 100vw;
+  height: 120rpx;
+  padding: 0 20rpx 0 30rpx;
+  box-sizing: border-box;
+
+  .count {
+    font-size: 28rpx;
+    font-family: PingFang SC-Regular, PingFang SC;
+    color: #333333;
+  }
+
+  .expand {
+    flex: 1;
+    display: flex;
+    align-items: center;
+    justify-content: flex-end;
+
+    .but {
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      flex-shrink: 0;
+      width: 120rpx;
+      height: 80rpx;
+      background: #FFFFFF;
+      border-radius: 8rpx;
+      border: 2rpx solid #CCCCCC;
+      margin-left: 20rpx;
+      color: #666666;
+    }
+  }
+}
+.setclient-list-item {
+	width: 100vw;
+	background-color: #fff;
+	box-sizing: border-box;
+
+	.con {
+		padding-left: 30rpx;
+		display: flex;
+		width: 100%;
+		box-sizing: border-box;
+		padding-top: 20rpx;
+
+		.mian {
+			flex: 1;
+			width: 0;
+			padding-right: 20rpx;
+			box-sizing: border-box;
+
+			.label {
+				font-size: 28rpx;
+				font-family: PingFang SC-Bold, PingFang SC;
+				font-weight: bold;
+				color: #333333;
+				height: 40rpx;
+				line-height: 40rpx;
+			}
+
+			.tag-box {
+				margin-top: 10rpx;
+
+				.tag {
+					height: 40rpx;
+					font-size: 20rpx;
+					font-family: PingFang SC-Regular, PingFang SC;
+					padding: 0 12rpx;
+					margin-right: 8rpx;
+				}
+			}
+		}
+
+		.icon {
+			display: flex;
+			height: 136rpx;
+			align-items: center;
+			margin-top: -20rpx;
+			color: #CFCFCF;
+			width: 28rpx;
+			margin-right: 30rpx;
+			flex-shrink: 0;
+		}
+
+		.extend {
+			display: flex;
+			height: 116rpx;
+			width: 48rpx;
+			margin-right: 30rpx;
+			flex-shrink: 0;
+		}
+	}
+}
+.project-item {
+  display: flex;
+  align-items: center;
+  background-color: #fff;
+  width: 690rpx;
+  border-radius: 8rpx;
+  margin: 0 auto 20rpx;
+  padding: 0rpx 30rpx  20rpx 0rpx;
+  box-sizing: border-box;
+
+  .main {
+    position: relative;
+    overflow: hidden;
+    width: 100%;
+    
+    .top-right {
+      width: 80rpx;
+      height: 50rpx;
+      background-color: #3874f6;
+      border-radius: 0rpx 0rpx 8rpx 0rpx;
+    }
+
+    .iconfont-box {
+      position: absolute;
+      top: -20rpx;
+      right: 20rpx;
+      padding: 30rpx;
+      font-size: 25rpx;
+      color: #FA8C16;
+      border-radius: 8rpx;
+    }
+
+    .orange {
+      color: #F29C37;
+    }
+    
+    .grey {
+      color: #e6e3e0;
+    }
+
+    .iconfont-box2 {
+      position: absolute;
+      top: -20rpx;
+      right: 20rpx;
+      padding: 30rpx;
+      color: #B5B5B5;
+      border-radius: 8rpx;
+    }
+
+    .iconfont-box1 {
+      position: absolute;
+      top: -20rpx;
+      right: -30rpx;
+      padding: 30rpx;
+      color: #B5B5B5;
+      border-radius: 8rpx;
+    }
+
+    .label {
+      font-size: 26rpx;
+      font-family: PingFang SC-Regular, PingFang SC;
+      text-align: center;
+      vertical-align: middle;
+      height: 50rpx;
+      line-height: 50rpx;
+      color: #fff;
+    }
+
+    .tag-box {
+      display: flex;
+      align-items: center;
+      width: 100%;
+
+      .datatag,
+      .systemtag {
+        flex-shrink: 0;
+        margin-top: 6rpx;
+        background: #3874f6;
+        color: #ffffff;
+        margin-right: 10rpx;
+        display: flex;
+        align-items: center;
+        height: 40rpx;
+        font-size: 20rpx;
+        padding: 0 10rpx;
+        border-radius: 20rpx;
+        font-family: PingFang SC-Regular, PingFang SC;
+      }
+
+      .datatag {
+        background: #FA8C16;
+      }
+    }
+
+    .replenish {
+      display: flex;
+      min-height: 34rpx;
+      font-size: 30rpx;
+      font-family: PingFang SC-Regular, PingFang SC;
+      color: #333333;
+      margin-top: 8rpx;
+      margin-left: 30rpx;
+      word-break: break-all;
+      white-space: pre-wrap;
+    }
+
+    .icon-shezhijieduan {
+      position: absolute;
+      right: 0;
+      top: 0;
+      font-family: PingFang SC, PingFang SC;
+      font-size: 28rpx;
+      color: #3874F6;
+    }
+  }
+}
+.line-1 {
+	overflow: hidden;
+	white-space: nowrap;
+	text-overflow: ellipsis;
+}
+.new-footer {
+	display: flex;
+	align-items: center;
+	justify-content: flex-end;
+	position: fixed;
+	width: 100vw;
+	height: 130rpx;
+	background: #FFFFFF;
+	box-shadow: 0px -4rpx 16rpx 2rpx rgba(150, 157, 165, 0.16);
+	bottom: 0;
+	z-index: 999;
+
+	.new-submit {
+		width: 156rpx;
+		height: 90rpx;
+		border-radius: 8rpx;
+		font-size: 28rpx;
+		font-family: PingFang SC-Bold, PingFang SC;
+		font-weight: bold;
+		color: #FFFFFF;
+		margin-right: 30rpx;
+	}
+
+	.blue {
+		background: #3874F6;
+	}
+
+	.orange {
+		background: #F29C37;
+  }
+  
+  .grey {
+		background: #e6e3e0;
+	}
+
+}

+ 60 - 0
prsx/hospital/Surgery/update.wxml

@@ -0,0 +1,60 @@
+<!-- <Yl_Headline title='基本信息' type='switch' switchLabel='仅显示必填信息' switch='{{showAll}}' bind:callBack='onChange' /> -->
+<view class="setclient-list-item" url="#">
+  <view class="con">
+    <view class="mian">
+      <view class="label line-1">{{detail.year}}</view>
+    </view>
+  </view>
+</view>
+<view style="margin-top: -16rpx;">
+  <Yl_Detail list="{{briefs}}"></Yl_Detail>
+</view>
+<view class="head">
+  <view class="count">
+    添加预估手术量
+  </view>
+  <view class="expand">
+    <navigator wx:if="{{!isAdd}}" url="#" class="but" bindtap="insetr">
+      添加行
+    </navigator>
+  </view>
+</view>
+
+<navigator class="project-item" wx:for="{{list}}" wx:key="index">
+  <view class="main">
+    <view class="label top-right">
+      {{item.rowindex}}
+    </view>
+    <Yl_field wx:if="{{nowIndex == item.rowindex}}" style="width: 420rpx !important;"  id='Form' form='{{formData}}' showAll='{{!showAll}}' bind:onConfirm='onConfirm' bind:interrupt='interrupt' />
+    <view wx:else="">
+      <view class="replenish">
+        <text style="color: #666;">手术类型:</text>
+        <text>{{item.type || '--'}}</text>
+      </view>
+      <view class="replenish">
+        <text style="color: #666;">预估手术总量:</text>
+        <text style="color: #3874F6;">{{item.qty || 0}}</text>
+      </view>
+      <view class="replenish">
+        <text style="color: #666;">医生:</text>
+        <text>{{item.doctorname || 0}}</text>
+      </view>
+    </view>
+    <view class="iconfont-box {{disabled ? 'grey' : 'orange'}}" wx:if="{{nowIndex == item.rowindex}}" data-item="{{item}}" bind:tap="submit">
+      {{ '保存' }}
+    </view>
+    <view  wx:if="{{nowIndex != item.rowindex}}" class="iconfont-box2"  data-item="{{item}}" bind:tap="update">
+      <view class="iconfont icon-bianji" />
+    </view>
+    <view class="iconfont-box1" data-item="{{item}}" bind:tap="deleteItem">
+      <view class="iconfont icon-shanchu" />
+    </view>
+  </view>
+</navigator>
+<view style="height: 160rpx;" />
+
+<!-- <view class="new-footer" style="padding-bottom:12rpx;" wx:if="{{isAdd || isUpdate}}">
+  <van-button  custom-class="new-submit {{'orange'}}" disabled='{{disabled || loading}}' loading='{{loading}}' bindclick='submit'>
+    {{ '保存' }}
+  </van-button>
+</view> -->

+ 4 - 0
prsx/hospital/detail.js

@@ -258,6 +258,10 @@ Page({
         label: "医生",
         icon: "icon-yisheng",
         model: "#Doctors"
+      }, {
+        label: "预估手术量",
+        icon: "icon-yugushoushuliang",
+        model: "#Surgery"
       }, {
         label: "推荐产品",
         icon: "icon-tuijianchanpin",

+ 1 - 1
prsx/hospital/detail.wxml

@@ -21,7 +21,7 @@
     <Address slot='地址管理' id='Address' disabled="{{(per.query(appAuth.options,'address')||isAdmin||isLeader)&& detail.status != '已终止'}}" />
     <Dealer slot='关联经销商' id='Dealer' />
     <Doctors slot='医生' id='Doctors' disabled="{{isLeader}}" />
-    <!-- <Surgery slot='预估手术量' id='Surgery' disabled="{{isLeader}}" /> -->
+    <Surgery slot='预估手术量' id='Surgery' disabled="{{isLeader}}" />
     <Contract slot='合同' id='Contract' />
     <Product slot='推荐产品' id='Product' disabled="{{isLeader}}" />
     <Department slot='科室' id='Department' disabled="{{isLeader}}" />