sale-client 3.6.357 → 3.6.358

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
File without changes
@@ -0,0 +1,2 @@
1
+ #Thu Aug 08 09:41:12 CST 2024
2
+ gradle.version=5.2.1
File without changes
@@ -1,7 +1,7 @@
1
1
  var path = require('path')
2
2
  var checkVersion = require('./versionCheck.js')
3
3
  checkVersion()
4
- const [ serverRul, localUrl, v4Url ] = ['http://192.168.50.4:8400/', 'http://localhost:8080/', 'http://192.168.50.67:31785']
4
+ const [ serverRul, localUrl, v4Url ] = ['http://192.168.50.4:8400/', 'http://192.168.50.4:8400/', 'http://192.168.50.67:31785']
5
5
  var merge = require('webpack-merge')
6
6
  var baseConfig = require('./webpack.dev.conf')
7
7
  var devConfig = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.6.357",
3
+ "version": "3.6.358",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -0,0 +1,127 @@
1
+ <template>
2
+ <div>
3
+ <button @click="handleClick">渲染</button>
4
+ <button @click="savePaper">保存</button>
5
+ <iframe v-if="showSketchPage" :src="sketchPageSrc" id="aaaa2" style="width: 100%; height: 500px;"></iframe>
6
+ </div>
7
+ </template>
8
+
9
+ <script>
10
+ import HttpResetClass from "vue-client/src/plugins/HttpResetClass";
11
+
12
+ export default {
13
+ title: 'App',
14
+ data() {
15
+ return {
16
+ inputText: '',
17
+ showSketchPage: false,
18
+ sketchPageSrc: '/sketch',
19
+ sketchId: '',
20
+ title: '',
21
+ paperMessage: ''
22
+ };
23
+ },
24
+ props: {
25
+ row: ''
26
+ },
27
+ async ready() {
28
+ if (this.row) {
29
+ await new HttpResetClass().load('POST', 'rs/sql/tel_singleTable_OrderBy', {data: {
30
+ items: 'blob', tablename: 't_blob_sketch', condition: `id = '${this.row}'`, orderitem: 'id'
31
+ }}).then(res => {
32
+ if (res.data.length === 0) { return }
33
+ try {
34
+ let hex = Buffer.from(res.data[0].blob, 'hex').toString('utf8');
35
+ if (!hex.includes('{')) {
36
+ this.inputText = Buffer.from(hex, 'hex').toString('utf8');
37
+ } else {
38
+ this.inputText = hex;
39
+ }
40
+ } catch (e) {
41
+ this.$showMessage('网络异常请联系管理员')
42
+ }
43
+ this.handleClick()
44
+ })
45
+ }
46
+ },
47
+ methods: {
48
+ handleClick() {
49
+ this.showSketchPage = true;
50
+ this.$nextTick(() => {
51
+ const sketchIframe = document.getElementById('aaaa2');
52
+
53
+ window.addEventListener('message', (event) => {
54
+ if (JSON.parse(event.data.param).gadgets.length > 0) {
55
+ this.paperMessage = event.data.param;
56
+ }
57
+ });
58
+
59
+ sketchIframe.contentWindow.postMessage(this.inputText, '*');
60
+ })
61
+ },
62
+ savePaper() {
63
+ if (!this.paperMessage) {
64
+ this.$showMessage('请先点击左上角保存图标')
65
+ return
66
+ }
67
+ let param = JSON.parse(this.paperMessage)
68
+ if (!param.title) {
69
+ this.$showMessage('请填写示意图标题')
70
+ return
71
+ }
72
+ let gadgets = param.gadgets
73
+ if (gadgets.length > 0) {
74
+ var jsonString = JSON.stringify(param);
75
+ var reqdata = {
76
+ blob: Buffer.from(jsonString,'utf8').toString('hex'),
77
+ orgid: this.$login.f.orgid,
78
+ orgname: this.$login.f.orgs,
79
+ title: param.title,
80
+ f_userinfo_id: this.row
81
+ }
82
+ new HttpResetClass().load('POST', 'rs/logic/savePaperEdit', {data: reqdata}).then(res => {
83
+ if (res.data.code === 200) {
84
+ this.$showMessage('保存成功')
85
+ } else {
86
+ this.$showMessage('保存失败')
87
+ }
88
+ })
89
+ }
90
+ },
91
+ hexToBytes(hex) {
92
+ for (var bytes = [], c = 0; c < hex.length; c += 2)
93
+ bytes.push(parseInt(hex.substring(c, 2), 16));
94
+ return new Uint8Array(bytes);
95
+ },
96
+ decodeHexStringToJSON(hexString) {
97
+ // 去除前缀 "0x"
98
+ var cleanHexString = hexString.slice(2);
99
+
100
+ // 将十六进制字符串转换为字节数组
101
+ var byteArray = this.hexToBytes(cleanHexString);
102
+
103
+ // 创建 Blob 对象
104
+ var blob = new Blob([byteArray], {type: 'application/json'});
105
+
106
+ // 读取 Blob 为文本
107
+ return new Promise(function(resolve, reject) {
108
+ var reader = new FileReader();
109
+ reader.onloadend = function() {
110
+ resolve(reader.result);
111
+ };
112
+ reader.onerror = function() {
113
+ reject(reader.error);
114
+ };
115
+ reader.readAsText(blob, 'UTF-8');
116
+ });
117
+ }
118
+ },
119
+ // beforeDestroy() {
120
+ // this.savePaper()
121
+ // }
122
+ }
123
+ </script>
124
+
125
+ <style>
126
+ /* 这里可以添加样式 */
127
+ </style>
@@ -11,6 +11,7 @@
11
11
  </button>
12
12
  <button class="button_search" style="width: max-content" @click="uploadFiles()">上传/查看附件</button>
13
13
  <button class="button_search" style="width: max-content" @click="uploadPictures()">拍照</button>
14
+ <button class="button_search" style="width: max-content" @click="openPaper()" v-if="paperButton">图纸编辑</button>
14
15
  <button class="button_search" style="width: max-content" @click="openBankAccount()"
15
16
  v-if="data.meterinfo[0].f_user_type[0] === '非民用' && ($login.r.includes('银行开户'))">银行开户
16
17
  </button>
@@ -143,6 +144,19 @@
143
144
  </button>
144
145
  </footer>
145
146
  </modal>
147
+ <modal :show.sync="showModal" backdrop="false" :width="1000" v-if="paperButton">
148
+ <div slot="modal-header" class="modal-header">
149
+ <h4 class="modal-title">
150
+ 图纸编辑
151
+ </h4>
152
+ </div>
153
+ <div slot="modal-body" class="modal-body">
154
+ <edit :row="rowData" v-if="showModal"></edit>
155
+ </div>
156
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
157
+ <button class="button_search" @click="cancelPaper">取消</button>
158
+ </div>
159
+ </modal>
146
160
  </div>
147
161
  <work-busy :is-busy="seaching"></work-busy>
148
162
  </template>
@@ -201,6 +215,9 @@ export default {
201
215
  components: {UserPaperInfoTest},
202
216
  data () {
203
217
  return {
218
+ showModal:false,
219
+ rowData:'',
220
+ paperButton:this.$appdata.getSingleValue('图纸编辑'),
204
221
  config: {
205
222
  hasnumber: false,
206
223
  adddevices: false,
@@ -337,6 +354,13 @@ export default {
337
354
  }
338
355
  },
339
356
  methods: {
357
+ openPaper(){
358
+ this.rowData = this.row.f_userinfo_id
359
+ this.showModal = true
360
+ },
361
+ cancelPaper(){
362
+ this.showModal = false
363
+ },
340
364
  async getOvedueset () {
341
365
  let overdueset = []
342
366
  let res = await this.$resetpost('rs/sql/saleSingleTable', {
@@ -84,6 +84,11 @@
84
84
  >
85
85
  </v-select>
86
86
  </div>
87
+ <div class="form-group col-sm-3" >
88
+ <label class="font_normal_body">客户地址</label>
89
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_address" placeholder='客户地址'
90
+ condition="f_address like '%{}%'" @keyup.enter="search()">
91
+ </div>
87
92
  </div>
88
93
  </div>
89
94
  </criteria>
@@ -159,6 +159,9 @@ export default {
159
159
  for (let j = 0; j < this.newmeterinfo[i].params.length; j++) {
160
160
  if (this.newmeterinfo[i].name === this.paramtype) {
161
161
  for (let j = 0; j < this.newmeterinfo[i].params.length; j++) {
162
+ if (this.newmeterinfo[i].params[j].data) {
163
+ this.row[this.newmeterinfo[i].params[j].title] = this.newmeterinfo[i].params[j].data
164
+ }
162
165
  if (this.newmeterinfo[i].params[j].multiple == true) {
163
166
  this.row[this.newmeterinfo[i].params[j].title] = []
164
167
  console.log('====>', this.row[this.newmeterinfo[i].params[j].title])