Bladeren bron

需处理

huangyw 3 jaren geleden
bovenliggende
commit
87ab9f5522

+ 445 - 337
src/xt_pages/data/components/addInspection.vue Bestand weergeven

@@ -1,369 +1,477 @@
1 1
 <template>
2
-    <el-dialog
3
-            :title="formTitle"
4
-            width="900px"
5
-            :visible.sync="visible"
6
-            :before-close="_close"
7
-    >
8
-        <div>
9
-            <el-form :model="form" :rules="rules" ref="form" label-width="100px"
10
-                     style="display: flex;flex-wrap: wrap;justify-content: space-between;">
11
-                <el-form-item label="组套名称 : " prop="project_team" style="width:100%">
12
-                    <el-input v-model="form.project_team" placeholder="" maxlength="30"></el-input>
13
-                </el-form-item>
14
-                <el-form-item label="组套价格 : " prop="price" style="width:100%">
15
-                    <el-input v-model="form.price" placeholder="" maxlength="30"></el-input>
16
-                </el-form-item>
17
-                <el-form-item label="拼音 : " prop="pinyin" style="width:50%">
18
-                    <el-input v-model="form.pinyin" placeholder="" maxlength="30"></el-input>
19
-                </el-form-item>
20
-                <el-form-item label="五笔 : " prop="wubi" style="width:50%">
21
-                    <el-input v-model="form.wubi" placeholder="" maxlength="30"></el-input>
22
-                </el-form-item>
2
+  <el-dialog
3
+    :title="formTitle"
4
+    width="900px"
5
+    :visible.sync="visible"
6
+    :before-close="_close"
7
+  >
8
+    <div>
9
+      <el-form
10
+        :model="form"
11
+        :rules="rules"
12
+        ref="form"
13
+        label-width="100px"
14
+        style="display: flex; flex-wrap: wrap; justify-content: space-between"
15
+      >
16
+        <el-form-item
17
+          label="组套名称 : "
18
+          prop="project_team"
19
+          style="width: 100%"
20
+        >
21
+          <el-input
22
+            v-model="form.project_team"
23
+            placeholder=""
24
+            maxlength="30"
25
+          ></el-input>
26
+        </el-form-item>
27
+        <el-form-item label="组套价格 : " prop="price" style="width: 100%">
28
+          <el-input
29
+            v-model="form.price"
30
+            placeholder=""
31
+            maxlength="30"
32
+          ></el-input>
33
+        </el-form-item>
34
+        <el-form-item label="拼音 : " prop="pinyin" style="width: 50%">
35
+          <el-input
36
+            v-model="form.pinyin"
37
+            placeholder=""
38
+            maxlength="30"
39
+          ></el-input>
40
+        </el-form-item>
41
+        <el-form-item label="五笔 : " prop="wubi" style="width: 50%">
42
+          <el-input
43
+            v-model="form.wubi"
44
+            placeholder=""
45
+            maxlength="30"
46
+          ></el-input>
47
+        </el-form-item>
23 48
 
24
-                <el-form-item label="试管颜色 : " prop="tube_color" style="width:50%">
25
-                    <el-select v-model="form.tube_color" style="width:160px;" placeholder="请选择">
26
-                        <el-option
27
-                                v-for="(item,index) in getDictionaryDataConfig('system','tube_color')"
28
-                                :key="index"
29
-                                :label="item.name"
30
-                                :value="item.id">
31
-                        </el-option>
32
-                    </el-select>
33
-                </el-form-item>
34
-                <el-form-item label="组套类型 : " prop="team_type" style="width:50%">
35
-                    <el-select v-model="form.team_type" style="width:100%;" placeholder="请选择">
36
-                        <el-option
37
-                                v-for="item in options"
38
-                                :key="item.value"
39
-                                :label="item.label"
40
-                                :value="item.value">
41
-                        </el-option>
42
-                    </el-select>
43
-                </el-form-item>
44
-                <el-form-item label="备注 : " prop="name" style="width:100%;">
45
-                    <el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="form.remark"></el-input>
46
-                </el-form-item>
49
+        <el-form-item label="试管颜色 : " prop="tube_color" style="width: 50%">
50
+          <el-select
51
+            v-model="form.tube_color"
52
+            style="width: 160px"
53
+            placeholder="请选择"
54
+          >
55
+            <el-option
56
+              v-for="(item, index) in getDictionaryDataConfig(
57
+                'system',
58
+                'tube_color'
59
+              )"
60
+              :key="index"
61
+              :label="item.name"
62
+              :value="item.id"
63
+            >
64
+            </el-option>
65
+          </el-select>
66
+        </el-form-item>
67
+        <el-form-item label="组套类型 : " prop="team_type" style="width: 50%">
68
+          <el-select
69
+            v-model="form.team_type"
70
+            style="width: 100%"
71
+            placeholder="请选择"
72
+          >
73
+            <el-option
74
+              v-for="item in options"
75
+              :key="item.value"
76
+              :label="item.label"
77
+              :value="item.value"
78
+            >
79
+            </el-option>
80
+          </el-select>
81
+        </el-form-item>
82
+        <el-form-item label="备注 : " prop="name" style="width: 100%">
83
+          <el-input
84
+            type="textarea"
85
+            :rows="2"
86
+            placeholder="请输入内容"
87
+            v-model="form.remark"
88
+          ></el-input>
89
+        </el-form-item>
47 90
 
48
-                <el-form-item label="组套明细" style="width:50%;">
49
-                    <el-select v-model="form.project_detail" filterable placeholder="请选择" @change="changeProject">
50
-                        <el-option
51
-                                v-for="item in projectList"
52
-                                :key="item.new_id"
53
-                                :label="item.project_name"
54
-                                :value="item.new_id">
55
-                        </el-option>
56
-                    </el-select>
57
-                </el-form-item>
91
+        <el-form-item label="组套明细" style="width: 50%">
92
+          <el-select
93
+            v-model="form.project_detail"
94
+            filterable
95
+            placeholder="请选择"
96
+            @change="changeProject"
97
+          >
98
+            <el-option
99
+              v-for="item in projectList"
100
+              :key="item.new_id"
101
+              :label="item.project_name"
102
+              :value="item.new_id"
103
+            >
104
+            </el-option>
105
+          </el-select>
106
+        </el-form-item>
58 107
 
59
-                <el-form-item label="数量" style="width:50%;">
60
-                    <div style="display:flex;">
61
-                        <el-input v-model="form.number" style="margin-right:10px;"></el-input>
62
-                        <el-button type="primary" @click="addProjectList">添加</el-button>
63
-                    </div>
64
-                </el-form-item>
65
-            </el-form>
66
-            <el-form>
67
-                <el-table :data="tableData" border style="100%" :row-style="{ color: '#303133' }"
68
-                          :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
69
-                          highlight-current-row ref="tab">
70
-                    <el-table-column align="center" prop="name" label="分类" width="120">
71
-                        <template slot-scope="scope">
72
-                            <div>{{scope.row.type == 2?getId(scope.row.statistical_classification):'耗材'}}</div>
73
-                        </template>
74
-                    </el-table-column>
75
-                    <el-table-column align="center" prop="name" label="组套明细" width="120">
76
-                        <template slot-scope="scope">{{scope.row.project_name}}</template>
77
-                    </el-table-column>
78
-                    <el-table-column align="center" prop="name" label="数量" width="120">
79
-                        <template slot-scope="scope">{{scope.row.number}}</template>
80
-                    </el-table-column>
81
-                    <el-table-column align="center" prop="name" label="单位" width="120">
82
-                        <template slot-scope="scope">
83
-                            <div v-if="scope.row.type == 2">{{scope.row.unit}}</div>
84
-                            <div v-if="scope.row.type == 3">{{getUnit(scope.row.unit)}}</div>
108
+        <el-form-item label="数量" style="width: 50%">
109
+          <div style="display: flex">
110
+            <el-input
111
+              v-model="form.number"
112
+              style="margin-right: 10px"
113
+            ></el-input>
114
+            <el-button type="primary" @click="addProjectList">添加</el-button>
115
+          </div>
116
+        </el-form-item>
117
+      </el-form>
118
+      <el-form>
119
+        <el-table
120
+          :data="tableData"
121
+          border
122
+          style="100%"
123
+          :row-style="{ color: '#303133' }"
124
+          :header-cell-style="{
125
+            backgroundColor: 'rgb(245, 247, 250)',
126
+            color: '#606266',
127
+          }"
128
+          highlight-current-row
129
+          ref="tab"
130
+        >
131
+          <el-table-column align="center" prop="name" label="分类" width="120">
132
+            <template slot-scope="scope">
133
+              <div>
134
+                {{
135
+                  scope.row.type == 2
136
+                    ? getId(scope.row.statistical_classification)
137
+                    : "耗材"
138
+                }}
139
+              </div>
140
+            </template>
141
+          </el-table-column>
142
+          <el-table-column
143
+            align="center"
144
+            prop="name"
145
+            label="组套明细"
146
+            width="120"
147
+          >
148
+            <template slot-scope="scope">{{ scope.row.project_name }}</template>
149
+          </el-table-column>
150
+          <el-table-column align="center" prop="name" label="数量" width="120">
151
+            <template slot-scope="scope">{{ scope.row.number }}</template>
152
+          </el-table-column>
153
+          <el-table-column align="center" prop="name" label="单位" width="120">
154
+            <template slot-scope="scope">
155
+              <div v-if="scope.row.type == 2">{{ scope.row.unit }}</div>
156
+              <div v-if="scope.row.type == 3">
157
+                {{ getUnit(scope.row.unit) }}
158
+              </div>
159
+            </template>
160
+          </el-table-column>
161
+          <el-table-column align="center" prop="name" label="单价" width="120">
162
+            <template slot-scope="scope">{{ scope.row.price }}</template>
163
+          </el-table-column>
164
+          <el-table-column align="center" prop="name" label="操作">
165
+            <template slot-scope="scope">
166
+              <el-tooltip
167
+                class="item"
168
+                effect="dark"
169
+                content="删除"
170
+                placement="top"
171
+              >
172
+                <el-button
173
+                  type="danger"
174
+                  icon="el-icon-delete"
175
+                  size="small"
176
+                  @click="DeleteProject(scope.row.id, scope.$index)"
177
+                ></el-button>
178
+              </el-tooltip>
179
+            </template>
180
+          </el-table-column>
181
+        </el-table>
182
+      </el-form>
183
+    </div>
85 184
 
86
-                        </template>
87
-                    </el-table-column>
88
-                    <el-table-column align="center" prop="name" label="单价" width="120">
89
-                        <template slot-scope="scope">{{scope.row.price}}</template>
90
-                    </el-table-column>
91
-                    <el-table-column align="center" prop="name" label="操作">
92
-                        <template slot-scope="scope">
93
-                            <el-tooltip
94
-                                    class="item"
95
-                                    effect="dark"
96
-                                    content="删除"
97
-                                    placement="top"
98
-                            >
99
-                                <el-button
100
-                                        type="danger"
101
-                                        icon="el-icon-delete"
102
-                                        size="small"
103
-                                        @click="DeleteProject(scope.row.id,scope.$index)"
104
-                                ></el-button>
105
-                            </el-tooltip>
106
-                        </template>
107
-                    </el-table-column>
108
-                </el-table>
109
-            </el-form>
110
-        </div>
111
-
112
-
113
-        <div slot="footer" class="dialog-footer">
114
-            <el-button @click="hide">取 消</el-button>
115
-            <el-button type="primary" @click="submitAction('form')">保 存</el-button>
116
-        </div>
117
-    </el-dialog>
185
+    <div slot="footer" class="dialog-footer">
186
+      <el-button @click="hide">取 消</el-button>
187
+      <el-button type="primary" @click="submitAction('form')">保 存</el-button>
188
+    </div>
189
+  </el-dialog>
118 190
 </template>
119 191
 
120 192
 <script>
121
-  import { getDataConfig, getDictionaryDataConfig } from '@/utils/data'
122
-  import {
123
-    addProjectList,
124
-    DeleteProject,
125
-    getAllProjectList,
126
-    getProjectDetail,
127
-    saveProjectTeam
128
-  } from '@/api/project/project'
193
+import { getDataConfig, getDictionaryDataConfig } from "@/utils/data";
194
+import {
195
+  addProjectList,
196
+  DeleteProject,
197
+  getAllProjectList,
198
+  getProjectDetail,
199
+  saveProjectTeam,
200
+} from "@/api/project/project";
129 201
 
130
-  import { saveTeam } from '@/api/his/his'
202
+import { saveTeam } from "@/api/his/his";
131 203
 
132
-  export default {
133
-    data() {
134
-      return {
135
-        project_name: '',
136
-        visible: false,
137
-        formTitle: '',
138
-        activeName: 'first',
139
-        form: {
140
-          project_team: '',
141
-          price: 0,
142
-          pinyin: '',
143
-          wubi: '',
144
-          tube_color: '',
145
-          team_type: '',
146
-          remark: '',
147
-          project_detail: '',
148
-          number: '1'
149
-        },
150
-        options: [
151
-          { value: 1, label: '是' },
152
-          { value: 2, label: '否' }
204
+export default {
205
+  data() {
206
+    return {
207
+      project_name: "",
208
+      visible: false,
209
+      formTitle: "",
210
+      activeName: "first",
211
+      form: {
212
+        project_team: "",
213
+        price: 0,
214
+        pinyin: "",
215
+        wubi: "",
216
+        tube_color: "",
217
+        team_type: "",
218
+        remark: "",
219
+        project_detail: "",
220
+        number: "1",
221
+      },
222
+      options: [
223
+        { value: 1, label: "是" },
224
+        { value: 2, label: "否" },
225
+      ],
226
+      value: "",
227
+      radio: "1",
228
+      rules: {
229
+        project_team: [
230
+          { required: true, message: "请填写组套名称", trigger: "blur" },
153 231
         ],
154
-        value: '',
155
-        radio: '1',
156
-        rules: {
157
-          project_team: [{ required: true, message: '请填写组套名称', trigger: 'blur' }],
158
-          //   pinyin: [{ required: true, message: '请填写拼音' , trigger: 'blur' }],
159
-          //   wubi: [{ required: true, message: '请填写五笔' , trigger: 'blur' }],
160
-          price: [{ required: true, message: '请填写价格', trigger: 'change' }],
161
-          //team_type: [{ required: true, message: '请填写组套类型', trigger: 'change' }]
162
-        },
163
-        tableData: [],
164
-        projectList: [],
165
-        tabList: [],
166
-        itemList: []
232
+        //   pinyin: [{ required: true, message: '请填写拼音' , trigger: 'blur' }],
233
+        //   wubi: [{ required: true, message: '请填写五笔' , trigger: 'blur' }],
234
+        price: [{ required: true, message: "请填写价格", trigger: "change" }],
235
+        //team_type: [{ required: true, message: '请填写组套类型', trigger: 'change' }]
236
+      },
237
+      tableData: [],
238
+      projectList: [],
239
+      tabList: [],
240
+      itemList: [],
241
+    };
242
+  },
243
+  methods: {
244
+    getUnit(id) {
245
+      var arr = getDataConfig("hemodialysis", "units");
246
+      for (let i = 0; i < arr.length; i++) {
247
+        if (id == arr[i].id) {
248
+          return arr[i].name;
249
+        }
167 250
       }
168 251
     },
169
-    methods: {
170
-      getUnit(id){
171
-        var arr =  getDataConfig('hemodialysis','units')
172
-        for(let i = 0;i < arr.length; i++){
173
-          if(id == arr[i].id){
174
-            return arr[i].name
252
+    changeProject() {
253
+      this.form.number = 1;
254
+    },
255
+    querySearch(queryString, cb) {
256
+      var restaurants = this.projectList;
257
+      var results = queryString
258
+        ? restaurants.filter(this.createFilter(queryString))
259
+        : restaurants;
260
+      // 调用 callback 返回建议列表的数据
261
+      cb(results);
262
+    },
263
+    createFilter(queryString) {
264
+      return (restaurant) => {
265
+        return (
266
+          restaurant.project_name
267
+            .toLowerCase()
268
+            .indexOf(queryString.toLowerCase()) === 0
269
+        );
270
+      };
271
+    },
272
+    handleSelect(val) {
273
+      this.project_name = val.project_name;
274
+      this.form.project_detail = val.id;
275
+    },
276
+    getDataConfig(module, filed_name) {
277
+      return getDataConfig(module, filed_name);
278
+    },
279
+    getDictionaryDataConfig(module, filed_name) {
280
+      return getDictionaryDataConfig(module, filed_name);
281
+    },
282
+    _close: function (done) {
283
+      done();
284
+    },
285
+    clear: function () {
286
+      this.form.id = 0;
287
+      this.form.name = "";
288
+      this.form.intro = "";
289
+    },
290
+    show(id) {
291
+      this.visible = true;
292
+      this.formTitle = "新增";
293
+    },
294
+    hide() {
295
+      this.visible = false;
296
+    },
297
+    submitAction(formName) {
298
+      this.$refs[formName].validate((valid) => {
299
+        var params = {
300
+          project_team: this.form.project_team,
301
+          price: this.form.price,
302
+          pinyin: this.form.pinyin,
303
+          wubi: this.form.wubi,
304
+          tube_color: this.form.tube_color,
305
+          team_type: this.form.team_type,
306
+          remark: this.form.remark,
307
+        };
308
+        let data = {
309
+          info: this.tableData,
310
+        };
311
+        saveTeam(data, params).then((response) => {
312
+          if (response.data.state == 1) {
313
+            var projectTeam = response.data.data.projectTeam;
314
+            // console.log('projectTeam', projectTeam)
315
+            this.$message.success("保存成功");
316
+            this.visible = false;
317
+            (this.form.project_team = ""),
318
+              (this.form.price = ""),
319
+              (this.form.pinyin = ""),
320
+              (this.form.wubi = ""),
321
+              (this.form.tube_color = ""),
322
+              (this.form.team_type = ""),
323
+              (this.form.remark = "");
324
+            this.tableData = [];
325
+            this.form.number = "";
326
+            this.$parent.getlist();
327
+          } else {
328
+            this.$message.error("项目组套名称已存在!");
175 329
           }
176
-        }
177
-      },
178
-      changeProject() {
179
-        this.form.number = 1
180
-
181
-      },
182
-      querySearch(queryString, cb) {
183
-        var restaurants = this.projectList
184
-        var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants
185
-        // 调用 callback 返回建议列表的数据
186
-        cb(results)
330
+        });
331
+      });
332
+    },
333
+    getlist() {
334
+      let params = {
335
+        keyword: "",
336
+      };
337
+      getAllProjectList(params).then((response) => {
338
+        if (response.data.state == 1) {
339
+          var projectList = response.data.data.projectList;
340
+          var goodInfos = response.data.data.good_info;
187 341
 
188
-      }, createFilter(queryString) {
189
-        return (restaurant) => {
190
-          return (restaurant.project_name.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
191
-        }
192
-      },
193
-      handleSelect(val) {
194
-        this.project_name = val.project_name
195
-        this.form.project_detail = val.id
196
-      },
197
-      getDataConfig(module, filed_name) {
198
-        return getDataConfig(module, filed_name)
199
-      },
200
-      getDictionaryDataConfig(module, filed_name) {
201
-        return getDictionaryDataConfig(module, filed_name)
202
-      },
203
-      _close: function(done) {
204
-        done()
205
-      },
206
-      clear: function() {
207
-        this.form.id = 0
208
-        this.form.name = ''
209
-        this.form.intro = ''
210
-      },
211
-      show(id) {
212
-        this.visible = true
213
-        this.formTitle = '新增'
214
-      },
215
-      hide() {
216
-        this.visible = false
217
-      },
218
-      submitAction(formName) {
219
-        this.$refs[formName].validate((valid) => {
220
-          var params = {
221
-            project_team: this.form.project_team,
222
-            price: this.form.price,
223
-            pinyin: this.form.pinyin,
224
-            wubi: this.form.wubi,
225
-            tube_color: this.form.tube_color,
226
-            team_type: this.form.team_type,
227
-            remark: this.form.remark
342
+          for (let i = 0; i < projectList.length; i++) {
343
+            let obj = {
344
+              id: projectList[i].id,
345
+              statistical_classification:
346
+                projectList[i].statistical_classification,
347
+              number: "1",
348
+              project_name: projectList[i].project_name,
349
+              unit: projectList[i].unit,
350
+              price: projectList[i].price,
351
+              type: 2,
352
+              new_id: Math.floor(
353
+                (Math.random() + Math.floor(Math.random() * 9 + 1)) *
354
+                  Math.pow(10, 10 - 1)
355
+              ),
356
+            };
357
+            this.projectList.push(obj);
228 358
           }
229
-          let data = {
230
-            'info': this.tableData
231
-          }
232
-          saveTeam(data, params).then(response => {
233
-            if (response.data.state == 1) {
234
-              var projectTeam = response.data.data.projectTeam
235
-              // console.log('projectTeam', projectTeam)
236
-              this.$message.success('保存成功')
237
-              this.visible = false
238
-              this.form.project_team = '',
239
-              this.form.price = '',
240
-              this.form.pinyin = '',
241
-              this.form.wubi = '',
242
-              this.form.tube_color = '',
243
-              this.form.team_type = '',
244
-              this.form.remark = ''
245
-              this.tableData = []
246
-              this.form.number = ''
247
-              this.$parent.getlist()
248
-            } else {
249
-              this.$message.error('项目组套名称已存在!')
250
-            }
251
-          })
252
-        })
253
-      },
254
-      getlist() {
255
-        let params = {
256
-          keyword: ''
257
-        }
258
-        getAllProjectList(params).then(response => {
259
-          if (response.data.state == 1) {
260
-            var projectList = response.data.data.projectList
261
-            var goodInfos = response.data.data.good_info
262
-            
263
-            for (let i = 0; i < projectList.length; i++) {
264 359
 
265
-              let obj = {
266
-                id: projectList[i].id,
267
-                statistical_classification: projectList[i].statistical_classification,
268
-                number: '1',
269
-                project_name: projectList[i].project_name,
270
-                unit: projectList[i].unit,
271
-                price: projectList[i].price,
272
-                type: 2,
273
-                new_id: Math.floor((Math.random() + Math.floor(Math.random() * 9 + 1)) * Math.pow(10, 10 - 1)),
274
-              }
275
-              this.projectList.push(obj)
276
-             
277
-            }
360
+          for (let i = 0; i < goodInfos.length; i++) {
361
+            let obj = {
362
+              id: goodInfos[i].id,
363
+              statistical_classification:
364
+                goodInfos[i].statistical_classification,
365
+              number: "1",
366
+              project_name:
367
+                goodInfos[i].good_name + " " + goodInfos[i].specification_name,
368
+              unit: goodInfos[i].good_unit,
369
+              price: goodInfos[i].retail_price,
370
+              type: 3,
371
+              new_id: Math.floor(
372
+                (Math.random() + Math.floor(Math.random() * 9 + 1)) *
373
+                  Math.pow(10, 10 - 1)
374
+              ),
375
+            };
376
+            this.projectList.push(obj);
377
+          }
278 378
 
279
-            for (let i = 0; i < goodInfos.length; i++) {
280
-              let obj = {
281
-                id: goodInfos[i].id,
282
-                statistical_classification: goodInfos[i].statistical_classification,
283
-                number: '1',
284
-                project_name: goodInfos[i].good_name + " " + goodInfos[i].specification_name,
285
-                unit: goodInfos[i].good_unit,
286
-                price: goodInfos[i].retail_price,
287
-                type: 3,
288
-                new_id: Math.floor((Math.random() + Math.floor(Math.random() * 9 + 1)) * Math.pow(10, 10 - 1)),
289
-              }
290
-              this.projectList.push(obj)
291
-              
292
-            }
379
+          console.log("项目2323332", this.projectList);
380
+        }
381
+      });
382
+    },
293 383
 
294
-            console.log("项目2323332",this.projectList)
384
+    getId(id) {
385
+      var name = "";
386
+      var statistics_category = getDictionaryDataConfig(
387
+        "system",
388
+        "statistics_category"
389
+      );
295 390
 
296
-          }
297
-        })
298
-      },
391
+      for (let i = 0; i < statistics_category.length; i++) {
392
+        if (id == statistics_category[i].id) {
393
+          name = statistics_category[i].name;
394
+        }
395
+      }
396
+      return name;
397
+    },
398
+    chagneInspection(id) {
399
+      getProjectDetail(id).then((response) => {
400
+        if (response.data.state == 1) {
401
+          var projectdetail = response.data.data.projecDetail;
299 402
 
300
-      getId(id) {
301
-        var name = ''
302
-        var statistics_category = getDictionaryDataConfig('system', 'statistics_category')
303
-       
304
-        for (let i = 0; i < statistics_category.length; i++) {
305
-          if (id == statistics_category[i].id) {
306
-            name = statistics_category[i].name
307
-          }
403
+          this.tableData.push(projectdetail);
308 404
         }
309
-        return name
310
-      },
311
-      chagneInspection(id) {
312
-        getProjectDetail(id).then(response => {
313
-          if (response.data.state == 1) {
314
-            var projectdetail = response.data.data.projecDetail
315
-        
316
-            this.tableData.push(projectdetail)
317
-          }
318
-        })
319
-      },
320
-      addProjectList() {
321
-        
405
+      });
406
+    },
407
+    addProjectList() {
408
+      console.log(this.tableData, "this.tableData");
409
+      console.log(this.form.project_detail, "form.project_detail");
410
+      let obj = {new_id:this.form.project_detail}
411
+      if (this.tableData.length <= 0) {
322 412
         for (let i = 0; i < this.projectList.length; i++) {
323 413
           if (this.form.project_detail == this.projectList[i].new_id) {
324
-            this.projectList[i].number = this.form.number
325
-            this.projectList[i].number = this.projectList[i].number.toString()
326
-            
327
-            this.tableData.push(this.projectList[i])
328
-            this.form.project_detail = ''
329
-            this.form.number = 1
414
+            this.projectList[i].number = this.form.number;
415
+            this.projectList[i].number = this.projectList[i].number.toString();
416
+
417
+            this.tableData.push(this.projectList[i]);
418
+            this.form.project_detail = "";
419
+            this.form.number = 1;
330 420
           }
331 421
         }
332
-       
333
-      },
334
-      DeleteProject(id, index) {
335
-        this.$confirm('确认删除此项目吗?', '删除', {
336
-          confirmButtonText: '确 定',
337
-          cancelButtonText: '取 消',
338
-          type: 'warning'
339
-        }).then(() => {
340
-          this.tableData.splice(index, 1)
341
-        })
342
-          .catch(() => {
343
-          })
344
-      },
345
-     
346
-    },
347
-    created() {
348
-      //获取所以的项目
349
-      this.getlist()
422
+      } else {
423
+        console.log(obj,'obj')
424
+        this.tableData.forEach((el) => {
425
+          if (this.form.project_detail == el.new_id) {
426
+            this.$message.error("已存在!");
427
+            return;
428
+          } else {
429
+            console.log("oo");
350 430
 
351
-    }, watch: {
352
-      'tableData': function() {
353
-        let c = 0
354
-        this.form.price  = 0
355
-        for (let i = 0; i < this.tableData.length; i++) {
356
-          let a = parseFloat(this.tableData[i].number).toFixed(2)
357
-          let b = parseFloat(this.tableData[i].price).toFixed(2)
358
-         
431
+            // for (let i = 0; i < this.projectList.length; i++) {
432
+            //   if (this.form.project_detail == this.projectList[i].new_id) {
433
+            //     this.projectList[i].number = this.form.number;
434
+            //     this.projectList[i].number =
435
+            //       this.projectList[i].number.toString();
359 436
 
437
+            //     this.tableData.push(this.projectList[i]);
438
+            //     this.form.project_detail = "";
439
+            //     this.form.number = 1;
440
+            //   }
441
+            // }
442
+          }
443
+        });
360 444
 
361
-          c = c + this.form.price + (a * b)
362
-
363
-        }
364
-        this.form.price = c.toFixed(2)
365 445
       }
446
+    },
447
+    DeleteProject(id, index) {
448
+      this.$confirm("确认删除此项目吗?", "删除", {
449
+        confirmButtonText: "确 定",
450
+        cancelButtonText: "取 消",
451
+        type: "warning",
452
+      })
453
+        .then(() => {
454
+          this.tableData.splice(index, 1);
455
+        })
456
+        .catch(() => {});
457
+    },
458
+  },
459
+  created() {
460
+    //获取所以的项目
461
+    this.getlist();
462
+  },
463
+  watch: {
464
+    tableData: function () {
465
+      let c = 0;
466
+      this.form.price = 0;
467
+      for (let i = 0; i < this.tableData.length; i++) {
468
+        let a = parseFloat(this.tableData[i].number).toFixed(2);
469
+        let b = parseFloat(this.tableData[i].price).toFixed(2);
366 470
 
367
-    }
368
-  }
471
+        c = c + this.form.price + a * b;
472
+      }
473
+      this.form.price = c.toFixed(2);
474
+    },
475
+  },
476
+};
369 477
 </script>

+ 26 - 1
src/xt_pages/dialysis/dialysisPrintOrder.vue Bestand weergeven

@@ -634,6 +634,16 @@
634 634
           >打印</el-button
635 635
         >
636 636
       </template>
637
+      <template v-if="org_template_info.template_id == 48">
638
+        <el-button
639
+          :loading="loading"
640
+          size="small"
641
+          icon="el-icon-printer"
642
+          @click="printThisPage"
643
+          type="primary"
644
+          >打印</el-button
645
+        >
646
+      </template>
637 647
     </div>
638 648
     <div class="app-container" style="min-height: 0">
639 649
       <!--<div class="order-print-btn"-->
@@ -995,6 +1005,12 @@
995 1005
             v-if="org_template_info.template_id == 47"
996 1006
           >
997 1007
           </DialysisPrintOrderFortySeven>
1008
+
1009
+           <DialysisPrintOrderFortyEight
1010
+            v-bind:childResponse="childResponse"
1011
+            v-if="org_template_info.template_id == 48"
1012
+          >
1013
+          </DialysisPrintOrderFortyEight>
998 1014
         </div>
999 1015
       </el-container>
1000 1016
     </div>
@@ -1060,9 +1076,11 @@ import DialysisPrintOrderFortyFour from "./template/DialysisPrintOrderFortyFour"
1060 1076
 import DialysisPrintOrderFortyFive from "./template/DialysisPrintOrderFortyFive";
1061 1077
 import DialysisPrintOrderFortySix from "./template/DialysisPrintOrderFortySix";
1062 1078
 import DialysisPrintOrderFortySeven from "./template/DialysisPrintOrderFortySeven";
1079
+import DialysisPrintOrderFortyEight from "./template/DialysisPrintOrderFortyEight";
1063 1080
 export default {
1064 1081
   name: "dialysisPrintOrder",
1065 1082
   components: {
1083
+    DialysisPrintOrderFortyEight,
1066 1084
     DialysisPrintOrderFortySeven,
1067 1085
     DialysisPrintOrderFortySix,
1068 1086
     DialysisPrintOrderFortyFive,
@@ -1608,7 +1626,14 @@ export default {
1608 1626
           style: style2,
1609 1627
           scanStyles: false,
1610 1628
         });
1611
-      }
1629
+      } else if (this.org_template_info.template_id == 48) {
1630
+        printJS({
1631
+          printable: "dialysis-print-box",
1632
+          type: "html",
1633
+          style: style,
1634
+          scanStyles: false,
1635
+        });
1636
+      } 
1612 1637
     },
1613 1638
     printThisOnePage() {
1614 1639
       var ptime = Math.round(new Date().getTime() / 1000);

Diff onderdrukt omdat het te groot bestand
+ 2722 - 0
src/xt_pages/dialysis/template/DialysisPrintOrderFortyEight.vue


+ 13 - 6
src/xt_pages/dialysis/template/DialysisPrintOrderFortyTwo.vue Bestand weergeven

@@ -120,10 +120,12 @@
120 120
                 {{ afterdialysis.actual_ultrafiltration ? afterdialysis.actual_ultrafiltration : '/'}}kg
121 121
               </span>
122 122
             </td>
123
-            <td style="text-align:left;" colspan="1">
123
+           
124
+            <td style="text-align:left;" colspan="2">
124 125
               <span style="display:inline-block;margin-left:15px;">
125
-                透后体重:
126
-                {{ afterdialysis.weight_after ? afterdialysis.weight_after : '/' }} kg
126
+                透析时长:
127
+                {{ afterdialysis.actual_treatment_hour ? afterdialysis.actual_treatment_hour : "0" }}h
128
+                {{ afterdialysis.actual_treatment_minute ? afterdialysis.actual_treatment_minute : "0" }}min
127 129
               </span>
128 130
             </td>
129 131
           </tr>
@@ -134,11 +136,16 @@
134 136
                 {{ afterdialysis.weight_loss ? afterdialysis.weight_loss : "/" }}kg
135 137
               </span>
136 138
             </td> -->
139
+             <td style="text-align:left;" colspan="1">
140
+              <span style="display:inline-block;margin-left:15px;">
141
+                透后体重:
142
+                {{ afterdialysis.weight_after ? afterdialysis.weight_after : '/' }} kg
143
+              </span>
144
+            </td>
137 145
             <td style="text-align:left;" colspan="2">
138 146
               <span style="display:inline-block;margin-left:15px;">
139
-                透析时长:
140
-                {{ afterdialysis.actual_treatment_hour ? afterdialysis.actual_treatment_hour : "0" }}h
141
-                {{ afterdialysis.actual_treatment_minute ? afterdialysis.actual_treatment_minute : "0" }}min
147
+                透后血压:
148
+                {{ afterdialysis.systolic_blood_pressure ? afterdialysis.systolic_blood_pressure : '/' }} mmHg
142 149
               </span>
143 150
             </td>
144 151
           </tr>

+ 18 - 17
src/xt_pages/outpatientCharges/invoiceTemplate/printSix.vue Bestand weergeven

@@ -1,12 +1,12 @@
1 1
 <template>
2 2
     <div id='invoice-print'>
3
-        <div v-for='(i,index) in pageArr.length' :key="index">
4
-            <div :style="{position: 'absolute',top:(20 + (index * 400))  + 'px',left:200+ 'px',}">盐城大丰悦达金骆驼血液透析中心</div>
5
-            <div :style="{position: 'absolute',top:(80 + (index * 400))  + 'px',left:150+ 'px',}">{{ list.order_number }}</div>
3
+        <div v-for='(i,index) in pageArr.length' :key="index" >
4
+            <div :style="{position: 'absolute',top:(20 + (index * 570))  + 'px',left:200+ 'px',}">盐城大丰悦达金骆驼血液透析中心</div>
5
+            <div :style="{position: 'absolute',top:(80 + (index * 570))  + 'px',left:150+ 'px',}">{{ list.order_number }}</div>
6 6
             <div style="display:flex;justify-content: space-between;">
7
-                <div :style="{position: 'absolute',top:(130 + (index * 400))  + 'px',left:80+ 'px',}">{{ paramsObj.name }}</div>
7
+                <div :style="{position: 'absolute',top:(130 + (index * 570))  + 'px',left:80+ 'px',}">{{ paramsObj.name }}</div>
8 8
             </div>
9
-            <div :style="{position: 'absolute',top:(190 + (index * 400))  + 'px',left:80+ 'px',}">
9
+            <div :style="{position: 'absolute',top:(190 + (index * 570))  + 'px',left:80+ 'px',}">
10 10
                 <div v-if="list.westernMedicineCostTotal">西药 {{ list.westernMedicineCostTotal }}</div>
11 11
                 <div v-if="list.treatCostTotal">治疗费 {{ list.treatCostTotal }}</div>
12 12
                 <div v-if="list.bedCostTotal">床位费 {{ list.bedCostTotal }}</div>
@@ -16,7 +16,7 @@
16 16
                 <div v-if="list.otherCostTotal">其他费 {{ list.otherCostTotal }}</div>
17 17
                 <div v-if="list.materialCostTotal">材料费 {{ list.materialCostTotal }}</div>
18 18
             </div>
19
-            <div :style="{position: 'absolute',top:(190 + (index * 400))  + 'px',left:260+ 'px'}">
19
+            <div :style="{position: 'absolute',top:(190 + (index * 570))  + 'px',left:260+ 'px'}">
20 20
                 <div v-for="item in list.order_info.slice(index * 10,(index * 10) + pageArr[index])">
21 21
                     <span style="display:inline-block;width:200px;">
22 22
                         <span v-if="item.advice.id == 0">
@@ -41,9 +41,9 @@
41 41
                     </span>
42 42
                 </div>
43 43
             </div>
44
-            <div :style="{position: 'absolute',top:(390 + (index * 400))  + 'px',left:110+ 'px'}">{{ zhongwen }}</div>
45
-            <div :style="{position: 'absolute',top:(390 + (index * 400))  + 'px',left:460+ 'px'}">{{ list.medfee_sumamt }}</div>
46
-            <div v-if="index == pageArr.length - 1" :style="{position: 'absolute',top:(420 + (index * 400))  + 'px',left:110+ 'px',width:100 + '%',fontSize:12+'px'}">
44
+            <div :style="{position: 'absolute',top:(390 + (index * 570))  + 'px',left:110+ 'px'}">{{ zhongwen }}</div>
45
+            <div :style="{position: 'absolute',top:(390 + (index * 570))  + 'px',left:460+ 'px'}">{{ list.medfee_sumamt }}</div>
46
+            <div v-if="index == pageArr.length - 1" :style="{position: 'absolute',top:(420 + (index * 570))  + 'px',left:110+ 'px',width:100 + '%',fontSize:12+'px'}">
47 47
                 <div style="display:flex;">
48 48
                   <div style="width:140px">医疗总费用:{{ list.order.medfee_sumamt }}</div>
49 49
                   <div style="width:140px">基金支付总额:{{ list.order.fund_pay_sumamt }}</div>
@@ -70,15 +70,15 @@
70 70
 
71 71
             </div>
72 72
             <div>
73
-                <div :style="{position: 'absolute',top:(500 + (index * 400))  + 'px',left:100+ 'px'}">盐城大丰悦达金骆驼血液透析中心</div>
74
-                <div :style="{position: 'absolute',top:(500 + (index * 400))  + 'px',left:360+ 'px'}">{{ paramsObj.chargeName }}</div>
75
-                <div :style="{position: 'absolute',top:(500 + (index * 400))  + 'px',left:520+ 'px'}">
73
+                <div :style="{position: 'absolute',top:(500 + (index * 570))  + 'px',left:100+ 'px'}">盐城大丰悦达金骆驼血液透析中心</div>
74
+                <div :style="{position: 'absolute',top:(500 + (index * 570))  + 'px',left:360+ 'px'}">{{ paramsObj.chargeName }}</div>
75
+                <div :style="{position: 'absolute',top:(500 + (index * 570))  + 'px',left:520+ 'px'}">
76 76
                     <span>{{  paramsObj.setl_time ? paramsObj.setl_time.split(' ')[0].slice(0,4) : getTime(list.date, '{y}-{m}-{d}').slice(0,4) }}</span>
77 77
                 </div>
78
-                <div :style="{position: 'absolute',top:(500 + (index * 400))  + 'px',left:560+ 'px'}">
78
+                <div :style="{position: 'absolute',top:(500 + (index * 570))  + 'px',left:560+ 'px'}">
79 79
                     <span>{{ paramsObj.setl_time ? parseInt(paramsObj.setl_time.split(' ')[0].slice(5,7)) : getTime(list.date, '{y}-{m}-{d}').slice(5,7) }}</span>
80 80
                 </div>
81
-                <div :style="{position: 'absolute',top:(500 + (index * 400))  + 'px',left:600+ 'px'}">
81
+                <div :style="{position: 'absolute',top:(500 + (index * 570))  + 'px',left:600+ 'px'}">
82 82
                     <span>{{ paramsObj.setl_time ? parseInt(paramsObj.setl_time.split(' ')[0].slice(8,11)) : getTime(list.date, '{y}-{m}-{d}').slice(8,11) }}</span>
83 83
                 </div>
84 84
             </div>
@@ -124,9 +124,9 @@ export default {
124 124
     methods:{
125 125
         getInvoice(params){
126 126
             getInvoice(params).then((res) => {
127
-                console.log('res',res)
127
+                // console.log('res',res)
128 128
                 this.list = res.data.data
129
-                console.log(this.list,'表单内容打印记得注释')
129
+                // console.log(this.list,'表单内容打印记得注释')
130 130
                 this.totalPrice = this.list.westernMedicineCostTotal + this.list.checkCostTotal + this.list.treatCostTotal + this.list.bedCostTotal + this.list.chineseTraditionalMedicineCostTotal +
131 131
                                     this.list.laboratoryCostTotal + this.list.operationCostTotal + this.list.otherCostTotal + this.list.materialCostTotal
132 132
                 this.smalltoBIG(this.list.medfee_sumamt)
@@ -136,7 +136,8 @@ export default {
136 136
                 this.printDate = data.getFullYear() + "-" + month + "-" + date;
137 137
                 this.pageArr = []
138 138
                 this.getPage()
139
-                console.log('pageArr',this.pageArr)
139
+                this.pageArr.push(10)
140
+                console.log('pageArr',this.pageArr.length)
140 141
             })
141 142
         },
142 143
         smalltoBIG(n) {

+ 17 - 1
src/xt_pages/stock/warehouseManage/query.vue Bestand weergeven

@@ -84,8 +84,21 @@
84 84
               </el-button>
85 85
             </el-tooltip>
86 86
 
87
-            <el-tooltip class="item" content="禁用" placement="top-start">
87
+            <el-tooltip class="item" :content="scope.row.StorehouseStatus == 0?'禁用':'启用'" placement="top-start">
88 88
               <el-button
89
+                v-if="scope.row.StorehouseStatus == 0"
90
+                size="small"
91
+                type="danger"
92
+                @click="toDisable(scope.row, scope.row.$index)"
93
+                ><img
94
+                  src="../../../assets/purchase/ban.png"
95
+                  alt=""
96
+                  style="width: 12px"
97
+                />
98
+              </el-button>
99
+              <!-- 0:禁用  1:启用 -->
100
+              <el-button
101
+                v-if="scope.row.StorehouseStatus == 1"
89 102
                 size="small"
90 103
                 type="danger"
91 104
                 @click="toDisable(scope.row, scope.row.$index)"
@@ -149,6 +162,8 @@ export default {
149 162
   },
150 163
   data() {
151 164
     return {
165
+      content:"禁用",
166
+      Disable_:0,
152 167
       crumbs: [
153 168
         { path: false, name: "库房管理" },
154 169
         { path: "/stock/warehousequery", name: "仓库管理" },
@@ -251,6 +266,7 @@ export default {
251 266
         updatestatus(params).then((res) => {
252 267
           if (res.data.state == 1) {
253 268
             this.$message.success(res.data.data.list);
269
+            this.Disable_= 1
254 270
           }else {
255 271
             this.$message.error(res.data.msg);
256 272
           }