Commit 27fb1711094f8eee3fea27ec6cc2313ad5a0885a

Authored by “wangming”
1 parent d4a6cf68

feat(erp): WtAccount 与收款账户展示,多模块表单/收银与后端联动

Made-with: Cursor
Showing 118 changed files with 3859 additions and 1255 deletions

Too many changes.

To preserve performance only 100 of 118 files are displayed.

Antis.Erp.Plat/antis-ncc-admin/src/api/extend/wtAccount.js 0 → 100644
  1 +import request from '@/utils/request'
  2 +
  3 +export function getAccountSelector(storeId) {
  4 + const data = {}
  5 + if (storeId) data.storeId = storeId
  6 + return request({
  7 + url: '/api/Extend/WtAccount/Selector',
  8 + method: 'GET',
  9 + data
  10 + })
  11 +}
  12 +
  13 +export function getAccountList(params) {
  14 + return request({
  15 + url: '/api/Extend/WtAccount',
  16 + method: 'GET',
  17 + data: params
  18 + })
  19 +}
  20 +
  21 +export function getAccountInfo(id) {
  22 + return request({
  23 + url: '/api/Extend/WtAccount/' + id,
  24 + method: 'GET'
  25 + })
  26 +}
  27 +
  28 +export function createAccount(data) {
  29 + return request({
  30 + url: '/api/Extend/WtAccount',
  31 + method: 'POST',
  32 + data
  33 + })
  34 +}
  35 +
  36 +export function updateAccount(id, data) {
  37 + return request({
  38 + url: '/api/Extend/WtAccount/' + id,
  39 + method: 'PUT',
  40 + data
  41 + })
  42 +}
  43 +
  44 +export function deleteAccount(id) {
  45 + return request({
  46 + url: '/api/Extend/WtAccount/' + id,
  47 + method: 'DELETE'
  48 + })
  49 +}
  50 +
  51 +export function batchRemoveAccount(ids) {
  52 + return request({
  53 + url: '/api/Extend/WtAccount/batchRemove',
  54 + method: 'POST',
  55 + data: ids
  56 + })
  57 +}
  58 +
  59 +export function getAccountCategories() {
  60 + return request({
  61 + url: '/api/Extend/WtAccount/Categories',
  62 + method: 'GET'
  63 + })
  64 +}
  65 +
  66 +export function exportAccount(params) {
  67 + return request({
  68 + url: '/api/Extend/WtAccount/Actions/Export',
  69 + method: 'GET',
  70 + data: params
  71 + })
  72 +}
... ...
Antis.Erp.Plat/antis-ncc-admin/src/utils/wtComboSkzhDisplay.js
... ... @@ -15,7 +15,7 @@ export function resolveSkzhDictionaryLabel(id, options) {
15 15 return oid === sid || ofid === sid
16 16 })
17 17 if (!row) return ''
18   - const name = (row.fullName || row.F_FullName || row.F_mdmc || '').trim()
  18 + const name = (row.fullName || row.accountName || row.F_FullName || row.F_mdmc || '').trim()
19 19 return name || ''
20 20 }
21 21  
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtBjdbd/Form.vue
... ... @@ -290,10 +290,10 @@
290 290 </template>
291 291 <script>
292 292 import request from '@/utils/request'
293   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
294 293 import { previewDataInterface } from '@/api/systemData/dataInterface'
295 294 import BarcodeSelect from '../wtCgrkd/BarcodeSelect.vue'
296 295 import SerialNumberSelect from './SerialNumberSelect.vue'
  296 + import { getAccountSelector } from '@/api/extend/wtAccount'
297 297 export default {
298 298 components: { BarcodeSelect, SerialNumberSelect },
299 299 props: [],
... ... @@ -657,7 +657,7 @@
657 657 });
658 658 },
659 659 getskzhOptions(){
660   - getDictionaryDataSelector('681761709836207365').then(res => {
  660 + getAccountSelector().then(res => {
661 661 this.skzhOptions = res.data.list
662 662 });
663 663 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtBjdbd/index.vue
... ... @@ -217,10 +217,10 @@
217 217 </template>
218 218 <script>
219 219 import request from '@/utils/request'
220   -import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
221 220 import NCCForm from './Form'
222 221 import ExportBox from './ExportBox'
223 222 import { previewDataInterface } from '@/api/systemData/dataInterface'
  223 +import { getAccountSelector } from '@/api/extend/wtAccount'
224 224  
225 225 export default {
226 226 components: { NCCForm, ExportBox },
... ... @@ -321,7 +321,7 @@ export default {
321 321 })
322 322 },
323 323 getskzhOptions() {
324   - getDictionaryDataSelector('681761709836207365').then(res => {
  324 + getAccountSelector().then(res => {
325 325 this.skzhOptions = res.data.list
326 326 })
327 327 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtBsd/Form.vue
... ... @@ -267,10 +267,10 @@
267 267 </template>
268 268 <script>
269 269 import request from '@/utils/request'
270   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
271 270 import { previewDataInterface } from '@/api/systemData/dataInterface'
272 271 import BarcodeSelect from '../wtCgrkd/BarcodeSelect.vue'
273 272 import SerialNumberSelect from './SerialNumberSelect.vue'
  273 + import { getAccountSelector } from '@/api/extend/wtAccount'
274 274 export default {
275 275 components: { BarcodeSelect, SerialNumberSelect },
276 276 props: [],
... ... @@ -583,7 +583,7 @@
583 583 });
584 584 },
585 585 getskzhOptions(){
586   - getDictionaryDataSelector('681761709836207365').then(res => {
  586 + getAccountSelector().then(res => {
587 587 this.skzhOptions = res.data.list
588 588 });
589 589 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtBsd/index.vue
... ... @@ -144,10 +144,10 @@
144 144 </template>
145 145 <script>
146 146 import request from '@/utils/request'
147   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
148 147 import NCCForm from './Form'
149 148 import ExportBox from './ExportBox'
150 149 import { previewDataInterface } from '@/api/systemData/dataInterface'
  150 + import { getAccountSelector } from '@/api/extend/wtAccount'
151 151 export default {
152 152 components: { NCCForm, ExportBox },
153 153 data() {
... ... @@ -218,7 +218,7 @@
218 218 });
219 219 },
220 220 getskzhOptions(){
221   - getDictionaryDataSelector('681761709836207365').then(res => {
  221 + getAccountSelector().then(res => {
222 222 this.skzhOptions = res.data.list
223 223 });
224 224 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtByd/Form.vue
... ... @@ -267,10 +267,10 @@
267 267 </template>
268 268 <script>
269 269 import request from '@/utils/request'
270   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
271 270 import { previewDataInterface } from '@/api/systemData/dataInterface'
272 271 import BarcodeSelect from '../wtCgrkd/BarcodeSelect.vue'
273 272 import SerialNumberSelect from './SerialNumberSelect.vue'
  273 + import { getAccountSelector } from '@/api/extend/wtAccount'
274 274 export default {
275 275 components: { BarcodeSelect, SerialNumberSelect },
276 276 props: [],
... ... @@ -583,7 +583,7 @@
583 583 });
584 584 },
585 585 getskzhOptions(){
586   - getDictionaryDataSelector('681761709836207365').then(res => {
  586 + getAccountSelector().then(res => {
587 587 this.skzhOptions = res.data.list
588 588 });
589 589 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtByd/index.vue
... ... @@ -144,10 +144,10 @@
144 144 </template>
145 145 <script>
146 146 import request from '@/utils/request'
147   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
148 147 import NCCForm from './Form'
149 148 import ExportBox from './ExportBox'
150 149 import { previewDataInterface } from '@/api/systemData/dataInterface'
  150 + import { getAccountSelector } from '@/api/extend/wtAccount'
151 151 export default {
152 152 components: { NCCForm, ExportBox },
153 153 data() {
... ... @@ -218,7 +218,7 @@
218 218 });
219 219 },
220 220 getskzhOptions(){
221   - getDictionaryDataSelector('681761709836207365').then(res => {
  221 + getAccountSelector().then(res => {
222 222 this.skzhOptions = res.data.list
223 223 });
224 224 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtCgrkd/Form.vue
... ... @@ -206,9 +206,9 @@
206 206 </template>
207 207 <script>
208 208 import request from '@/utils/request'
209   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
210 209 import { previewDataInterface } from '@/api/systemData/dataInterface'
211 210 import BarcodeSelectWithScan from './BarcodeSelectWithScan.vue'
  211 + import { getAccountSelector } from '@/api/extend/wtAccount'
212 212 export default {
213 213 components: { BarcodeSelect: BarcodeSelectWithScan },
214 214 props: [],
... ... @@ -352,7 +352,7 @@ setFullName(item,row){
352 352 this.productQuery = val;
353 353 },
354 354 getskzhOptions(){
355   - getDictionaryDataSelector('681761709836207365').then(res => {
  355 + getAccountSelector().then(res => {
356 356 this.skzhOptions = res.data.list
357 357 });
358 358 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtCgrkd/detail-view.vue
... ... @@ -173,9 +173,9 @@
173 173  
174 174 <script>
175 175 import request from '@/utils/request'
176   -import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
177 176 import { previewDataInterface } from '@/api/systemData/dataInterface'
178 177 import { dynamicText } from '@/filters'
  178 +import { getAccountSelector } from '@/api/extend/wtAccount'
179 179  
180 180 export default {
181 181 name: 'WtCgrkdDetailView',
... ... @@ -295,7 +295,7 @@ export default {
295 295 previewDataInterface('681758216954053893').then(res => {
296 296 this.rkckOptions = res.data || []
297 297 })
298   - getDictionaryDataSelector('681761709836207365').then(res => {
  298 + getAccountSelector().then(res => {
299 299 this.skzhOptions = res.data.list || []
300 300 })
301 301 request({
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtCgrkd/index.vue
... ... @@ -139,12 +139,12 @@
139 139 </template>
140 140 <script>
141 141 import request from '@/utils/request'
142   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
143 142 import NCCForm from './Form'
144 143 import DetailView from './detail-view'
145 144 import ExportBox from './ExportBox'
146 145 import { previewDataInterface } from '@/api/systemData/dataInterface'
147 146 import { promptApprovalRemark, postApprovePurchaseInbound, postRejectGeneric } from '@/utils/wtRejectApproval'
  147 + import { getAccountSelector } from '@/api/extend/wtAccount'
148 148 export default {
149 149 components: { NCCForm, DetailView, ExportBox },
150 150 data() {
... ... @@ -221,7 +221,7 @@
221 221 });
222 222 },
223 223 getskzhOptions(){
224   - getDictionaryDataSelector('681761709836207365').then(res => {
  224 + getAccountSelector().then(res => {
225 225 this.skzhOptions = res.data.list
226 226 });
227 227 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtCgthd/Form.vue
1 1 <template>
2   - <el-dialog :title="isNew ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" :visible.sync="visible" class="NCC-dialog NCC-dialog_center" lock-scroll width="80%">
  2 + <el-dialog :title="isNew ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" :visible.sync="visible" class="NCC-dialog NCC-dialog_center" lock-scroll width="80%" append-to-body>
3 3 <el-row :gutter="15" class="" >
4 4 <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" :disabled="!!isDetail" :rules="rules">
5 5 <el-col :span="12">
... ... @@ -187,8 +187,20 @@
187 187 </el-col> -->
188 188 <el-col :span="8">
189 189 <el-form-item label="退款账户" prop="skzh">
190   - <el-select v-model="dataForm.skzh" placeholder="请选择" clearable :style='{"width":"100%"}' filterable >
191   - <el-option v-for="(item, index) in skzhOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>
  190 + <el-select
  191 + v-model="dataForm.skzh"
  192 + placeholder="请选择"
  193 + clearable
  194 + :style='{"width":"100%"}'
  195 + filterable
  196 + popper-append-to-body
  197 + >
  198 + <el-option
  199 + v-for="(item, index) in skzhOptions"
  200 + :key="item.id != null ? String(item.id) : index"
  201 + :label="item.fullName || item.accountName || item.accountCode || '账户'"
  202 + :value="item.id"
  203 + />
192 204 </el-select>
193 205 </el-form-item>
194 206 </el-col>
... ... @@ -242,10 +254,10 @@
242 254 </template>
243 255 <script>
244 256 import request from '@/utils/request'
245   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
246 257 import { previewDataInterface } from '@/api/systemData/dataInterface'
247 258 import SerialNumberSelect from '../wtXsckd/SerialNumberSelect.vue'
248 259 import PurchaseInboundOrderSelect from './PurchaseInboundOrderSelect.vue'
  260 + import { getAccountSelector } from '@/api/extend/wtAccount'
249 261 export default {
250 262 components: { SerialNumberSelect, PurchaseInboundOrderSelect },
251 263 props: [],
... ... @@ -256,8 +268,7 @@
256 268 isDetail: false,
257 269 isNew: false,
258 270 dataForm: {
259   - id:'',
260   - id:undefined,
  271 + id: undefined,
261 272 djrq:undefined,
262 273 cjck:undefined,
263 274 jsr:undefined,
... ... @@ -278,7 +289,6 @@
278 289 gysOptions: [],
279 290 cjckOptions : [],
280 291 rkckOptions : [],
281   - rkckOptions : [],
282 292 ckckOptions : [],
283 293 spbhOptions : [],
284 294 skzhOptions : [],
... ... @@ -300,7 +310,6 @@
300 310 console.log('created钩子执行,准备加载商品下拉');
301 311 this.getcjckOptions();
302 312 this.getrkckOptions();
303   - this.getrkckOptions();
304 313 this.getckckOptions();
305 314 this.getspbhOptions();
306 315 this.getskzhOptions();
... ... @@ -326,11 +335,6 @@
326 335 this.rkckOptions = res.data
327 336 });
328 337 },
329   - getrkckOptions(){
330   - previewDataInterface('681758216954053893').then(res => {
331   - this.rkckOptions = res.data
332   - });
333   - },
334 338 getckckOptions(){
335 339 previewDataInterface('681758216954053893').then(res => {
336 340 this.ckckOptions = res.data
... ... @@ -343,9 +347,16 @@
343 347 });
344 348 },
345 349 getskzhOptions(){
346   - getDictionaryDataSelector('681761709836207365').then(res => {
347   - this.skzhOptions = res.data.list
348   - });
  350 + return getAccountSelector()
  351 + .then(res => {
  352 + const raw = res && res.data
  353 + let list = raw && raw.list != null ? raw.list : null
  354 + if (list == null && Array.isArray(raw)) list = raw
  355 + this.skzhOptions = Array.isArray(list) ? list : []
  356 + })
  357 + .catch(() => {
  358 + this.skzhOptions = []
  359 + })
349 360 },
350 361 getgysOptions() {
351 362 return request({
... ... @@ -419,10 +430,12 @@
419 430 this.visible = true;
420 431 this.isDetail = isDetail || false;
421 432 this.currentSerialRowIndex = -1;
422   - this.$nextTick(() => {
423   - this.$refs['elForm'].resetFields();
424   - if (this.dataForm.id) {
425   - request({
  433 + this.$nextTick(async () => {
  434 + if (this.$refs['elForm']) this.$refs['elForm'].resetFields();
  435 + // 弹窗打开后再拉一次账户,避免 v-if 首屏竞态导致 skzhOptions 为空或 undefined
  436 + await this.getskzhOptions();
  437 + if (this.dataForm.id) {
  438 + request({
426 439 url: '/api/Extend/WtXsckd/' + this.dataForm.id,
427 440 method: 'get'
428 441 }).then(res =>{
... ... @@ -462,7 +475,7 @@
462 475 this.updateTotalAmount();
463 476 this.reloadInboundOrdersForExistingRows();
464 477 })
465   - } else {
  478 + } else {
466 479 this.dataForm.wtXsckdMxList = [];
467 480 // 预生成单据编号
468 481 request({
... ... @@ -474,7 +487,7 @@
474 487 this.dataForm.id = res.data.billNo;
475 488 }
476 489 }).catch(() => {});
477   - }
  490 + }
478 491 })
479 492 },
480 493 dataFormSubmit() {
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtCgthd/detail-view.vue
... ... @@ -184,9 +184,9 @@
184 184  
185 185 <script>
186 186 import request from '@/utils/request'
187   -import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
188 187 import { previewDataInterface } from '@/api/systemData/dataInterface'
189 188 import { dynamicText } from '@/filters'
  189 +import { getAccountSelector } from '@/api/extend/wtAccount'
190 190  
191 191 export default {
192 192 name: 'WtCgthdDetailView',
... ... @@ -291,7 +291,7 @@ export default {
291 291 previewDataInterface('681758216954053893').then(res => {
292 292 this.ckckOptions = res.data || []
293 293 })
294   - getDictionaryDataSelector('681761709836207365').then(res => {
  294 + getAccountSelector().then(res => {
295 295 this.skzhOptions = res.data.list || []
296 296 })
297 297 }
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtCgthd/index.vue
... ... @@ -146,11 +146,11 @@
146 146 </template>
147 147 <script>
148 148 import request from '@/utils/request'
149   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
150 149 import NCCForm from './Form'
151 150 import DetailView from './detail-view'
152 151 import ExportBox from './ExportBox'
153 152 import { previewDataInterface } from '@/api/systemData/dataInterface'
  153 + import { getAccountSelector } from '@/api/extend/wtAccount'
154 154 export default {
155 155 components: { NCCForm, DetailView, ExportBox },
156 156 data() {
... ... @@ -225,7 +225,7 @@
225 225 });
226 226 },
227 227 getskzhOptions(){
228   - getDictionaryDataSelector('681761709836207365').then(res => {
  228 + getAccountSelector().then(res => {
229 229 this.skzhOptions = res.data.list
230 230 });
231 231 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtCwdj/Form.vue
... ... @@ -121,6 +121,7 @@
121 121 import request from '@/utils/request'
122 122 import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
123 123 import { previewDataInterface } from '@/api/systemData/dataInterface'
  124 + import { getAccountSelector } from '@/api/extend/wtAccount'
124 125 export default {
125 126 components: {},
126 127 props: [],
... ... @@ -181,17 +182,17 @@
181 182 });
182 183 },
183 184 getzhbhOptions(){
184   - getDictionaryDataSelector('681761709836207365').then(res => {
  185 + getAccountSelector().then(res => {
185 186 this.zhbhOptions = res.data.list
186 187 });
187 188 },
188 189 getfkzhOptions(){
189   - getDictionaryDataSelector('681761709836207365').then(res => {
  190 + getAccountSelector().then(res => {
190 191 this.fkzhOptions = res.data.list
191 192 });
192 193 },
193 194 getskzhOptions(){
194   - getDictionaryDataSelector('681761709836207365').then(res => {
  195 + getAccountSelector().then(res => {
195 196 this.skzhOptions = res.data.list
196 197 });
197 198 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtCwdj/index.vue
... ... @@ -85,10 +85,10 @@
85 85 </template>
86 86 <script>
87 87 import request from '@/utils/request'
88   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
89 88 import NCCForm from './Form'
90 89 import ExportBox from './ExportBox'
91 90 import { previewDataInterface } from '@/api/systemData/dataInterface'
  91 + import { getAccountSelector } from '@/api/extend/wtAccount'
92 92 export default {
93 93 components: { NCCForm, ExportBox },
94 94 data() {
... ... @@ -138,12 +138,12 @@
138 138 });
139 139 },
140 140 getfkzhOptions(){
141   - getDictionaryDataSelector('681761709836207365').then(res => {
  141 + getAccountSelector().then(res => {
142 142 this.fkzhOptions = res.data.list
143 143 });
144 144 },
145 145 getskzhOptions(){
146   - getDictionaryDataSelector('681761709836207365').then(res => {
  146 + getAccountSelector().then(res => {
147 147 this.skzhOptions = res.data.list
148 148 });
149 149 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtCwdj_dtfyfs/Form.vue
... ... @@ -127,6 +127,7 @@
127 127 import request from '@/utils/request'
128 128 import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
129 129 import { previewDataInterface } from '@/api/systemData/dataInterface'
  130 + import { getAccountSelector } from '@/api/extend/wtAccount'
130 131 export default {
131 132 components: {},
132 133 props: [],
... ... @@ -193,17 +194,17 @@
193 194 });
194 195 },
195 196 getzhbhOptions(){
196   - getDictionaryDataSelector('681761709836207365').then(res => {
  197 + getAccountSelector().then(res => {
197 198 this.zhbhOptions = res.data.list
198 199 });
199 200 },
200 201 getfkzhOptions(){
201   - getDictionaryDataSelector('681761709836207365').then(res => {
  202 + getAccountSelector().then(res => {
202 203 this.fkzhOptions = res.data.list
203 204 });
204 205 },
205 206 getskzhOptions(){
206   - getDictionaryDataSelector('681761709836207365').then(res => {
  207 + getAccountSelector().then(res => {
207 208 this.skzhOptions = res.data.list
208 209 });
209 210 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtCwdj_dtfyfs/index.vue
... ... @@ -90,10 +90,10 @@
90 90 </template>
91 91 <script>
92 92 import request from '@/utils/request'
93   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
94 93 import NCCForm from './Form'
95 94 import ExportBox from './ExportBox'
96 95 import { previewDataInterface } from '@/api/systemData/dataInterface'
  96 + import { getAccountSelector } from '@/api/extend/wtAccount'
97 97 export default {
98 98 components: { NCCForm, ExportBox },
99 99 data() {
... ... @@ -145,12 +145,12 @@
145 145 });
146 146 },
147 147 getfkzhOptions(){
148   - getDictionaryDataSelector('681761709836207365').then(res => {
  148 + getAccountSelector().then(res => {
149 149 this.fkzhOptions = res.data.list
150 150 });
151 151 },
152 152 getskzhOptions(){
153   - getDictionaryDataSelector('681761709836207365').then(res => {
  153 + getAccountSelector().then(res => {
154 154 this.skzhOptions = res.data.list
155 155 });
156 156 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtCwdj_dtfytx/Form.vue
... ... @@ -121,6 +121,7 @@
121 121 import request from '@/utils/request'
122 122 import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
123 123 import { previewDataInterface } from '@/api/systemData/dataInterface'
  124 + import { getAccountSelector } from '@/api/extend/wtAccount'
124 125 export default {
125 126 components: {},
126 127 props: [],
... ... @@ -182,17 +183,17 @@
182 183 });
183 184 },
184 185 getzhbhOptions(){
185   - getDictionaryDataSelector('681761709836207365').then(res => {
  186 + getAccountSelector().then(res => {
186 187 this.zhbhOptions = res.data.list
187 188 });
188 189 },
189 190 getfkzhOptions(){
190   - getDictionaryDataSelector('681761709836207365').then(res => {
  191 + getAccountSelector().then(res => {
191 192 this.fkzhOptions = res.data.list
192 193 });
193 194 },
194 195 getskzhOptions(){
195   - getDictionaryDataSelector('681761709836207365').then(res => {
  196 + getAccountSelector().then(res => {
196 197 this.skzhOptions = res.data.list
197 198 });
198 199 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtCwdj_dtfytx/index.vue
... ... @@ -89,10 +89,10 @@
89 89 </template>
90 90 <script>
91 91 import request from '@/utils/request'
92   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
93 92 import NCCForm from './Form'
94 93 import ExportBox from './ExportBox'
95 94 import { previewDataInterface } from '@/api/systemData/dataInterface'
  95 + import { getAccountSelector } from '@/api/extend/wtAccount'
96 96 export default {
97 97 components: { NCCForm, ExportBox },
98 98 data() {
... ... @@ -142,12 +142,12 @@
142 142 });
143 143 },
144 144 getfkzhOptions(){
145   - getDictionaryDataSelector('681761709836207365').then(res => {
  145 + getAccountSelector().then(res => {
146 146 this.fkzhOptions = res.data.list
147 147 });
148 148 },
149 149 getskzhOptions(){
150   - getDictionaryDataSelector('681761709836207365').then(res => {
  150 + getAccountSelector().then(res => {
151 151 this.skzhOptions = res.data.list
152 152 });
153 153 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtCwdj_fkd/Form.vue
... ... @@ -128,6 +128,7 @@
128 128 import request from '@/utils/request'
129 129 import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
130 130 import { previewDataInterface } from '@/api/systemData/dataInterface'
  131 + import { getAccountSelector } from '@/api/extend/wtAccount'
131 132 export default {
132 133 components: {},
133 134 props: [],
... ... @@ -190,17 +191,17 @@
190 191 });
191 192 },
192 193 getzhbhOptions(){
193   - getDictionaryDataSelector('681761709836207365').then(res => {
  194 + getAccountSelector().then(res => {
194 195 this.zhbhOptions = res.data.list
195 196 });
196 197 },
197 198 getfkzhOptions(){
198   - getDictionaryDataSelector('681761709836207365').then(res => {
  199 + getAccountSelector().then(res => {
199 200 this.fkzhOptions = res.data.list
200 201 });
201 202 },
202 203 getskzhOptions(){
203   - getDictionaryDataSelector('681761709836207365').then(res => {
  204 + getAccountSelector().then(res => {
204 205 this.skzhOptions = res.data.list
205 206 });
206 207 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtCwdj_fkd/detail-view.vue
... ... @@ -124,6 +124,7 @@ import request from &#39;@/utils/request&#39;
124 124 import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
125 125 import { previewDataInterface } from '@/api/systemData/dataInterface'
126 126 import { dynamicText } from '@/filters'
  127 +import { getAccountSelector } from '@/api/extend/wtAccount'
127 128  
128 129 export default {
129 130 name: 'WtCwdjFkdDetailView',
... ... @@ -216,7 +217,7 @@ export default {
216 217 previewDataInterface('716168694526379269').then(res => {
217 218 this.wldwOptions = res.data || []
218 219 })
219   - getDictionaryDataSelector('681761709836207365').then(res => {
  220 + getAccountSelector().then(res => {
220 221 this.zhbhOptions = res.data.list || []
221 222 })
222 223 getDictionaryDataSelector('715562947862070533').then(res => {
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtCwdj_fkd/index.vue
... ... @@ -91,11 +91,11 @@
91 91 </template>
92 92 <script>
93 93 import request from '@/utils/request'
94   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
95 94 import NCCForm from './Form'
96 95 import DetailView from './detail-view'
97 96 import ExportBox from './ExportBox'
98 97 import { previewDataInterface } from '@/api/systemData/dataInterface'
  98 + import { getAccountSelector } from '@/api/extend/wtAccount'
99 99 export default {
100 100 components: { NCCForm, DetailView, ExportBox },
101 101 data() {
... ... @@ -146,12 +146,12 @@
146 146 });
147 147 },
148 148 getfkzhOptions(){
149   - getDictionaryDataSelector('681761709836207365').then(res => {
  149 + getAccountSelector().then(res => {
150 150 this.fkzhOptions = res.data.list
151 151 });
152 152 },
153 153 getskzhOptions(){
154   - getDictionaryDataSelector('681761709836207365').then(res => {
  154 + getAccountSelector().then(res => {
155 155 this.skzhOptions = res.data.list
156 156 });
157 157 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtCwdj_fyd/Form.vue
... ... @@ -134,6 +134,7 @@
134 134 import request from '@/utils/request'
135 135 import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
136 136 import { previewDataInterface } from '@/api/systemData/dataInterface'
  137 + import { getAccountSelector } from '@/api/extend/wtAccount'
137 138 export default {
138 139 components: {},
139 140 props: [],
... ... @@ -195,17 +196,17 @@
195 196 });
196 197 },
197 198 getzhbhOptions(){
198   - getDictionaryDataSelector('681761709836207365').then(res => {
  199 + getAccountSelector().then(res => {
199 200 this.zhbhOptions = res.data.list
200 201 });
201 202 },
202 203 getfkzhOptions(){
203   - getDictionaryDataSelector('681761709836207365').then(res => {
  204 + getAccountSelector().then(res => {
204 205 this.fkzhOptions = res.data.list
205 206 });
206 207 },
207 208 getskzhOptions(){
208   - getDictionaryDataSelector('681761709836207365').then(res => {
  209 + getAccountSelector().then(res => {
209 210 this.skzhOptions = res.data.list
210 211 });
211 212 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtCwdj_fyd/index.vue
... ... @@ -107,10 +107,10 @@
107 107 </template>
108 108 <script>
109 109 import request from '@/utils/request'
110   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
111 110 import NCCForm from './Form'
112 111 import ExportBox from './ExportBox'
113 112 import { previewDataInterface } from '@/api/systemData/dataInterface'
  113 + import { getAccountSelector } from '@/api/extend/wtAccount'
114 114 export default {
115 115 components: { NCCForm, ExportBox },
116 116 data() {
... ... @@ -162,12 +162,12 @@
162 162 });
163 163 },
164 164 getfkzhOptions(){
165   - getDictionaryDataSelector('681761709836207365').then(res => {
  165 + getAccountSelector().then(res => {
166 166 this.fkzhOptions = res.data.list
167 167 });
168 168 },
169 169 getskzhOptions(){
170   - getDictionaryDataSelector('681761709836207365').then(res => {
  170 + getAccountSelector().then(res => {
171 171 this.skzhOptions = res.data.list
172 172 });
173 173 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtCwdj_gdzcbm/Form.vue
... ... @@ -121,6 +121,7 @@
121 121 import request from '@/utils/request'
122 122 import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
123 123 import { previewDataInterface } from '@/api/systemData/dataInterface'
  124 + import { getAccountSelector } from '@/api/extend/wtAccount'
124 125 export default {
125 126 components: {},
126 127 props: [],
... ... @@ -182,17 +183,17 @@
182 183 });
183 184 },
184 185 getzhbhOptions(){
185   - getDictionaryDataSelector('681761709836207365').then(res => {
  186 + getAccountSelector().then(res => {
186 187 this.zhbhOptions = res.data.list
187 188 });
188 189 },
189 190 getfkzhOptions(){
190   - getDictionaryDataSelector('681761709836207365').then(res => {
  191 + getAccountSelector().then(res => {
191 192 this.fkzhOptions = res.data.list
192 193 });
193 194 },
194 195 getskzhOptions(){
195   - getDictionaryDataSelector('681761709836207365').then(res => {
  196 + getAccountSelector().then(res => {
196 197 this.skzhOptions = res.data.list
197 198 });
198 199 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtCwdj_gdzcbm/index.vue
... ... @@ -89,10 +89,10 @@
89 89 </template>
90 90 <script>
91 91 import request from '@/utils/request'
92   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
93 92 import NCCForm from './Form'
94 93 import ExportBox from './ExportBox'
95 94 import { previewDataInterface } from '@/api/systemData/dataInterface'
  95 + import { getAccountSelector } from '@/api/extend/wtAccount'
96 96 export default {
97 97 components: { NCCForm, ExportBox },
98 98 data() {
... ... @@ -142,12 +142,12 @@
142 142 });
143 143 },
144 144 getfkzhOptions(){
145   - getDictionaryDataSelector('681761709836207365').then(res => {
  145 + getAccountSelector().then(res => {
146 146 this.fkzhOptions = res.data.list
147 147 });
148 148 },
149 149 getskzhOptions(){
150   - getDictionaryDataSelector('681761709836207365').then(res => {
  150 + getAccountSelector().then(res => {
151 151 this.skzhOptions = res.data.list
152 152 });
153 153 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtCwdj_gdzcgm/Form.vue
... ... @@ -127,6 +127,7 @@
127 127 import request from '@/utils/request'
128 128 import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
129 129 import { previewDataInterface } from '@/api/systemData/dataInterface'
  130 + import { getAccountSelector } from '@/api/extend/wtAccount'
130 131 export default {
131 132 components: {},
132 133 props: [],
... ... @@ -193,17 +194,17 @@
193 194 });
194 195 },
195 196 getzhbhOptions(){
196   - getDictionaryDataSelector('681761709836207365').then(res => {
  197 + getAccountSelector().then(res => {
197 198 this.zhbhOptions = res.data.list
198 199 });
199 200 },
200 201 getfkzhOptions(){
201   - getDictionaryDataSelector('681761709836207365').then(res => {
  202 + getAccountSelector().then(res => {
202 203 this.fkzhOptions = res.data.list
203 204 });
204 205 },
205 206 getskzhOptions(){
206   - getDictionaryDataSelector('681761709836207365').then(res => {
  207 + getAccountSelector().then(res => {
207 208 this.skzhOptions = res.data.list
208 209 });
209 210 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtCwdj_gdzcgm/index.vue
... ... @@ -90,10 +90,10 @@
90 90 </template>
91 91 <script>
92 92 import request from '@/utils/request'
93   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
94 93 import NCCForm from './Form'
95 94 import ExportBox from './ExportBox'
96 95 import { previewDataInterface } from '@/api/systemData/dataInterface'
  96 + import { getAccountSelector } from '@/api/extend/wtAccount'
97 97 export default {
98 98 components: { NCCForm, ExportBox },
99 99 data() {
... ... @@ -145,12 +145,12 @@
145 145 });
146 146 },
147 147 getfkzhOptions(){
148   - getDictionaryDataSelector('681761709836207365').then(res => {
  148 + getAccountSelector().then(res => {
149 149 this.fkzhOptions = res.data.list
150 150 });
151 151 },
152 152 getskzhOptions(){
153   - getDictionaryDataSelector('681761709836207365').then(res => {
  153 + getAccountSelector().then(res => {
154 154 this.skzhOptions = res.data.list
155 155 });
156 156 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtCwdj_gdzczj/Form.vue
... ... @@ -121,6 +121,7 @@
121 121 import request from '@/utils/request'
122 122 import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
123 123 import { previewDataInterface } from '@/api/systemData/dataInterface'
  124 + import { getAccountSelector } from '@/api/extend/wtAccount'
124 125 export default {
125 126 components: {},
126 127 props: [],
... ... @@ -182,17 +183,17 @@
182 183 });
183 184 },
184 185 getzhbhOptions(){
185   - getDictionaryDataSelector('681761709836207365').then(res => {
  186 + getAccountSelector().then(res => {
186 187 this.zhbhOptions = res.data.list
187 188 });
188 189 },
189 190 getfkzhOptions(){
190   - getDictionaryDataSelector('681761709836207365').then(res => {
  191 + getAccountSelector().then(res => {
191 192 this.fkzhOptions = res.data.list
192 193 });
193 194 },
194 195 getskzhOptions(){
195   - getDictionaryDataSelector('681761709836207365').then(res => {
  196 + getAccountSelector().then(res => {
196 197 this.skzhOptions = res.data.list
197 198 });
198 199 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtCwdj_gdzczj/index.vue
... ... @@ -89,10 +89,10 @@
89 89 </template>
90 90 <script>
91 91 import request from '@/utils/request'
92   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
93 92 import NCCForm from './Form'
94 93 import ExportBox from './ExportBox'
95 94 import { previewDataInterface } from '@/api/systemData/dataInterface'
  95 + import { getAccountSelector } from '@/api/extend/wtAccount'
96 96 export default {
97 97 components: { NCCForm, ExportBox },
98 98 data() {
... ... @@ -142,12 +142,12 @@
142 142 });
143 143 },
144 144 getfkzhOptions(){
145   - getDictionaryDataSelector('681761709836207365').then(res => {
  145 + getAccountSelector().then(res => {
146 146 this.fkzhOptions = res.data.list
147 147 });
148 148 },
149 149 getskzhOptions(){
150   - getDictionaryDataSelector('681761709836207365').then(res => {
  150 + getAccountSelector().then(res => {
151 151 this.skzhOptions = res.data.list
152 152 });
153 153 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtCwdj_skd/Form.vue
... ... @@ -128,6 +128,7 @@
128 128 import request from '@/utils/request'
129 129 import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
130 130 import { previewDataInterface } from '@/api/systemData/dataInterface'
  131 + import { getAccountSelector } from '@/api/extend/wtAccount'
131 132 export default {
132 133 components: {},
133 134 props: [],
... ... @@ -190,17 +191,17 @@
190 191 });
191 192 },
192 193 getzhbhOptions(){
193   - getDictionaryDataSelector('681761709836207365').then(res => {
  194 + getAccountSelector().then(res => {
194 195 this.zhbhOptions = res.data.list
195 196 });
196 197 },
197 198 getfkzhOptions(){
198   - getDictionaryDataSelector('681761709836207365').then(res => {
  199 + getAccountSelector().then(res => {
199 200 this.fkzhOptions = res.data.list
200 201 });
201 202 },
202 203 getskzhOptions(){
203   - getDictionaryDataSelector('681761709836207365').then(res => {
  204 + getAccountSelector().then(res => {
204 205 this.skzhOptions = res.data.list
205 206 });
206 207 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtCwdj_skd/detail-view.vue
... ... @@ -124,6 +124,7 @@ import request from &#39;@/utils/request&#39;
124 124 import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
125 125 import { previewDataInterface } from '@/api/systemData/dataInterface'
126 126 import { dynamicText } from '@/filters'
  127 +import { getAccountSelector } from '@/api/extend/wtAccount'
127 128  
128 129 export default {
129 130 name: 'WtCwdjSkdDetailView',
... ... @@ -216,7 +217,7 @@ export default {
216 217 previewDataInterface('716168694526379269').then(res => {
217 218 this.wldwOptions = res.data || []
218 219 })
219   - getDictionaryDataSelector('681761709836207365').then(res => {
  220 + getAccountSelector().then(res => {
220 221 this.zhbhOptions = res.data.list || []
221 222 })
222 223 getDictionaryDataSelector('715562947862070533').then(res => {
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtCwdj_skd/index.vue
... ... @@ -91,11 +91,11 @@
91 91 </template>
92 92 <script>
93 93 import request from '@/utils/request'
94   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
95 94 import NCCForm from './Form'
96 95 import DetailView from './detail-view'
97 96 import ExportBox from './ExportBox'
98 97 import { previewDataInterface } from '@/api/systemData/dataInterface'
  98 + import { getAccountSelector } from '@/api/extend/wtAccount'
99 99 export default {
100 100 components: { NCCForm, DetailView, ExportBox },
101 101 data() {
... ... @@ -146,12 +146,12 @@
146 146 });
147 147 },
148 148 getfkzhOptions(){
149   - getDictionaryDataSelector('681761709836207365').then(res => {
  149 + getAccountSelector().then(res => {
150 150 this.fkzhOptions = res.data.list
151 151 });
152 152 },
153 153 getskzhOptions(){
154   - getDictionaryDataSelector('681761709836207365').then(res => {
  154 + getAccountSelector().then(res => {
155 155 this.skzhOptions = res.data.list
156 156 });
157 157 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtFkd/Form.vue
... ... @@ -86,8 +86,8 @@
86 86 </template>
87 87 <script>
88 88 import request from '@/utils/request'
89   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
90 89 import { previewDataInterface } from '@/api/systemData/dataInterface'
  90 + import { getAccountSelector } from '@/api/extend/wtAccount'
91 91 export default {
92 92 components: {},
93 93 props: [],
... ... @@ -132,7 +132,7 @@
132 132 });
133 133 },
134 134 getjszhOptions(){
135   - getDictionaryDataSelector('681761709836207365').then(res => {
  135 + getAccountSelector().then(res => {
136 136 this.jszhOptions = res.data.list
137 137 });
138 138 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtFkd/index.vue
... ... @@ -121,10 +121,10 @@
121 121 </template>
122 122 <script>
123 123 import request from '@/utils/request'
124   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
125 124 import NCCForm from './Form'
126 125 import ExportBox from './ExportBox'
127 126 import { previewDataInterface } from '@/api/systemData/dataInterface'
  127 + import { getAccountSelector } from '@/api/extend/wtAccount'
128 128 export default {
129 129 components: { NCCForm, ExportBox },
130 130 data() {
... ... @@ -184,7 +184,7 @@
184 184 });
185 185 },
186 186 getjszhOptions(){
187   - getDictionaryDataSelector('681761709836207365').then(res => {
  187 + getAccountSelector().then(res => {
188 188 this.jszhOptions = res.data.list
189 189 });
190 190 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtHzd/Form.vue
... ... @@ -287,10 +287,10 @@
287 287 </template>
288 288 <script>
289 289 import request from '@/utils/request'
290   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
291 290 import { previewDataInterface } from '@/api/systemData/dataInterface'
292 291 import BarcodeSelect from '../wtCgrkd/BarcodeSelect.vue'
293 292 import SerialNumberSelect from './SerialNumberSelect.vue'
  293 + import { getAccountSelector } from '@/api/extend/wtAccount'
294 294 export default {
295 295 components: { BarcodeSelect, SerialNumberSelect },
296 296 props: [],
... ... @@ -607,7 +607,7 @@
607 607 });
608 608 },
609 609 getskzhOptions(){
610   - getDictionaryDataSelector('681761709836207365').then(res => {
  610 + getAccountSelector().then(res => {
611 611 this.skzhOptions = res.data.list
612 612 });
613 613 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtHzd/index.vue
... ... @@ -144,10 +144,10 @@
144 144 </template>
145 145 <script>
146 146 import request from '@/utils/request'
147   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
148 147 import NCCForm from './Form'
149 148 import ExportBox from './ExportBox'
150 149 import { previewDataInterface } from '@/api/systemData/dataInterface'
  150 + import { getAccountSelector } from '@/api/extend/wtAccount'
151 151 export default {
152 152 components: { NCCForm, ExportBox },
153 153 data() {
... ... @@ -218,7 +218,7 @@
218 218 });
219 219 },
220 220 getskzhOptions(){
221   - getDictionaryDataSelector('681761709836207365').then(res => {
  221 + getAccountSelector().then(res => {
222 222 this.skzhOptions = res.data.list
223 223 });
224 224 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtMrsz/index.vue
... ... @@ -32,8 +32,8 @@
32 32  
33 33 <script>
34 34 import request from '@/utils/request'
35   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
36 35 import { previewDataInterface } from '@/api/systemData/dataInterface'
  36 + import { getAccountSelector } from '@/api/extend/wtAccount'
37 37  
38 38 export default {
39 39 name: 'wtMrsz',
... ... @@ -72,7 +72,7 @@
72 72 }).catch(() => {})
73 73  
74 74 // 收款账户(字典数据,与销售出库单一致)
75   - getDictionaryDataSelector('681761709836207365').then(res => {
  75 + getAccountSelector().then(res => {
76 76 this.skzhOptions = res.data && res.data.list ? res.data.list : []
77 77 }).catch(() => {})
78 78 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtPdd/Form.vue
... ... @@ -282,10 +282,10 @@
282 282 </template>
283 283 <script>
284 284 import request from '@/utils/request'
285   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
286 285 import { previewDataInterface } from '@/api/systemData/dataInterface'
287 286 import BarcodeSelect from '../wtCgrkd/BarcodeSelect.vue'
288 287 import SerialNumberSelect from './SerialNumberSelect.vue'
  288 + import { getAccountSelector } from '@/api/extend/wtAccount'
289 289 export default {
290 290 components: { BarcodeSelect, SerialNumberSelect },
291 291 props: [],
... ... @@ -606,7 +606,7 @@
606 606 });
607 607 },
608 608 getskzhOptions(){
609   - getDictionaryDataSelector('681761709836207365').then(res => {
  609 + getAccountSelector().then(res => {
610 610 this.skzhOptions = res.data.list
611 611 });
612 612 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtPdd/index.vue
... ... @@ -144,10 +144,10 @@
144 144 </template>
145 145 <script>
146 146 import request from '@/utils/request'
147   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
148 147 import NCCForm from './Form'
149 148 import ExportBox from './ExportBox'
150 149 import { previewDataInterface } from '@/api/systemData/dataInterface'
  150 + import { getAccountSelector } from '@/api/extend/wtAccount'
151 151 export default {
152 152 components: { NCCForm, ExportBox },
153 153 data() {
... ... @@ -218,7 +218,7 @@
218 218 });
219 219 },
220 220 getskzhOptions(){
221   - getDictionaryDataSelector('681761709836207365').then(res => {
  221 + getAccountSelector().then(res => {
222 222 this.skzhOptions = res.data.list
223 223 });
224 224 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtPurchaseSummary/index.vue
1 1 <template>
2   - <div class="purchase-summary-page">
3   - <div class="form-section">
4   - <el-form :inline="false" :model="filters" label-width="90px" size="small">
5   - <el-row :gutter="10">
6   - <el-col :span="12">
  2 + <div class="NCC-common-layout">
  3 + <div class="NCC-common-layout-center">
  4 + <el-row class="NCC-common-search-box" :gutter="16">
  5 + <el-form @submit.native.prevent>
  6 + <el-col :span="6">
7 7 <el-form-item label="查询日期">
8 8 <el-date-picker
9 9 v-model="filters.dateRange"
... ... @@ -13,10 +13,11 @@
13 13 end-placeholder="结束日期"
14 14 style="width: 100%"
15 15 value-format="yyyy-MM-dd"
  16 + clearable
16 17 />
17 18 </el-form-item>
18 19 </el-col>
19   - <el-col :span="12">
  20 + <el-col :span="6">
20 21 <el-form-item label="往来单位">
21 22 <el-select
22 23 v-model="filters.contactUnit"
... ... @@ -36,8 +37,8 @@
36 37 </el-select>
37 38 </el-form-item>
38 39 </el-col>
39   - <el-col :span="12">
40   - <el-form-item label="经 手 人">
  40 + <el-col :span="6">
  41 + <el-form-item label="经手人">
41 42 <el-select
42 43 v-model="filters.agent"
43 44 multiple
... ... @@ -49,36 +50,43 @@
49 50 >
50 51 <el-option
51 52 v-for="item in agentOptions"
52   - :key="item"
53   - :label="item"
54   - :value="item"
  53 + :key="item.value"
  54 + :label="item.label"
  55 + :value="item.value"
55 56 />
56 57 </el-select>
57 58 </el-form-item>
58 59 </el-col>
59   - <el-col :span="12">
  60 + <el-col :span="6">
60 61 <el-form-item label="商品">
61 62 <el-select
62   - v-model="filters.productName"
  63 + v-model="filters.productSpId"
63 64 filterable
64 65 remote
65 66 clearable
66 67 reserve-keyword
  68 + popper-class="wt-purchase-sum-product-dropdown"
67 69 :remote-method="handleProductSearch"
68 70 :loading="productLoading"
69   - placeholder="请输入商品编号或名称搜索"
  71 + placeholder="输入商品编码或名称搜索"
70 72 style="width: 100%"
71 73 >
72 74 <el-option
73 75 v-for="item in productOptions"
74   - :key="item.F_Id || item.id || item.spbm || item.productCode"
  76 + :key="item.F_Id || item.id"
75 77 :label="formatProductLabel(item)"
76   - :value="formatProductLabel(item)"
77   - />
  78 + :value="item.F_Id || item.id"
  79 + >
  80 + <div class="product-opt-row cell-nowrap" :title="formatProductLabel(item)">
  81 + <span v-if="productCodeRaw(item)" class="product-opt-code">{{ productCodeRaw(item) }}</span>
  82 + <span v-if="productCodeRaw(item) && productNameRaw(item)" class="product-opt-sep">|</span>
  83 + <span class="product-opt-name">{{ productNameRaw(item) || '无' }}</span>
  84 + </div>
  85 + </el-option>
78 86 </el-select>
79 87 </el-form-item>
80 88 </el-col>
81   - <el-col :span="12">
  89 + <el-col :span="6">
82 90 <el-form-item label="入库仓库">
83 91 <el-select
84 92 v-model="filters.warehouse"
... ... @@ -98,7 +106,7 @@
98 106 </el-select>
99 107 </el-form-item>
100 108 </el-col>
101   - <el-col :span="12">
  109 + <el-col :span="6">
102 110 <el-form-item label="单据类型">
103 111 <el-select
104 112 v-model="filters.billType"
... ... @@ -106,7 +114,7 @@
106 114 collapse-tags
107 115 clearable
108 116 style="width: 100%"
109   - placeholder="全部单据"
  117 + placeholder="全部相关单据"
110 118 >
111 119 <el-option
112 120 v-for="item in billTypeOptions"
... ... @@ -117,65 +125,220 @@
117 125 </el-select>
118 126 </el-form-item>
119 127 </el-col>
120   - <el-col :span="24">
121   - <div class="action-row">
122   - <el-button type="primary" size="mini" @click="handleSearch">搜索</el-button>
123   - <el-button size="mini" @click="handleReset">重置</el-button>
124   - </div>
  128 + <el-col :span="6">
  129 + <el-form-item>
  130 + <el-button type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button>
  131 + <el-button icon="el-icon-refresh-right" @click="handleReset">重置</el-button>
  132 + </el-form-item>
125 133 </el-col>
126   - </el-row>
127   - </el-form>
128   - </div>
129   - <div class="table-section">
130   - <div class="table-title-bar">
131   - <i class="el-icon-document" style="font-size: 20px; margin-right: 6px; color: #409eff" />
132   - <span>商品采购汇总表 · 过往采购记录</span>
133   - </div>
134   - <div class="table-scroll">
  134 + </el-form>
  135 + </el-row>
  136 +
  137 + <div class="NCC-common-layout-main NCC-flex-main">
  138 + <div class="NCC-common-head purchase-sum-head">
  139 + <div>
  140 + <span class="purchase-sum-head__title">
  141 + <i class="el-icon-s-data purchase-sum-head__icon" aria-hidden="true" />
  142 + 商品采购汇总(分类 → 品牌 → 商品明细分类 → 采购明细)
  143 + </span>
  144 + </div>
  145 + <div class="NCC-common-head-right">
  146 + <el-tooltip effect="dark" content="刷新" placement="top">
  147 + <el-link
  148 + icon="icon-ym icon-ym-Refresh NCC-common-head-icon"
  149 + :underline="false"
  150 + @click="handleSearch"
  151 + />
  152 + </el-tooltip>
  153 + <screenfull isContainer />
  154 + </div>
  155 + </div>
  156 +
135 157 <el-table
136   - :data="list"
  158 + v-loading="categoryLoading"
  159 + :data="categoryList"
137 160 border
138   - style="width: 100%"
139   - :header-cell-style="{ background: '#f5f7fa' }"
140   - class="purchase-record-table"
  161 + class="purchase-tree-table"
  162 + :row-key="r => String(r['分类Id'])"
  163 + @expand-change="onCategoryExpand"
141 164 >
142   - <el-table-column type="index" label="行号" width="56" :index="indexMethod" fixed />
143   - <el-table-column prop="单据日期" label="单据日期" width="110" show-overflow-tooltip />
144   - <el-table-column prop="单据编号" label="单据编号" min-width="160" show-overflow-tooltip />
145   - <el-table-column prop="单据类型" label="单据类型" width="120" show-overflow-tooltip />
146   - <el-table-column prop="往来单位" label="往来单位" min-width="140" show-overflow-tooltip />
147   - <el-table-column prop="经手人" label="经手人" width="100" show-overflow-tooltip />
148   - <el-table-column prop="仓库名称" label="仓库名称" min-width="120" show-overflow-tooltip />
149   - <el-table-column prop="商品名称" label="商品名称" min-width="160" show-overflow-tooltip />
150   - <el-table-column prop="数量" label="数量" width="90" align="right">
151   - <template slot-scope="scope">
152   - {{ formatQty(scope.row['数量']) }}
  165 + <el-table-column type="expand" width="48">
  166 + <template slot-scope="catScope">
  167 + <div v-loading="brandLoading[categoryRowKey(catScope.row)]" class="nested-wrap">
  168 + <el-table
  169 + :data="brandMap[categoryRowKey(catScope.row)] || []"
  170 + border
  171 + size="small"
  172 + class="nested-table"
  173 + :row-key="r => brandRowKey(catScope.row, r)"
  174 + @expand-change="(r, er) => onBrandExpand(catScope.row, r, er)"
  175 + >
  176 + <el-table-column type="expand" width="44">
  177 + <template slot-scope="brandScope">
  178 + <div v-loading="productLoading[brandRowKey(catScope.row, brandScope.row)]" class="nested-wrap">
  179 + <el-table
  180 + :data="productMap[brandRowKey(catScope.row, brandScope.row)] || []"
  181 + border
  182 + size="small"
  183 + class="nested-table nested-table--deep"
  184 + :row-key="r => productRowKey(catScope.row, brandScope.row, r)"
  185 + @expand-change="(r, er) => onProductExpand(catScope.row, brandScope.row, r, er)"
  186 + >
  187 + <el-table-column type="expand" width="42">
  188 + <template slot-scope="prodScope">
  189 + <div v-loading="lineLoading[lineKey(catScope.row, brandScope.row, prodScope.row)]" class="nested-wrap detail-wrap">
  190 + <el-table
  191 + :data="(lineMap[lineKey(catScope.row, brandScope.row, prodScope.row)] || {}).list || []"
  192 + border
  193 + size="mini"
  194 + class="nested-table"
  195 + >
  196 + <el-table-column type="index" label="行号" width="52" align="center" />
  197 + <el-table-column prop="单据日期" label="单据日期" width="108" show-overflow-tooltip sortable :sort-method="sortTextCol('单据日期')" />
  198 + <el-table-column prop="单据编号" label="单据编号" min-width="140" show-overflow-tooltip sortable :sort-method="sortTextCol('单据编号')" />
  199 + <el-table-column prop="单据类型" label="单据类型" width="108" show-overflow-tooltip sortable :sort-method="sortTextCol('单据类型')" />
  200 + <el-table-column prop="往来单位" label="往来单位" min-width="120" show-overflow-tooltip sortable :sort-method="sortTextCol('往来单位')" />
  201 + <el-table-column prop="经手人" label="经手人" width="88" show-overflow-tooltip sortable :sort-method="sortTextCol('经手人')" />
  202 + <el-table-column prop="仓库名称" label="仓库名称" min-width="100" show-overflow-tooltip sortable :sort-method="sortTextCol('仓库名称')" />
  203 + <el-table-column prop="商品名称" label="商品名称" min-width="140" show-overflow-tooltip sortable :sort-method="sortTextCol('商品名称')" />
  204 + <el-table-column prop="数量" label="数量" width="88" align="right" sortable :sort-method="sortNumCol('数量')">
  205 + <template slot-scope="s">{{ formatQty(s.row['数量']) }}</template>
  206 + </el-table-column>
  207 + <el-table-column prop="入库单价" label="入库单价" width="100" align="right" sortable :sort-method="sortNumCol('入库单价')">
  208 + <template slot-scope="s">{{ formatMoney(s.row['入库单价']) }}</template>
  209 + </el-table-column>
  210 + <el-table-column prop="采购金额" label="采购金额" width="108" align="right" sortable :sort-method="sortNumCol('采购金额')">
  211 + <template slot-scope="s">{{ formatMoney(s.row['采购金额']) }}</template>
  212 + </el-table-column>
  213 + </el-table>
  214 + <div v-if="linePager[lineKey(catScope.row, brandScope.row, prodScope.row)]" class="mini-pager">
  215 + <el-pagination
  216 + small
  217 + layout="prev, pager, next, total"
  218 + :total="linePager[lineKey(catScope.row, brandScope.row, prodScope.row)].total"
  219 + :page-size="linePager[lineKey(catScope.row, brandScope.row, prodScope.row)].pageSize"
  220 + :current-page="linePager[lineKey(catScope.row, brandScope.row, prodScope.row)].currentPage"
  221 + @current-change="p => fetchLines(catScope.row, brandScope.row, prodScope.row, p)"
  222 + />
  223 + </div>
  224 + </div>
  225 + </template>
  226 + </el-table-column>
  227 + <el-table-column label="商品编号" min-width="100" show-overflow-tooltip sortable :sort-method="sortTextCol('商品编号')">
  228 + <template slot-scope="s">
  229 + <i class="el-icon-postcard row-ico row-ico--primary" />
  230 + {{ cellText(s.row['商品编号']) }}
  231 + </template>
  232 + </el-table-column>
  233 + <el-table-column label="明细分类" min-width="120" show-overflow-tooltip sortable :sort-method="sortTextCol('明细分类')">
  234 + <template slot-scope="s">
  235 + <i class="el-icon-collection-tag row-ico row-ico--info" />
  236 + {{ cellText(s.row['明细分类']) }}
  237 + </template>
  238 + </el-table-column>
  239 + <el-table-column label="商品名称" min-width="140" show-overflow-tooltip sortable :sort-method="sortTextCol('商品名称')">
  240 + <template slot-scope="s">
  241 + <i class="el-icon-goods row-ico row-ico--muted" />
  242 + {{ cellText(s.row['商品名称']) }}
  243 + </template>
  244 + </el-table-column>
  245 + <el-table-column label="数量" width="88" align="right" sortable :sort-method="sortNumCol('数量')">
  246 + <template slot-scope="s">{{ formatQty(s.row['数量']) }}</template>
  247 + </el-table-column>
  248 + <el-table-column label="入库单价" width="100" align="right" sortable :sort-method="sortNumCol('入库单价')">
  249 + <template slot-scope="s">{{ formatMoney(s.row['入库单价']) }}</template>
  250 + </el-table-column>
  251 + <el-table-column label="采购金额" width="108" align="right" sortable :sort-method="sortNumCol('采购金额')">
  252 + <template slot-scope="s">{{ formatMoney(s.row['采购金额']) }}</template>
  253 + </el-table-column>
  254 + </el-table>
  255 + </div>
  256 + </template>
  257 + </el-table-column>
  258 + <el-table-column label="品牌" min-width="140" show-overflow-tooltip sortable :sort-method="sortTextCol('品牌名称')">
  259 + <template slot-scope="s">
  260 + <i class="el-icon-medal row-ico row-ico--primary" />
  261 + {{ cellText(s.row['品牌名称'] || s.row['商品名称']) }}
  262 + </template>
  263 + </el-table-column>
  264 + <el-table-column label="数量" width="88" align="right" sortable :sort-method="sortNumCol('数量')">
  265 + <template slot-scope="s">{{ formatQty(s.row['数量']) }}</template>
  266 + </el-table-column>
  267 + <el-table-column label="入库单价" width="100" align="right" sortable :sort-method="sortNumCol('入库单价')">
  268 + <template slot-scope="s">{{ formatMoney(s.row['入库单价']) }}</template>
  269 + </el-table-column>
  270 + <el-table-column label="采购金额" width="108" align="right" sortable :sort-method="sortNumCol('采购金额')">
  271 + <template slot-scope="s">{{ formatMoney(s.row['采购金额']) }}</template>
  272 + </el-table-column>
  273 + </el-table>
  274 + <div v-if="!(brandMap[categoryRowKey(catScope.row)] || []).length && !brandLoading[categoryRowKey(catScope.row)]" class="nested-empty">暂无品牌数据</div>
  275 + </div>
153 276 </template>
154 277 </el-table-column>
155   - <el-table-column prop="入库单价" label="入库单价" width="110" align="right">
  278 + <el-table-column type="index" label="行号" width="56" align="center" />
  279 + <el-table-column label="分类名称" min-width="160" show-overflow-tooltip sortable :sort-method="sortTextCol('分类名称')">
156 280 <template slot-scope="scope">
157   - {{ formatMoney(scope.row['入库单价']) }}
  281 + <i class="el-icon-folder-opened row-ico row-ico--primary" />
  282 + {{ cellText(scope.row['分类名称']) }}
158 283 </template>
159 284 </el-table-column>
160   - <el-table-column prop="采购金额" label="采购金额" width="120" align="right">
  285 + <el-table-column label="数量" width="96" align="right" sortable :sort-method="sortNumCol('数量')">
  286 + <template slot-scope="scope">{{ formatQty(scope.row['数量']) }}</template>
  287 + </el-table-column>
  288 + <el-table-column label="入库单价" width="104" align="right" sortable :sort-method="sortNumCol('入库单价')">
  289 + <template slot-scope="scope">{{ formatMoney(scope.row['入库单价']) }}</template>
  290 + </el-table-column>
  291 + <el-table-column label="采购金额" width="112" align="right" sortable :sort-method="sortNumCol('采购金额')">
  292 + <template slot-scope="scope">{{ formatMoney(scope.row['采购金额']) }}</template>
  293 + </el-table-column>
  294 + <el-table-column label="操作" width="120" align="left" fixed="right">
161 295 <template slot-scope="scope">
162   - {{ formatMoney(scope.row['采购金额']) }}
  296 + <el-button type="text" size="mini" icon="el-icon-tickets" @click.stop="openLinearDialog(scope.row)">线性列表</el-button>
163 297 </template>
164 298 </el-table-column>
165 299 </el-table>
166   - <div class="pager-wrap">
167   - <el-pagination
168   - :current-page="pagination.currentPage"
169   - :page-sizes="[50, 100, 200, 500]"
170   - :page-size="pagination.pageSize"
171   - layout="total, sizes, prev, pager, next, jumper"
172   - :total="pagination.total"
173   - @size-change="handleSizeChange"
174   - @current-change="handleCurrentChange"
175   - />
  300 +
  301 + <div v-if="categoryList.length" class="purchase-sum-footer">
  302 + <i class="el-icon-s-data row-ico--primary" />
  303 + <span>合计(当前分类列表)</span>
  304 + <span class="sum-item">数量:{{ formatQty(sumCategoryQty) }}</span>
  305 + <span class="sum-item">采购金额:{{ formatMoney(sumCategoryAmt) }}</span>
176 306 </div>
177 307 </div>
178 308 </div>
  309 +
  310 + <el-dialog
  311 + title="线性列表 — 分类下全部采购明细"
  312 + :visible.sync="linearVisible"
  313 + width="1180px"
  314 + top="5vh"
  315 + append-to-body
  316 + class="NCC-dialog NCC-dialog_center"
  317 + @close="linearRows = []"
  318 + >
  319 + <div v-loading="linearLoading" class="linear-dialog-body">
  320 + <p class="linear-hint">{{ linearHint }}</p>
  321 + <el-table :data="linearRows" border size="small" max-height="520" class="linear-table">
  322 + <el-table-column type="index" label="行号" width="52" />
  323 + <el-table-column prop="单据日期" label="单据日期" width="100" show-overflow-tooltip sortable :sort-method="sortTextCol('单据日期')" />
  324 + <el-table-column prop="单据编号" label="单据编号" min-width="130" show-overflow-tooltip sortable :sort-method="sortTextCol('单据编号')" />
  325 + <el-table-column prop="单据类型" label="单据类型" width="100" show-overflow-tooltip />
  326 + <el-table-column prop="往来单位" label="往来单位" min-width="110" show-overflow-tooltip />
  327 + <el-table-column prop="经手人" label="经手人" width="80" show-overflow-tooltip />
  328 + <el-table-column prop="仓库名称" label="仓库名称" min-width="96" show-overflow-tooltip />
  329 + <el-table-column prop="商品名称" label="商品名称" min-width="120" show-overflow-tooltip />
  330 + <el-table-column prop="数量" label="数量" width="80" align="right" sortable :sort-method="sortNumCol('数量')">
  331 + <template slot-scope="s">{{ formatQty(s.row['数量']) }}</template>
  332 + </el-table-column>
  333 + <el-table-column prop="入库单价" label="入库单价" width="92" align="right">
  334 + <template slot-scope="s">{{ formatMoney(s.row['入库单价']) }}</template>
  335 + </el-table-column>
  336 + <el-table-column prop="采购金额" label="采购金额" width="100" align="right" sortable :sort-method="sortNumCol('采购金额')">
  337 + <template slot-scope="s">{{ formatMoney(s.row['采购金额']) }}</template>
  338 + </el-table-column>
  339 + </el-table>
  340 + </div>
  341 + </el-dialog>
179 342 </div>
180 343 </template>
181 344  
... ... @@ -183,37 +346,84 @@
183 346 import request from '@/utils/request'
184 347 import { previewDataInterface } from '@/api/systemData/dataInterface'
185 348  
  349 +const DEFAULT_BILL_TYPES = ['采购入库单', '采购退货单']
  350 +
186 351 export default {
187 352 name: 'PurchaseSummary',
188   -
189 353 data() {
190 354 return {
191   - list: [],
192   - billTypeOptions: ['采购入库单', '采购退货单'],
  355 + categoryList: [],
  356 + categoryLoading: false,
  357 + brandMap: {},
  358 + brandLoading: {},
  359 + productMap: {},
  360 + productLoading: {},
  361 + lineMap: {},
  362 + linePager: {},
  363 + lineLoading: {},
  364 + billTypeOptions: [...DEFAULT_BILL_TYPES],
193 365 filters: {
194 366 dateRange: [],
195 367 contactUnit: [],
196 368 agent: [],
197   - productName: '',
  369 + productSpId: '',
198 370 warehouse: [],
199   - billType: ['采购入库单', '采购退货单']
  371 + billType: [...DEFAULT_BILL_TYPES]
200 372 },
201 373 contactUnitOptions: [],
202 374 agentOptions: [],
203 375 warehouseOptions: [],
204 376 productOptions: [],
205 377 productLoading: false,
206   - pagination: {
207   - currentPage: 1,
208   - pageSize: 100,
209   - total: 0
210   - }
  378 + linearVisible: false,
  379 + linearLoading: false,
  380 + linearRows: [],
  381 + linearHint: ''
211 382 }
212 383 },
213   -
  384 + computed: {
  385 + sumCategoryQty() {
  386 + return this.categoryList.reduce((s, r) => s + this.parseNum(r['数量']), 0)
  387 + },
  388 + sumCategoryAmt() {
  389 + return this.categoryList.reduce((s, r) => s + this.parseNum(r['采购金额']), 0)
  390 + }
  391 + },
  392 + created() {
  393 + this.loadFilterOptions()
  394 + this.fetchCategories()
  395 + },
214 396 methods: {
215   - indexMethod(index) {
216   - return (this.pagination.currentPage - 1) * this.pagination.pageSize + index + 1
  397 + categoryRowKey(row) {
  398 + return String(row['分类Id'] != null ? row['分类Id'] : '')
  399 + },
  400 + brandRowKey(catRow, brandRow) {
  401 + return `${this.categoryRowKey(catRow)}|${String(brandRow['品牌Id'] != null ? brandRow['品牌Id'] : '')}`
  402 + },
  403 + productRowKey(catRow, brandRow, prodRow) {
  404 + return `${this.brandRowKey(catRow, brandRow)}|${String(prodRow['商品Id'] != null ? prodRow['商品Id'] : '')}`
  405 + },
  406 + lineKey(catRow, brandRow, prodRow) {
  407 + return this.productRowKey(catRow, brandRow, prodRow)
  408 + },
  409 + parseNum(val) {
  410 + if (val == null || val === '') return 0
  411 + const n = Number(String(val).replace(/,/g, '').trim())
  412 + return Number.isFinite(n) ? n : 0
  413 + },
  414 + sortNumCol(prop) {
  415 + return (a, b) => this.parseNum(a[prop]) - this.parseNum(b[prop])
  416 + },
  417 + sortTextCol(prop) {
  418 + return (a, b) => {
  419 + const sa = String(a[prop] != null ? a[prop] : '').trim()
  420 + const sb = String(b[prop] != null ? b[prop] : '').trim()
  421 + return sa.localeCompare(sb, 'zh-CN')
  422 + }
  423 + },
  424 + cellText(v) {
  425 + if (v == null || String(v).trim() === '') return '无'
  426 + return String(v)
217 427 },
218 428 formatQty(val) {
219 429 if (val === null || val === undefined || val === '') return '无'
... ... @@ -227,6 +437,62 @@ export default {
227 437 if (Number.isNaN(n)) return String(val)
228 438 return n.toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 4 })
229 439 },
  440 + /** 商品编码(空则返回空串,便于单行展示) */
  441 + productCodeRaw(item) {
  442 + if (!item) return ''
  443 + const c =
  444 + item.F_Spbm ||
  445 + item.spbm ||
  446 + item.Spbm ||
  447 + item.商品编号 ||
  448 + item.code ||
  449 + ''
  450 + const t = c != null && String(c).trim() !== '' ? String(c).trim() : ''
  451 + return t
  452 + },
  453 + /** 商品名称 */
  454 + productNameRaw(item) {
  455 + if (!item) return ''
  456 + const n =
  457 + item.F_Spmc ||
  458 + item.spmc ||
  459 + item.Spmc ||
  460 + item.productName ||
  461 + item.商品名称 ||
  462 + item.name ||
  463 + ''
  464 + const t = n != null && String(n).trim() !== '' ? String(n).trim() : ''
  465 + return t
  466 + },
  467 + /** 选中后在输入框内显示的完整文案(编码 + 名称) */
  468 + formatProductLabel(item) {
  469 + if (!item) return ''
  470 + const code = this.productCodeRaw(item)
  471 + const name = this.productNameRaw(item)
  472 + if (code && name) return `${code} | ${name}`
  473 + if (name) return name
  474 + if (code) return code
  475 + const id = item.F_Id || item.id
  476 + return id ? String(id) : '无'
  477 + },
  478 + buildBasePayload() {
  479 + const payload = {}
  480 + if (this.filters.dateRange && this.filters.dateRange.length === 2) {
  481 + payload.startDate = this.filters.dateRange[0]
  482 + payload.endDate = this.filters.dateRange[1]
  483 + }
  484 + if (this.filters.contactUnit.length) payload.contactUnit = this.filters.contactUnit.join(',')
  485 + if (this.filters.agent.length) payload.agent = this.filters.agent.join(',')
  486 + if (this.filters.warehouse.length) payload.warehouse = this.filters.warehouse.join(',')
  487 + if (this.filters.productSpId) payload.productSpId = this.filters.productSpId
  488 + const bt = this.filters.billType || []
  489 + if (bt.length > 0 && bt.length < this.billTypeOptions.length) {
  490 + payload.billType = bt.join(',')
  491 + } else {
  492 + payload.billType = ''
  493 + }
  494 + return payload
  495 + },
230 496 async loadFilterOptions() {
231 497 try {
232 498 const companyRes = await request({
... ... @@ -255,9 +521,12 @@ export default {
255 521  
256 522 const userRes = await previewDataInterface('675937572047815941')
257 523 const userList = userRes.data || []
258   - this.agentOptions = Array.from(
259   - new Set(userList.map(x => x.realName || x.F_RealName || x.fullName).filter(Boolean))
260   - )
  524 + this.agentOptions = (userList || [])
  525 + .map(x => ({
  526 + label: x.realName || x.F_RealName || x.fullName || x.name || x.F_Account || x.account || '',
  527 + value: x.id || x.F_Id || x.userId
  528 + }))
  529 + .filter(x => x.value && x.label)
261 530 } catch (e) {
262 531 console.error('采购汇总筛选下拉加载失败', e)
263 532 }
... ... @@ -270,7 +539,7 @@ export default {
270 539 this.productLoading = true
271 540 try {
272 541 const res = await request({
273   - url: '/api/Extend/WtSp',
  542 + url: '/api/Extend/WtSp/GetListByKeyword',
274 543 method: 'GET',
275 544 data: { pageSize: 200, currentPage: 1, keyword: query }
276 545 })
... ... @@ -281,138 +550,320 @@ export default {
281 550 this.productLoading = false
282 551 }
283 552 },
284   - formatProductLabel(item) {
285   - if (!item) return ''
286   - const code = item.spbm || item.productCode || item.商品编号 || item.code || item.F_Id || item.id || ''
287   - const name = item.F_Spmc || item.productName || item.商品名称 || item.name || ''
288   - return [code, name].filter(Boolean).join(' ')
  553 + clearTreeCaches() {
  554 + this.brandMap = {}
  555 + this.brandLoading = {}
  556 + this.productMap = {}
  557 + this.productLoading = {}
  558 + this.lineMap = {}
  559 + this.linePager = {}
  560 + this.lineLoading = {}
289 561 },
290   - buildQueryPayload() {
291   - const payload = {}
292   - if (this.filters.dateRange && this.filters.dateRange.length === 2) {
293   - payload.startDate = this.filters.dateRange[0]
294   - payload.endDate = this.filters.dateRange[1]
  562 + fetchCategories() {
  563 + this.categoryLoading = true
  564 + this.clearTreeCaches()
  565 + request({
  566 + url: '/api/Extend/WtXsckd/Actions/GetPurchaseSummaryByCategory',
  567 + method: 'GET',
  568 + data: this.buildBasePayload()
  569 + })
  570 + .then(res => {
  571 + const rows = Array.isArray(res.data) ? res.data : (res.data && res.data.list) || []
  572 + this.categoryList = rows
  573 + })
  574 + .catch(() => {
  575 + this.categoryList = []
  576 + })
  577 + .finally(() => {
  578 + this.categoryLoading = false
  579 + })
  580 + },
  581 + onCategoryExpand(row, expandedRows) {
  582 + const id = String(row['分类Id'])
  583 + if (expandedRows.some(r => String(r['分类Id']) === id)) {
  584 + this.loadBrands(row)
295 585 }
296   - if (this.filters.productName) payload.product = this.filters.productName
297   - if (this.filters.contactUnit.length) payload.contactUnit = this.filters.contactUnit.join(',')
298   - if (this.filters.agent.length) payload.agent = this.filters.agent.join(',')
299   - if (this.filters.warehouse.length) payload.warehouse = this.filters.warehouse.join(',')
300   -
301   - if (this.filters.billType.length > 0 && this.filters.billType.length < this.billTypeOptions.length) {
302   - payload.billType = this.filters.billType.join(',')
303   - } else {
304   - payload.billType = ''
  586 + },
  587 + loadBrands(catRow) {
  588 + const k = this.categoryRowKey(catRow)
  589 + if (this.brandMap[k] !== undefined || this.brandLoading[k]) return
  590 + this.$set(this.brandLoading, k, true)
  591 + const cid = String(catRow['分类Id'] != null ? catRow['分类Id'] : '')
  592 + request({
  593 + url: '/api/Extend/WtXsckd/Actions/GetPurchaseSummaryByBrand',
  594 + method: 'GET',
  595 + data: { ...this.buildBasePayload(), categoryId: cid }
  596 + })
  597 + .then(res => {
  598 + const rows = Array.isArray(res.data) ? res.data : (res.data && res.data.list) || []
  599 + this.$set(this.brandMap, k, rows)
  600 + })
  601 + .catch(() => {
  602 + this.$set(this.brandMap, k, [])
  603 + })
  604 + .finally(() => {
  605 + this.$set(this.brandLoading, k, false)
  606 + })
  607 + },
  608 + onBrandExpand(catRow, brandRow, expandedRows) {
  609 + if (expandedRows.some(r => this.brandRowKey(catRow, r) === this.brandRowKey(catRow, brandRow))) {
  610 + this.loadProducts(catRow, brandRow)
305 611 }
306   - payload.currentPage = this.pagination.currentPage
307   - payload.pageSize = this.pagination.pageSize
308   - return payload
309 612 },
310   - handleSearch() {
311   - this.pagination.currentPage = 1
312   - this.fetchData()
  613 + loadProducts(catRow, brandRow) {
  614 + const k = this.brandRowKey(catRow, brandRow)
  615 + if (this.productMap[k] !== undefined || this.productLoading[k]) return
  616 + this.$set(this.productLoading, k, true)
  617 + const cid = String(catRow['分类Id'] != null ? catRow['分类Id'] : '')
  618 + const bid = String(brandRow['品牌Id'] != null ? brandRow['品牌Id'] : '')
  619 + request({
  620 + url: '/api/Extend/WtXsckd/Actions/GetPurchaseSummaryByProductAgg',
  621 + method: 'GET',
  622 + data: { ...this.buildBasePayload(), categoryId: cid, brandId: bid }
  623 + })
  624 + .then(res => {
  625 + const rows = Array.isArray(res.data) ? res.data : (res.data && res.data.list) || []
  626 + this.$set(this.productMap, k, rows)
  627 + })
  628 + .catch(() => {
  629 + this.$set(this.productMap, k, [])
  630 + })
  631 + .finally(() => {
  632 + this.$set(this.productLoading, k, false)
  633 + })
313 634 },
314   - fetchData() {
315   - const payload = this.buildQueryPayload()
  635 + onProductExpand(catRow, brandRow, prodRow, expandedRows) {
  636 + if (expandedRows.some(r => this.productRowKey(catRow, brandRow, r) === this.productRowKey(catRow, brandRow, prodRow))) {
  637 + this.initLinePager(catRow, brandRow, prodRow)
  638 + this.fetchLines(catRow, brandRow, prodRow, 1)
  639 + }
  640 + },
  641 + initLinePager(catRow, brandRow, prodRow) {
  642 + const lk = this.lineKey(catRow, brandRow, prodRow)
  643 + if (!this.linePager[lk]) {
  644 + this.$set(this.linePager, lk, { currentPage: 1, pageSize: 50, total: 0 })
  645 + }
  646 + },
  647 + fetchLines(catRow, brandRow, prodRow, page) {
  648 + const lk = this.lineKey(catRow, brandRow, prodRow)
  649 + this.initLinePager(catRow, brandRow, prodRow)
  650 + const pager = this.linePager[lk]
  651 + pager.currentPage = page || 1
  652 + this.$set(this.lineLoading, lk, true)
  653 + const cid = String(catRow['分类Id'] != null ? catRow['分类Id'] : '')
  654 + const bid = String(brandRow['品牌Id'] != null ? brandRow['品牌Id'] : '')
  655 + const pid = String(prodRow['商品Id'] != null ? prodRow['商品Id'] : '')
316 656 request({
317   - url: `/api/Extend/WtXsckd/Actions/GetPurchaseSummary`,
  657 + url: '/api/Extend/WtXsckd/Actions/GetPurchaseSummary',
318 658 method: 'GET',
319   - data: payload
320   - }).then(res => {
321   - const body = res.data
322   - if (body && typeof body === 'object' && !Array.isArray(body) && body.list !== undefined) {
323   - this.list = body.list || []
324   - this.pagination.total = body.total != null ? Number(body.total) : 0
325   - } else if (Array.isArray(body)) {
326   - this.list = body
327   - this.pagination.total = body.length
328   - } else {
329   - this.list = []
330   - this.pagination.total = 0
  659 + data: {
  660 + ...this.buildBasePayload(),
  661 + categoryId: cid,
  662 + brandId: bid,
  663 + productSpId: pid,
  664 + currentPage: pager.currentPage,
  665 + pageSize: pager.pageSize
331 666 }
332 667 })
  668 + .then(res => {
  669 + const body = res.data
  670 + let list = []
  671 + let total = 0
  672 + if (body && typeof body === 'object' && !Array.isArray(body) && body.list !== undefined) {
  673 + list = body.list || []
  674 + total = body.total != null ? Number(body.total) : 0
  675 + } else if (Array.isArray(body)) {
  676 + list = body
  677 + total = body.length
  678 + }
  679 + this.$set(this.lineMap, lk, { list })
  680 + this.$set(this.linePager[lk], 'total', total)
  681 + })
  682 + .catch(() => {
  683 + this.$set(this.lineMap, lk, { list: [] })
  684 + })
  685 + .finally(() => {
  686 + this.$set(this.lineLoading, lk, false)
  687 + })
333 688 },
334   - handleSizeChange(size) {
335   - this.pagination.pageSize = size
336   - this.pagination.currentPage = 1
337   - this.fetchData()
  689 + openLinearDialog(catRow) {
  690 + const cid = String(catRow['分类Id'] != null ? catRow['分类Id'] : '')
  691 + const cname = this.cellText(catRow['分类名称'])
  692 + this.linearHint = `分类:${cname}(最多展示 2000 条,与当前筛选条件一致)`
  693 + this.linearVisible = true
  694 + this.linearLoading = true
  695 + this.linearRows = []
  696 + request({
  697 + url: '/api/Extend/WtXsckd/Actions/GetPurchaseSummaryLinear',
  698 + method: 'GET',
  699 + data: { ...this.buildBasePayload(), categoryId: cid }
  700 + })
  701 + .then(res => {
  702 + this.linearRows = Array.isArray(res.data) ? res.data : (res.data && res.data.list) || []
  703 + })
  704 + .catch(() => {
  705 + this.linearRows = []
  706 + })
  707 + .finally(() => {
  708 + this.linearLoading = false
  709 + })
338 710 },
339   - handleCurrentChange(page) {
340   - this.pagination.currentPage = page
341   - this.fetchData()
  711 + handleSearch() {
  712 + this.fetchCategories()
342 713 },
343 714 handleReset() {
344 715 this.filters = {
345 716 dateRange: [],
346 717 contactUnit: [],
347 718 agent: [],
348   - productName: '',
  719 + productSpId: '',
349 720 warehouse: [],
350   - billType: [...this.billTypeOptions]
  721 + billType: [...DEFAULT_BILL_TYPES]
351 722 }
352   - this.pagination.currentPage = 1
353   - this.fetchData()
  723 + this.productOptions = []
  724 + this.fetchCategories()
354 725 }
355   - },
356   - created() {
357   - this.loadFilterOptions()
358   - this.fetchData()
359 726 }
360 727 }
361 728 </script>
362 729  
363   -<style scoped>
364   -.purchase-summary-page {
365   - width: 100%;
366   - min-height: 100%;
367   - background: #f9f9f9;
368   - padding: 10px 20px;
369   - box-sizing: border-box;
  730 +<style lang="scss" scoped>
  731 +.purchase-sum-head {
  732 + align-items: center;
  733 + margin-bottom: 8px;
  734 +}
  735 +
  736 +.purchase-sum-head__title {
  737 + font-size: 15px;
  738 + font-weight: 600;
  739 + color: #303133;
  740 + display: inline-flex;
  741 + align-items: center;
  742 + gap: 8px;
370 743 }
371 744  
372   -.form-section {
373   - background: #fff;
374   - border-radius: 6px;
375   - padding: 10px 10px 0 10px;
376   - margin-bottom: 10px;
  745 +.purchase-sum-head__icon {
  746 + color: #409eff;
  747 + font-size: 18px;
  748 +}
  749 +
  750 +.purchase-tree-table {
  751 + ::v-deep .el-table .cell {
  752 + white-space: nowrap;
  753 + }
  754 +}
  755 +
  756 +.nested-wrap {
  757 + padding: 8px 8px 8px 24px;
  758 + background: #fafbfc;
377 759 }
378 760  
379   -.table-section {
380   - background: #fff;
381   - border-radius: 6px;
382   - padding: 12px 12px 10px 12px;
383   - margin: 0;
  761 +.nested-table {
384 762 width: 100%;
385   - box-sizing: border-box;
386 763 }
387 764  
388   -.action-row {
389   - display: flex;
390   - justify-content: flex-start;
391   - gap: 8px;
392   - padding: 4px 0 10px;
  765 +.nested-table--deep ::v-deep .el-table__body-wrapper {
  766 + max-height: 320px;
  767 + overflow-y: auto;
393 768 }
394 769  
395   -.table-title-bar {
396   - font-size: 18px;
397   - font-weight: bold;
398   - margin-bottom: 10px;
  770 +.detail-wrap {
  771 + min-width: 720px;
  772 +}
  773 +
  774 +.mini-pager {
  775 + margin-top: 8px;
  776 + text-align: left;
  777 +}
  778 +
  779 +.nested-empty {
  780 + padding: 12px;
  781 + color: #909399;
  782 + font-size: 13px;
  783 +}
  784 +
  785 +.row-ico {
  786 + margin-right: 4px;
  787 +}
  788 +
  789 +.row-ico--primary {
  790 + color: #409eff;
  791 +}
  792 +
  793 +.row-ico--info {
  794 + color: #909399;
  795 +}
  796 +
  797 +.row-ico--muted {
  798 + color: #c0c4cc;
  799 +}
  800 +
  801 +.purchase-sum-footer {
  802 + margin-top: 12px;
  803 + padding: 10px 12px;
  804 + background: #f5f7fa;
  805 + border-radius: 8px;
  806 + font-size: 13px;
  807 + color: #606266;
399 808 display: flex;
  809 + flex-wrap: wrap;
400 810 align-items: center;
401   - gap: 12px;
  811 + gap: 16px;
402 812 }
403 813  
404   -.table-scroll {
405   - max-height: calc(100vh - 300px);
406   - overflow-y: auto;
  814 +.sum-item {
  815 + font-weight: 600;
  816 + color: #303133;
407 817 }
408 818  
409   -.pager-wrap {
410   - display: flex;
411   - justify-content: flex-start;
412   - padding: 12px 0 4px;
  819 +.linear-dialog-body {
  820 + min-height: 120px;
413 821 }
414 822  
415   -.purchase-record-table ::v-deep .cell {
  823 +.linear-hint {
  824 + font-size: 12px;
  825 + color: #909399;
  826 + margin: 0 0 10px;
  827 +}
  828 +
  829 +.linear-table ::v-deep .el-table .cell {
416 830 white-space: nowrap;
417 831 }
  832 +
  833 +/* 商品远程下拉:单行「编码 | 名称」,避免多行标签错位 */
  834 +.product-opt-row {
  835 + display: flex;
  836 + align-items: center;
  837 + max-width: 100%;
  838 + font-size: 13px;
  839 + line-height: 1.4;
  840 +}
  841 +
  842 +.product-opt-code {
  843 + flex-shrink: 0;
  844 + color: #606266;
  845 + font-weight: 600;
  846 +}
  847 +
  848 +.product-opt-sep {
  849 + flex-shrink: 0;
  850 + margin: 0 6px;
  851 + color: #dcdfe6;
  852 +}
  853 +
  854 +.product-opt-name {
  855 + flex: 1;
  856 + min-width: 0;
  857 + overflow: hidden;
  858 + text-overflow: ellipsis;
  859 + color: #303133;
  860 +}
  861 +</style>
  862 +
  863 +<!-- 下拉挂到 body,需非 scoped 才能命中 popper -->
  864 +<style lang="scss">
  865 +.wt-purchase-sum-product-dropdown.el-select-dropdown {
  866 + min-width: 420px !important;
  867 + max-width: min(720px, 92vw);
  868 +}
418 869 </style>
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtSfk/Form.vue
... ... @@ -91,8 +91,8 @@
91 91 </template>
92 92 <script>
93 93 import request from '@/utils/request'
94   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
95 94 import { previewDataInterface } from '@/api/systemData/dataInterface'
  95 + import { getAccountSelector } from '@/api/extend/wtAccount'
96 96 export default {
97 97 components: {},
98 98 props: [],
... ... @@ -138,7 +138,7 @@
138 138 });
139 139 },
140 140 getjszhOptions(){
141   - getDictionaryDataSelector('681761709836207365').then(res => {
  141 + getAccountSelector().then(res => {
142 142 this.jszhOptions = res.data.list
143 143 });
144 144 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtSfk/index.vue
... ... @@ -127,10 +127,10 @@
127 127 </template>
128 128 <script>
129 129 import request from '@/utils/request'
130   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
131 130 import NCCForm from './Form'
132 131 import ExportBox from './ExportBox'
133 132 import { previewDataInterface } from '@/api/systemData/dataInterface'
  133 + import { getAccountSelector } from '@/api/extend/wtAccount'
134 134 export default {
135 135 components: { NCCForm, ExportBox },
136 136 data() {
... ... @@ -190,7 +190,7 @@
190 190 });
191 191 },
192 192 getjszhOptions(){
193   - getDictionaryDataSelector('681761709836207365').then(res => {
  193 + getAccountSelector().then(res => {
194 194 this.jszhOptions = res.data.list
195 195 });
196 196 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtSkzhb/Form.vue
... ... @@ -32,8 +32,8 @@
32 32 </template>
33 33 <script>
34 34 import request from '@/utils/request'
35   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
36 35 import { previewDataInterface } from '@/api/systemData/dataInterface'
  36 + import { getAccountSelector } from '@/api/extend/wtAccount'
37 37 export default {
38 38 components: {},
39 39 props: [],
... ... @@ -65,7 +65,7 @@
65 65 methods: {
66 66 // ✅ 获取账户名称选项(从数据字典)
67 67 getzhmcOptions(){
68   - getDictionaryDataSelector('681761709836207365').then(res => {
  68 + getAccountSelector().then(res => {
69 69 this.zhmcOptions = res.data.list || [];
70 70 }).catch(() => {
71 71 this.zhmcOptions = [];
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtSkzhb/account-form.vue 0 → 100644
  1 +<template>
  2 + <el-dialog :title="!dataForm.id ? '新建账户' : '编辑账户'" :close-on-click-modal="false" :visible.sync="visible" class="NCC-dialog NCC-dialog_center" lock-scroll width="600px">
  3 + <el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" :rules="rules">
  4 + <el-row :gutter="15">
  5 + <el-col :span="24">
  6 + <el-form-item label="账户名称" prop="accountName">
  7 + <el-input v-model="dataForm.accountName" placeholder="请输入账户名称" clearable />
  8 + </el-form-item>
  9 + </el-col>
  10 + <el-col :span="24">
  11 + <el-form-item label="业务编码" prop="accountCode">
  12 + <el-input v-model="dataForm.accountCode" placeholder="留空自动生成" clearable />
  13 + </el-form-item>
  14 + </el-col>
  15 + <el-col :span="24" v-if="!dataForm.id && !dataForm.accountCode">
  16 + <el-form-item label="编码规则" prop="codeRule">
  17 + <el-radio-group v-model="dataForm.codeRule">
  18 + <el-radio :label="1">数字序号</el-radio>
  19 + <el-radio :label="2">拼音缩写</el-radio>
  20 + </el-radio-group>
  21 + </el-form-item>
  22 + </el-col>
  23 + <el-col :span="24">
  24 + <el-form-item label="账户分类" prop="category">
  25 + <el-select v-model="dataForm.category" placeholder="请选择或输入分类" clearable filterable allow-create default-first-option style="width:100%">
  26 + <el-option v-for="item in categoryOptions" :key="item" :label="item" :value="item" />
  27 + </el-select>
  28 + </el-form-item>
  29 + </el-col>
  30 + <el-col :span="24">
  31 + <el-form-item label="排序码" prop="sortCode">
  32 + <el-input-number v-model="dataForm.sortCode" :min="0" :step="1" controls-position="right" style="width:100%" />
  33 + </el-form-item>
  34 + </el-col>
  35 + <el-col :span="24" v-if="dataForm.id">
  36 + <el-form-item label="状态" prop="status">
  37 + <el-radio-group v-model="dataForm.status">
  38 + <el-radio :label="1">启用</el-radio>
  39 + <el-radio :label="0">禁用</el-radio>
  40 + </el-radio-group>
  41 + </el-form-item>
  42 + </el-col>
  43 + </el-row>
  44 + </el-form>
  45 + <span slot="footer" class="dialog-footer">
  46 + <el-button @click="visible = false">取 消</el-button>
  47 + <el-button type="primary" :loading="btnLoading" @click="dataFormSubmit()">确 定</el-button>
  48 + </span>
  49 + </el-dialog>
  50 +</template>
  51 +<script>
  52 +import { getAccountInfo, createAccount, updateAccount, getAccountCategories } from '@/api/extend/wtAccount'
  53 +export default {
  54 + data() {
  55 + return {
  56 + visible: false,
  57 + btnLoading: false,
  58 + categoryOptions: [],
  59 + dataForm: {
  60 + id: '',
  61 + accountName: '',
  62 + accountCode: '',
  63 + codeRule: 1,
  64 + category: '',
  65 + sortCode: 0,
  66 + status: 1
  67 + },
  68 + rules: {
  69 + accountName: [{ required: true, message: '请输入账户名称', trigger: 'blur' }]
  70 + }
  71 + }
  72 + },
  73 + methods: {
  74 + init(id) {
  75 + this.dataForm.id = id || ''
  76 + this.visible = true
  77 + this.loadCategories()
  78 + this.$nextTick(function () {
  79 + this.$refs['elForm'].resetFields()
  80 + if (this.dataForm.id) {
  81 + getAccountInfo(this.dataForm.id).then(function (res) {
  82 + this.dataForm = res.data
  83 + }.bind(this))
  84 + } else {
  85 + this.dataForm.codeRule = 1
  86 + this.dataForm.sortCode = 0
  87 + this.dataForm.status = 1
  88 + }
  89 + })
  90 + },
  91 + loadCategories() {
  92 + getAccountCategories().then(function (res) {
  93 + this.categoryOptions = res.data || []
  94 + }.bind(this)).catch(function () {
  95 + this.categoryOptions = []
  96 + }.bind(this))
  97 + },
  98 + dataFormSubmit() {
  99 + this.$refs['elForm'].validate(function (valid) {
  100 + if (!valid) return
  101 + this.btnLoading = true
  102 + var body = {
  103 + accountName: this.dataForm.accountName,
  104 + accountCode: this.dataForm.accountCode,
  105 + category: this.dataForm.category,
  106 + sortCode: this.dataForm.sortCode
  107 + }
  108 + var promise
  109 + if (!this.dataForm.id) {
  110 + body.codeRule = this.dataForm.codeRule
  111 + promise = createAccount(body)
  112 + } else {
  113 + body.status = this.dataForm.status
  114 + promise = updateAccount(this.dataForm.id, body)
  115 + }
  116 + promise.then(function (res) {
  117 + this.btnLoading = false
  118 + this.$message({
  119 + message: res.msg,
  120 + type: 'success',
  121 + duration: 1000,
  122 + onClose: function () {
  123 + this.visible = false
  124 + this.$emit('refresh', true)
  125 + }.bind(this)
  126 + })
  127 + }.bind(this)).catch(function () {
  128 + this.btnLoading = false
  129 + }.bind(this))
  130 + }.bind(this))
  131 + }
  132 + }
  133 +}
  134 +</script>
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtSkzhb/index.vue
1 1 <template>
2 2 <div class="NCC-common-layout">
3 3 <div class="NCC-common-layout-center">
4   - <el-row class="NCC-common-search-box" :gutter="16">
5   - <el-form @submit.native.prevent>
6   - <el-col :span="6">
7   - <el-form-item label="账户编号">
8   - <el-input v-model="query.id" placeholder="账户编号" clearable />
9   - </el-form-item>
10   - </el-col>
11   - <el-col :span="6">
12   - <el-form-item label="账户名称">
13   - <el-select v-model="query.zhmc" placeholder="请选择账户名称" clearable :style='{"width":"100%"}' >
14   - <el-option v-for="(item, index) in zhmcOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>
15   - </el-select>
16   - </el-form-item>
17   - </el-col>
18   - <el-col :span="6">
19   - <el-form-item label="所属门店">
20   - <el-select v-model="query.ssmd" placeholder="请选择门店" clearable :style='{"width":"100%"}' >
21   - <el-option v-for="(item, index) in ssmdOptions" :key="index" :label="item.F_Mdmc" :value="item.F_Id" ></el-option>
22   - </el-select>
23   - </el-form-item>
24   - </el-col>
25   - <el-col :span="6">
26   - <el-form-item>
27   - <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button>
28   - <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button>
29   - </el-form-item>
30   - </el-col>
31   - </el-form>
32   - </el-row>
33   - <div class="NCC-common-layout-main NCC-flex-main">
34   - <div class="NCC-common-head">
35   - <div>
36   - <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button>
37   - <el-button type="text" icon="el-icon-download" @click="exportData()">导出</el-button>
38   - <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">批量删除</el-button>
  4 + <el-tabs v-model="activeTab" @tab-click="handleTabClick">
  5 + <el-tab-pane label="账户管理" name="account">
  6 + <!-- Tab1 搜索区 -->
  7 + <el-row class="NCC-common-search-box" :gutter="16">
  8 + <el-form @submit.native.prevent>
  9 + <el-col :span="6">
  10 + <el-form-item label="关键字">
  11 + <el-input v-model="accountQuery.keyword" placeholder="编码/名称模糊搜索" clearable />
  12 + </el-form-item>
  13 + </el-col>
  14 + <el-col :span="6">
  15 + <el-form-item label="账户分类">
  16 + <el-select v-model="accountQuery.category" placeholder="请选择分类" clearable style="width:100%">
  17 + <el-option v-for="item in categoryOptions" :key="item" :label="item" :value="item" />
  18 + </el-select>
  19 + </el-form-item>
  20 + </el-col>
  21 + <el-col :span="6">
  22 + <el-form-item label="状态">
  23 + <el-select v-model="accountQuery.status" placeholder="全部" clearable style="width:100%">
  24 + <el-option label="启用" :value="1" />
  25 + <el-option label="禁用" :value="0" />
  26 + </el-select>
  27 + </el-form-item>
  28 + </el-col>
  29 + <el-col :span="6">
  30 + <el-form-item>
  31 + <el-button type="primary" icon="el-icon-search" @click="accountSearch()">查询</el-button>
  32 + <el-button icon="el-icon-refresh-right" @click="accountReset()">重置</el-button>
  33 + </el-form-item>
  34 + </el-col>
  35 + </el-form>
  36 + </el-row>
  37 + <!-- Tab1 操作区 + 列表 -->
  38 + <div class="NCC-common-layout-main NCC-flex-main">
  39 + <div class="NCC-common-head">
  40 + <div>
  41 + <el-button type="primary" icon="el-icon-plus" @click="openAccountForm()">新增</el-button>
  42 + </div>
  43 + <div class="NCC-common-head-right">
  44 + <el-tooltip effect="dark" content="刷新" placement="top">
  45 + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" @click="accountReset()" />
  46 + </el-tooltip>
  47 + <screenfull isContainer />
  48 + </div>
  49 + </div>
  50 + <NCC-table v-loading="accountLoading" :data="accountList">
  51 + <el-table-column prop="accountCode" label="业务编码" align="left" sortable />
  52 + <el-table-column prop="accountName" label="账户名称" align="left" sortable />
  53 + <el-table-column prop="category" label="账户分类" align="left">
  54 + <template slot-scope="scope">
  55 + {{ scope.row.category || '无' }}
  56 + </template>
  57 + </el-table-column>
  58 + <el-table-column prop="status" label="状态" align="left" width="100">
  59 + <template slot-scope="scope">
  60 + <el-tag v-if="scope.row.status === 1" type="success" size="mini">启用</el-tag>
  61 + <el-tag v-else type="info" size="mini">禁用</el-tag>
  62 + </template>
  63 + </el-table-column>
  64 + <el-table-column prop="sortCode" label="排序码" align="left" width="100" sortable />
  65 + <el-table-column label="操作" fixed="right" width="120">
  66 + <template slot-scope="scope">
  67 + <el-button type="text" @click="openAccountForm(scope.row.id)">编辑</el-button>
  68 + <el-button type="text" class="NCC-table-delBtn" @click="accountDel(scope.row.id)">删除</el-button>
  69 + </template>
  70 + </el-table-column>
  71 + </NCC-table>
  72 + <pagination :total="accountTotal" :page.sync="accountListQuery.currentPage" :limit.sync="accountListQuery.pageSize" @pagination="loadAccountList" />
39 73 </div>
40   - <div class="NCC-common-head-right">
41   - <el-tooltip effect="dark" content="刷新" placement="top">
42   - <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" @click="reset()" />
43   - </el-tooltip>
44   - <screenfull isContainer />
  74 + </el-tab-pane>
  75 +
  76 + <el-tab-pane label="门店账户授权" name="store">
  77 + <!-- Tab2 搜索区(原有) -->
  78 + <el-row class="NCC-common-search-box" :gutter="16">
  79 + <el-form @submit.native.prevent>
  80 + <el-col :span="6">
  81 + <el-form-item label="账户编号">
  82 + <el-input v-model="query.id" placeholder="账户编号" clearable />
  83 + </el-form-item>
  84 + </el-col>
  85 + <el-col :span="6">
  86 + <el-form-item label="账户名称">
  87 + <el-select v-model="query.zhmc" placeholder="请选择账户名称" clearable style="width:100%">
  88 + <el-option v-for="(item, index) in zhmcOptions" :key="index" :label="item.fullName" :value="item.id" />
  89 + </el-select>
  90 + </el-form-item>
  91 + </el-col>
  92 + <el-col :span="6">
  93 + <el-form-item label="所属门店">
  94 + <el-select v-model="query.ssmd" placeholder="请选择门店" clearable style="width:100%">
  95 + <el-option v-for="(item, index) in ssmdOptions" :key="index" :label="item.F_Mdmc" :value="item.F_Id" />
  96 + </el-select>
  97 + </el-form-item>
  98 + </el-col>
  99 + <el-col :span="6">
  100 + <el-form-item>
  101 + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button>
  102 + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button>
  103 + </el-form-item>
  104 + </el-col>
  105 + </el-form>
  106 + </el-row>
  107 + <!-- Tab2 操作区 + 列表(原有) -->
  108 + <div class="NCC-common-layout-main NCC-flex-main">
  109 + <div class="NCC-common-head">
  110 + <div>
  111 + <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button>
  112 + <el-button type="text" icon="el-icon-download" @click="exportData()">导出</el-button>
  113 + <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">批量删除</el-button>
  114 + </div>
  115 + <div class="NCC-common-head-right">
  116 + <el-tooltip effect="dark" content="刷新" placement="top">
  117 + <el-link icon="icon-ym icon-ym-Refresh NCC-common-head-icon" :underline="false" @click="reset()" />
  118 + </el-tooltip>
  119 + <screenfull isContainer />
  120 + </div>
  121 + </div>
  122 + <NCC-table v-loading="listLoading" :data="list" has-c @selection-change="handleSelectionChange">
  123 + <el-table-column prop="id" label="账户编号" align="left" />
  124 + <el-table-column prop="zhmc" label="账户名称" align="left" />
  125 + <el-table-column prop="ssmd" label="所属门店" align="left" />
  126 + <el-table-column label="操作" fixed="right" width="100">
  127 + <template slot-scope="scope">
  128 + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)">编辑</el-button>
  129 + <el-button type="text" class="NCC-table-delBtn" @click="handleDel(scope.row.id)">删除</el-button>
  130 + </template>
  131 + </el-table-column>
  132 + </NCC-table>
  133 + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" />
45 134 </div>
46   - </div>
47   - <NCC-table v-loading="listLoading" :data="list" has-c @selection-change="handleSelectionChange">
48   - <el-table-column prop="id" label="账户编号" align="left" />
49   - <el-table-column prop="zhmc" label="账户名称" align="left" />
50   - <el-table-column prop="ssmd" label="所属门店" align="left" />
51   - <el-table-column label="操作" fixed="right" width="100">
52   - <template slot-scope="scope">
53   - <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >编辑</el-button>
54   - <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button>
55   - </template>
56   - </el-table-column>
57   - </NCC-table>
58   - <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" />
59   - </div>
60   - </div>
  135 + </el-tab-pane>
  136 + </el-tabs>
  137 + </div>
  138 + <!-- Tab1 弹窗 -->
  139 + <AccountForm v-if="accountFormVisible" ref="AccountForm" @refresh="accountRefresh" />
  140 + <!-- Tab2 弹窗 -->
61 141 <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" />
  142 + <!-- Tab2 导出 -->
62 143 <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
63 144 </div>
64 145 </template>
65 146 <script>
66   - import request from '@/utils/request'
67   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
68   - import NCCForm from './Form'
69   - import ExportBox from './ExportBox'
70   - import { previewDataInterface } from '@/api/systemData/dataInterface'
71   - export default {
72   - components: { NCCForm, ExportBox },
73   - data() {
74   - return {
75   - showAll: false,
76   - query: {
77   - id:undefined,
78   - zhmc:undefined,
79   - ssmd:undefined,
80   - },
81   - list: [],
82   - listLoading: true,
83   - multipleSelection: [], total: 0,
84   - listQuery: {
85   - currentPage: 1,
86   - pageSize: 20,
87   - sort: "desc",
88   - sidx: "",
89   - },
90   - formVisible: false,
91   - exportBoxVisible: false,
92   - columnList: [
93   - { prop: 'id', label: '账户编号' },
94   - { prop: 'zhmc', label: '账户名称' },
95   - { prop: 'ssmd', label: '所属门店' },
96   - ],
97   - zhmcOptions: [], // ✅ 账户名称选项(从数据字典获取)
98   - ssmdOptions: [], // ✅ 门店选项(从门店记录获取)
99   - }
100   - },
101   - computed: {},
102   - created() {
103   - this.initData();
104   - this.getzhmcOptions();
105   - this.getssmdOptions();
106   - },
107   - methods: {
108   - // ✅ 获取账户名称选项(从数据字典)
109   - getzhmcOptions(){
110   - getDictionaryDataSelector('681761709836207365').then(res => {
111   - this.zhmcOptions = res.data.list || [];
112   - }).catch(() => {
113   - this.zhmcOptions = [];
114   - });
  147 +import request from '@/utils/request'
  148 +import NCCForm from './Form'
  149 +import AccountForm from './account-form'
  150 +import ExportBox from './ExportBox'
  151 +import { previewDataInterface } from '@/api/systemData/dataInterface'
  152 +import {
  153 + getAccountSelector,
  154 + getAccountList,
  155 + deleteAccount,
  156 + getAccountCategories
  157 +} from '@/api/extend/wtAccount'
  158 +export default {
  159 + components: { NCCForm, AccountForm, ExportBox },
  160 + data() {
  161 + return {
  162 + activeTab: 'account',
  163 + // ---- Tab1:账户管理 ----
  164 + accountQuery: {
  165 + keyword: undefined,
  166 + category: undefined,
  167 + status: undefined
  168 + },
  169 + accountList: [],
  170 + accountLoading: false,
  171 + accountTotal: 0,
  172 + accountListQuery: {
  173 + currentPage: 1,
  174 + pageSize: 20,
  175 + sort: 'desc',
  176 + sidx: ''
115 177 },
116   - // ✅ 获取门店选项(从门店记录)
117   - getssmdOptions(){
118   - previewDataInterface('672484412352365829').then(res => {
119   - this.ssmdOptions = res.data || [];
120   - }).catch(() => {
121   - this.ssmdOptions = [];
122   - });
  178 + accountFormVisible: false,
  179 + categoryOptions: [],
  180 + // ---- Tab2:门店账户授权(原有) ----
  181 + showAll: false,
  182 + query: {
  183 + id: undefined,
  184 + zhmc: undefined,
  185 + ssmd: undefined
123 186 },
124   - initData() {
125   - this.listLoading = true;
126   - let _query = {
127   - ...this.listQuery,
128   - ...this.query
129   - };
130   - let query = {}
131   - for (let key in _query) {
132   - if (Array.isArray(_query[key])) {
133   - query[key] = _query[key].join()
134   - } else {
135   - query[key] = _query[key]
136   - }
137   - }
138   - request({
139   - url: `/api/Extend/WtSkzhb`,
140   - method: 'GET',
141   - data: query
142   - }).then(res => {
143   - this.list = res.data.list
144   - this.total = res.data.pagination.total
145   - this.listLoading = false
146   - })
147   - },
148   - handleDel(id) {
149   - this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
150   - type: 'warning'
151   - }).then(() => {
152   - request({
153   - url: `/api/Extend/WtSkzhb/${id}`,
154   - method: 'DELETE'
155   - }).then(res => {
156   - this.$message({
157   - type: 'success',
158   - message: res.msg,
159   - onClose: () => {
160   - this.initData()
161   - }
162   - });
163   - })
164   - }).catch(() => {
165   - });
166   - },
167   - handleSelectionChange(val) {
168   - const res = val.map(item => item.id)
169   - this.multipleSelection = res
170   - },
171   - handleBatchRemoveDel() {
172   - if (!this.multipleSelection.length) {
173   - this.$message({
174   - type: 'error',
175   - message: '请选择一条数据',
176   - duration: 1500,
177   - })
178   - return
179   - }
180   - const ids = this.multipleSelection
181   - this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
182   - type: 'warning'
183   - }).then(() => {
184   - request({
185   - url: `/api/Extend/WtSkzhb/batchRemove`,
186   - method: 'POST',
187   - data: ids ,
188   - }).then(res => {
189   - this.$message({
190   - type: 'success',
191   - message: res.msg,
192   - onClose: () => {
193   - this.initData()
194   - }
195   - });
196   - })
197   - }).catch(() => { })
198   - },
199   - addOrUpdateHandle(id, isDetail) {
200   - this.formVisible = true
201   - this.$nextTick(() => {
202   - this.$refs.NCCForm.init(id, isDetail)
203   - })
204   - },
205   - exportData() {
206   - this.exportBoxVisible = true
207   - this.$nextTick(() => {
208   - this.$refs.ExportBox.init(this.columnList)
209   - })
210   - },
211   - download(data) {
212   - let query = { ...data, ...this.listQuery, ...this.query }
213   - request({
214   - url: `/api/Extend/WtSkzhb/Actions/Export`,
215   - method: 'GET',
216   - data: query
217   - }).then(res => {
218   - if (!res.data.url) return
219   - window.location.href = this.define.comUrl + res.data.url
220   - this.$refs.ExportBox.visible = false
221   - this.exportBoxVisible = false
222   - })
223   - },
224   - search() {
225   - this.listQuery = {
226   - currentPage: 1,
227   - pageSize: 20,
228   - sort: "desc",
229   - sidx: "",
230   - }
231   - this.initData()
232   - },
233   - refresh(isrRefresh) {
234   - this.formVisible = false
235   - if (isrRefresh) this.reset()
236   - },
237   - reset() {
238   - for (let key in this.query) {
239   - this.query[key] = undefined
240   - }
241   - this.listQuery = {
242   - currentPage: 1,
243   - pageSize: 20,
244   - sort: "desc",
245   - sidx: "",
246   - }
247   - this.initData()
248   - }
  187 + list: [],
  188 + listLoading: true,
  189 + multipleSelection: [],
  190 + total: 0,
  191 + listQuery: {
  192 + currentPage: 1,
  193 + pageSize: 20,
  194 + sort: 'desc',
  195 + sidx: ''
  196 + },
  197 + formVisible: false,
  198 + exportBoxVisible: false,
  199 + columnList: [
  200 + { prop: 'id', label: '账户编号' },
  201 + { prop: 'zhmc', label: '账户名称' },
  202 + { prop: 'ssmd', label: '所属门店' }
  203 + ],
  204 + zhmcOptions: [],
  205 + ssmdOptions: []
  206 + }
  207 + },
  208 + created() {
  209 + this.loadAccountList()
  210 + this.loadCategories()
  211 + },
  212 + methods: {
  213 + handleTabClick(tab) {
  214 + if (tab.name === 'store' && this.list.length === 0) {
  215 + this.initData()
  216 + this.getzhmcOptions()
  217 + this.getssmdOptions()
  218 + }
  219 + },
  220 + // ========== Tab1:账户管理 ==========
  221 + loadAccountList() {
  222 + this.accountLoading = true
  223 + var params = {}
  224 + Object.assign(params, this.accountListQuery)
  225 + if (this.accountQuery.keyword) params.keyword = this.accountQuery.keyword
  226 + if (this.accountQuery.category) params.category = this.accountQuery.category
  227 + if (this.accountQuery.status !== undefined && this.accountQuery.status !== null) {
  228 + params.status = this.accountQuery.status
  229 + }
  230 + getAccountList(params).then(function (res) {
  231 + this.accountList = res.data.list || []
  232 + this.accountTotal = (res.data.pagination && res.data.pagination.total) || 0
  233 + this.accountLoading = false
  234 + }.bind(this)).catch(function () {
  235 + this.accountLoading = false
  236 + }.bind(this))
  237 + },
  238 + loadCategories() {
  239 + getAccountCategories().then(function (res) {
  240 + this.categoryOptions = res.data || []
  241 + }.bind(this)).catch(function () {
  242 + this.categoryOptions = []
  243 + }.bind(this))
  244 + },
  245 + accountSearch() {
  246 + this.accountListQuery.currentPage = 1
  247 + this.loadAccountList()
  248 + },
  249 + accountReset() {
  250 + this.accountQuery = { keyword: undefined, category: undefined, status: undefined }
  251 + this.accountListQuery = { currentPage: 1, pageSize: 20, sort: 'desc', sidx: '' }
  252 + this.loadAccountList()
  253 + },
  254 + openAccountForm(id) {
  255 + this.accountFormVisible = true
  256 + this.$nextTick(function () {
  257 + this.$refs.AccountForm.init(id)
  258 + })
  259 + },
  260 + accountRefresh(isRefresh) {
  261 + this.accountFormVisible = false
  262 + if (isRefresh) {
  263 + this.accountReset()
  264 + this.loadCategories()
  265 + this.getzhmcOptions()
  266 + }
  267 + },
  268 + accountDel(id) {
  269 + this.$confirm('此操作将永久删除该账户, 是否继续?', '提示', { type: 'warning' }).then(function () {
  270 + deleteAccount(id).then(function (res) {
  271 + this.$message({ type: 'success', message: res.msg, onClose: function () { this.loadAccountList() }.bind(this) })
  272 + }.bind(this))
  273 + }.bind(this)).catch(function () {})
  274 + },
  275 + // ========== Tab2:门店账户授权(原有) ==========
  276 + getzhmcOptions() {
  277 + getAccountSelector().then(function (res) {
  278 + this.zhmcOptions = res.data.list || []
  279 + }.bind(this)).catch(function () {
  280 + this.zhmcOptions = []
  281 + }.bind(this))
  282 + },
  283 + getssmdOptions() {
  284 + previewDataInterface('672484412352365829').then(function (res) {
  285 + this.ssmdOptions = res.data || []
  286 + }.bind(this)).catch(function () {
  287 + this.ssmdOptions = []
  288 + }.bind(this))
  289 + },
  290 + initData() {
  291 + this.listLoading = true
  292 + var _query = {}
  293 + Object.assign(_query, this.listQuery, this.query)
  294 + var queryParams = {}
  295 + for (var key in _query) {
  296 + if (Array.isArray(_query[key])) {
  297 + queryParams[key] = _query[key].join()
  298 + } else {
  299 + queryParams[key] = _query[key]
  300 + }
  301 + }
  302 + request({
  303 + url: '/api/Extend/WtSkzhb',
  304 + method: 'GET',
  305 + data: queryParams
  306 + }).then(function (res) {
  307 + this.list = res.data.list
  308 + this.total = res.data.pagination.total
  309 + this.listLoading = false
  310 + }.bind(this))
  311 + },
  312 + handleDel(id) {
  313 + this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { type: 'warning' }).then(function () {
  314 + request({
  315 + url: '/api/Extend/WtSkzhb/' + id,
  316 + method: 'DELETE'
  317 + }).then(function (res) {
  318 + this.$message({ type: 'success', message: res.msg, onClose: function () { this.initData() }.bind(this) })
  319 + }.bind(this))
  320 + }.bind(this)).catch(function () {})
  321 + },
  322 + handleSelectionChange(val) {
  323 + this.multipleSelection = val.map(function (item) { return item.id })
  324 + },
  325 + handleBatchRemoveDel() {
  326 + if (!this.multipleSelection.length) {
  327 + this.$message({ type: 'error', message: '请选择一条数据', duration: 1500 })
  328 + return
  329 + }
  330 + this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', { type: 'warning' }).then(function () {
  331 + request({
  332 + url: '/api/Extend/WtSkzhb/batchRemove',
  333 + method: 'POST',
  334 + data: this.multipleSelection
  335 + }).then(function (res) {
  336 + this.$message({ type: 'success', message: res.msg, onClose: function () { this.initData() }.bind(this) })
  337 + }.bind(this))
  338 + }.bind(this)).catch(function () {})
  339 + },
  340 + addOrUpdateHandle(id, isDetail) {
  341 + this.formVisible = true
  342 + this.$nextTick(function () {
  343 + this.$refs.NCCForm.init(id, isDetail)
  344 + })
  345 + },
  346 + exportData() {
  347 + this.exportBoxVisible = true
  348 + this.$nextTick(function () {
  349 + this.$refs.ExportBox.init(this.columnList)
  350 + })
  351 + },
  352 + download(data) {
  353 + var downloadQuery = {}
  354 + Object.assign(downloadQuery, data, this.listQuery, this.query)
  355 + request({
  356 + url: '/api/Extend/WtSkzhb/Actions/Export',
  357 + method: 'GET',
  358 + data: downloadQuery
  359 + }).then(function (res) {
  360 + if (!res.data.url) return
  361 + window.location.href = this.define.comUrl + res.data.url
  362 + this.$refs.ExportBox.visible = false
  363 + this.exportBoxVisible = false
  364 + }.bind(this))
  365 + },
  366 + search() {
  367 + this.listQuery = { currentPage: 1, pageSize: 20, sort: 'desc', sidx: '' }
  368 + this.initData()
  369 + },
  370 + refresh(isRefresh) {
  371 + this.formVisible = false
  372 + if (isRefresh) this.reset()
  373 + },
  374 + reset() {
  375 + for (var key in this.query) {
  376 + this.query[key] = undefined
  377 + }
  378 + this.listQuery = { currentPage: 1, pageSize: 20, sort: 'desc', sidx: '' }
  379 + this.initData()
249 380 }
250   - }
251   -</script>
252 381 \ No newline at end of file
  382 + }
  383 +}
  384 +</script>
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtSwdd/Form.vue
... ... @@ -159,8 +159,8 @@
159 159 </template>
160 160 <script>
161 161 import request from '@/utils/request'
162   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
163 162 import { previewDataInterface } from '@/api/systemData/dataInterface'
  163 + import { getAccountSelector } from '@/api/extend/wtAccount'
164 164 export default {
165 165 components: {},
166 166 props: [],
... ... @@ -235,7 +235,7 @@
235 235 });
236 236 },
237 237 getskzhOptions(){
238   - getDictionaryDataSelector('681761709836207365').then(res => {
  238 + getAccountSelector().then(res => {
239 239 this.skzhOptions = res.data.list
240 240 });
241 241 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtSwdd/index.vue
... ... @@ -132,10 +132,10 @@
132 132 </template>
133 133 <script>
134 134 import request from '@/utils/request'
135   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
136 135 import NCCForm from './Form'
137 136 import ExportBox from './ExportBox'
138 137 import { previewDataInterface } from '@/api/systemData/dataInterface'
  138 + import { getAccountSelector } from '@/api/extend/wtAccount'
139 139 export default {
140 140 components: { NCCForm, ExportBox },
141 141 data() {
... ... @@ -205,7 +205,7 @@
205 205 });
206 206 },
207 207 getskzhOptions(){
208   - getDictionaryDataSelector('681761709836207365').then(res => {
  208 + getAccountSelector().then(res => {
209 209 this.skzhOptions = res.data.list
210 210 });
211 211 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtTjdbd/Form.vue
... ... @@ -251,10 +251,10 @@
251 251 </template>
252 252 <script>
253 253 import request from '@/utils/request'
254   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
255 254 import { previewDataInterface } from '@/api/systemData/dataInterface'
256 255 import BarcodeSelect from '../wtCgrkd/BarcodeSelect.vue'
257 256 import SerialNumberSelect from './SerialNumberSelect.vue'
  257 + import { getAccountSelector } from '@/api/extend/wtAccount'
258 258 export default {
259 259 components: { BarcodeSelect, SerialNumberSelect },
260 260 props: [],
... ... @@ -605,7 +605,7 @@
605 605 });
606 606 },
607 607 getskzhOptions(){
608   - getDictionaryDataSelector('681761709836207365').then(res => {
  608 + getAccountSelector().then(res => {
609 609 this.skzhOptions = res.data.list
610 610 });
611 611 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtTjdbd/index.vue
... ... @@ -177,12 +177,12 @@
177 177 </template>
178 178 <script>
179 179 import request from '@/utils/request'
180   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
181 180 import NCCForm from './Form'
182 181 import DetailView from './detail-view'
183 182 import ExportBox from './ExportBox'
184 183 import { previewDataInterface } from '@/api/systemData/dataInterface'
185 184 import { promptApprovalRemark, postApproveGeneric, postRejectGeneric } from '@/utils/wtRejectApproval'
  185 + import { getAccountSelector } from '@/api/extend/wtAccount'
186 186 export default {
187 187 components: { NCCForm, DetailView, ExportBox },
188 188 data() {
... ... @@ -333,7 +333,7 @@
333 333 });
334 334 },
335 335 getskzhOptions(){
336   - getDictionaryDataSelector('681761709836207365').then(res => {
  336 + getAccountSelector().then(res => {
337 337 this.skzhOptions = res.data.list
338 338 });
339 339 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtXlh/index.vue
... ... @@ -33,6 +33,7 @@
33 33 <el-col :span="6">
34 34 <el-form-item>
35 35 <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button>
  36 + <el-button type="success" plain icon="el-icon-sort" @click="openSerialTrace">序列号流水</el-button>
36 37 <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button>
37 38 <el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll">展开</el-button>
38 39 <el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>收起</el-button>
... ... @@ -43,9 +44,7 @@
43 44 <div class="NCC-common-layout-main NCC-flex-main">
44 45 <div class="NCC-common-head">
45 46 <div>
46   - <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增</el-button>
47 47 <el-button type="text" icon="el-icon-download" @click="exportData()">导出</el-button>
48   - <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">批量删除</el-button>
49 48 </div>
50 49 <div class="NCC-common-head-right">
51 50 <el-tooltip effect="dark" content="刷新" placement="top">
... ... @@ -54,7 +53,7 @@
54 53 <screenfull isContainer />
55 54 </div>
56 55 </div>
57   - <NCC-table v-loading="listLoading" :data="list" has-c @selection-change="handleSelectionChange">
  56 + <NCC-table v-loading="listLoading" :data="list">
58 57 <el-table-column prop="xlh" label="序列号" align="left" />
59 58 <el-table-column prop="spbh" label="商品编号" align="left" />
60 59 <el-table-column prop="spmc" label="商品名称" align="left" />
... ... @@ -65,29 +64,20 @@
65 64 <el-table-column prop="djlx" label="单据类型" align="left" />
66 65 <el-table-column prop="zt" label="状态" align="left" />
67 66 <el-table-column prop="djrq" label="单据日期" :formatter="ncc.tableDateFormat" align="left" />
68   -
69   - <el-table-column label="操作" fixed="right" width="100">
70   - <template slot-scope="scope">
71   - <el-button type="text" @click="addOrUpdateHandle(scope.row.id)" >编辑</el-button>
72   - <el-button type="text" @click="handleDel(scope.row.id)" class="NCC-table-delBtn" >删除</el-button>
73   - </template>
74   - </el-table-column>
75 67 </NCC-table>
76 68 <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData" />
77 69 </div>
78 70 </div>
79   - <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" />
80 71 <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
  72 + <serial-trace-dialog :visible.sync="traceVisible" :xlh="traceXlh" />
81 73 </div>
82 74 </template>
83 75 <script>
84 76 import request from '@/utils/request'
85   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
86   - import NCCForm from './Form'
87 77 import ExportBox from './ExportBox'
88   - import { previewDataInterface } from '@/api/systemData/dataInterface'
  78 + import SerialTraceDialog from './serial-trace-dialog.vue'
89 79 export default {
90   - components: { NCCForm, ExportBox },
  80 + components: { ExportBox, SerialTraceDialog },
91 81 data() {
92 82 return {
93 83 showAll: false,
... ... @@ -100,15 +90,16 @@
100 90 },
101 91 list: [],
102 92 listLoading: true,
103   - multipleSelection: [], total: 0,
  93 + total: 0,
104 94 listQuery: {
105 95 currentPage: 1,
106 96 pageSize: 20,
107 97 sort: "desc",
108 98 sidx: "",
109 99 },
110   - formVisible: false,
111 100 exportBoxVisible: false,
  101 + traceVisible: false,
  102 + traceXlh: '',
112 103 columnList: [
113 104 { prop: 'xlh', label: '序列号' },
114 105 { prop: 'spbh', label: '商品编号' },
... ... @@ -147,63 +138,6 @@
147 138 this.listLoading = false
148 139 })
149 140 },
150   - handleDel(id) {
151   - this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
152   - type: 'warning'
153   - }).then(() => {
154   - request({
155   - url: `/api/Extend/WtXlh/${id}`,
156   - method: 'DELETE'
157   - }).then(res => {
158   - this.$message({
159   - type: 'success',
160   - message: res.msg,
161   - onClose: () => {
162   - this.initData()
163   - }
164   - });
165   - })
166   - }).catch(() => {
167   - });
168   - },
169   - handleSelectionChange(val) {
170   - const res = val.map(item => item.id)
171   - this.multipleSelection = res
172   - },
173   - handleBatchRemoveDel() {
174   - if (!this.multipleSelection.length) {
175   - this.$message({
176   - type: 'error',
177   - message: '请选择一条数据',
178   - duration: 1500,
179   - })
180   - return
181   - }
182   - const ids = this.multipleSelection
183   - this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
184   - type: 'warning'
185   - }).then(() => {
186   - request({
187   - url: `/api/Extend/WtXlh/batchRemove`,
188   - method: 'POST',
189   - data: ids ,
190   - }).then(res => {
191   - this.$message({
192   - type: 'success',
193   - message: res.msg,
194   - onClose: () => {
195   - this.initData()
196   - }
197   - });
198   - })
199   - }).catch(() => { })
200   - },
201   - addOrUpdateHandle(id, isDetail) {
202   - this.formVisible = true
203   - this.$nextTick(() => {
204   - this.$refs.NCCForm.init(id, isDetail)
205   - })
206   - },
207 141 exportData() {
208 142 this.exportBoxVisible = true
209 143 this.$nextTick(() => {
... ... @@ -232,8 +166,16 @@
232 166 }
233 167 this.initData()
234 168 },
  169 + openSerialTrace() {
  170 + const x = (this.query.xlh != null ? String(this.query.xlh) : '').trim()
  171 + if (!x) {
  172 + this.$message.warning('请先在「序列号」中输入要查询的完整序列号')
  173 + return
  174 + }
  175 + this.traceXlh = x
  176 + this.traceVisible = true
  177 + },
235 178 refresh(isrRefresh) {
236   - this.formVisible = false
237 179 if (isrRefresh) this.reset()
238 180 },
239 181 reset() {
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtXlh/serial-trace-dialog.vue 0 → 100644
  1 +<template>
  2 + <el-dialog
  3 + title="序列号单据流水"
  4 + :visible.sync="innerVisible"
  5 + width="900px"
  6 + append-to-body
  7 + class="NCC-dialog NCC-dialog_center"
  8 + @close="onClose"
  9 + >
  10 + <div v-if="xlhKey" class="trace-tip">
  11 + 序列号:<strong>{{ xlhKey }}</strong>(按单据日期从早到晚排列,含出货与退货等)
  12 + </div>
  13 + <el-table
  14 + v-loading="loading"
  15 + :data="list"
  16 + size="small"
  17 + border
  18 + style="width: 100%; margin-top: 12px;"
  19 + >
  20 + <el-table-column prop="djrq" label="单据日期" width="168" :formatter="formatDjrq" show-overflow-tooltip />
  21 + <el-table-column prop="djlx" label="单据类型" width="140" show-overflow-tooltip />
  22 + <el-table-column prop="djbh" label="单据编号" min-width="140" show-overflow-tooltip />
  23 + <el-table-column prop="zt" label="状态" width="100" show-overflow-tooltip />
  24 + <el-table-column prop="spmc" label="商品名称" min-width="160" show-overflow-tooltip />
  25 + </el-table>
  26 + <el-pagination
  27 + v-if="total > pageSize"
  28 + style="margin-top: 12px;"
  29 + background
  30 + layout="total, prev, pager, next"
  31 + :total="total"
  32 + :page-size="pageSize"
  33 + :current-page.sync="page"
  34 + @current-change="loadData"
  35 + />
  36 + <span slot="footer" class="dialog-footer">
  37 + <el-button @click="innerVisible = false">关 闭</el-button>
  38 + </span>
  39 + </el-dialog>
  40 +</template>
  41 +
  42 +<script>
  43 +import request from '@/utils/request'
  44 +import ncc from '@/utils/ncc'
  45 +
  46 +export default {
  47 + name: 'SerialTraceDialog',
  48 + props: {
  49 + visible: {
  50 + type: Boolean,
  51 + default: false
  52 + },
  53 + xlh: {
  54 + type: String,
  55 + default: ''
  56 + }
  57 + },
  58 + data() {
  59 + return {
  60 + innerVisible: false,
  61 + list: [],
  62 + loading: false,
  63 + total: 0,
  64 + page: 1,
  65 + pageSize: 100,
  66 + xlhKey: ''
  67 + }
  68 + },
  69 + watch: {
  70 + visible(v) {
  71 + this.innerVisible = v
  72 + if (v) {
  73 + this.xlhKey = (this.xlh || '').trim()
  74 + this.page = 1
  75 + this.loadData()
  76 + }
  77 + },
  78 + innerVisible(v) {
  79 + if (!v) {
  80 + this.$emit('update:visible', false)
  81 + }
  82 + }
  83 + },
  84 + methods: {
  85 + formatDjrq(row, column, cellValue) {
  86 + return ncc.tableDateFormat(row, column, cellValue)
  87 + },
  88 + onClose() {
  89 + this.$emit('update:visible', false)
  90 + },
  91 + loadData() {
  92 + if (!this.xlhKey) {
  93 + this.list = []
  94 + this.total = 0
  95 + return
  96 + }
  97 + this.loading = true
  98 + request({
  99 + url: '/api/Extend/WtXlh/SerialTrace',
  100 + method: 'GET',
  101 + data: {
  102 + xlh: this.xlhKey,
  103 + currentPage: this.page,
  104 + pageSize: this.pageSize
  105 + }
  106 + })
  107 + .then(res => {
  108 + this.list = res.data.list || []
  109 + this.total = (res.data.pagination && res.data.pagination.total) || 0
  110 + })
  111 + .finally(() => {
  112 + this.loading = false
  113 + })
  114 + }
  115 + }
  116 +}
  117 +</script>
  118 +
  119 +<style scoped>
  120 +.trace-tip {
  121 + font-size: 13px;
  122 + color: #606266;
  123 +}
  124 +</style>
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtXndd/Form.vue
... ... @@ -159,8 +159,8 @@
159 159 </template>
160 160 <script>
161 161 import request from '@/utils/request'
162   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
163 162 import { previewDataInterface } from '@/api/systemData/dataInterface'
  163 + import { getAccountSelector } from '@/api/extend/wtAccount'
164 164 export default {
165 165 components: {},
166 166 props: [],
... ... @@ -235,7 +235,7 @@
235 235 });
236 236 },
237 237 getskzhOptions(){
238   - getDictionaryDataSelector('681761709836207365').then(res => {
  238 + getAccountSelector().then(res => {
239 239 this.skzhOptions = res.data.list
240 240 });
241 241 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtXndd/index.vue
... ... @@ -132,10 +132,10 @@
132 132 </template>
133 133 <script>
134 134 import request from '@/utils/request'
135   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
136 135 import NCCForm from './Form'
137 136 import ExportBox from './ExportBox'
138 137 import { previewDataInterface } from '@/api/systemData/dataInterface'
  138 + import { getAccountSelector } from '@/api/extend/wtAccount'
139 139 export default {
140 140 components: { NCCForm, ExportBox },
141 141 data() {
... ... @@ -205,7 +205,7 @@
205 205 });
206 206 },
207 207 getskzhOptions(){
208   - getDictionaryDataSelector('681761709836207365').then(res => {
  208 + getAccountSelector().then(res => {
209 209 this.skzhOptions = res.data.list
210 210 });
211 211 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtXsckd/Form.vue
... ... @@ -147,16 +147,6 @@
147 147 <el-input v-model="scope.row.je" placeholder="请输入" clearable readonly></el-input>
148 148 </template>
149 149 </el-table-column>
150   - <el-table-column prop="cbdj" label="成本单价" width="100" align="right">
151   - <template slot-scope="scope">
152   - <span class="cost-cell">{{ formatCostCell(scope.row.cbdj) }}</span>
153   - </template>
154   - </el-table-column>
155   - <el-table-column prop="cbje" label="成本金额" width="100" align="right">
156   - <template slot-scope="scope">
157   - <span class="cost-cell">{{ formatCostCell(scope.row.cbje) }}</span>
158   - </template>
159   - </el-table-column>
160 150 <el-table-column prop="description" label="备注">
161 151 <template slot-scope="scope">
162 152 <el-input v-model="scope.row.description" placeholder="请输入备注" clearable></el-input>
... ... @@ -220,19 +210,14 @@
220 210 </div>
221 211 </el-form-item>
222 212 </el-col>
223   - <el-col :span="8">
  213 + <el-col :span="12">
224 214 <el-form-item label="收款账户" prop="skzh">
225 215 <el-select v-model="dataForm.skzh" placeholder="请选择" clearable :style='{"width":"100%"}' filterable >
226 216 <el-option v-for="(item, index) in skzhOptions" :key="index" :label="item.fullName" :value="item.id" ></el-option>
227 217 </el-select>
228 218 </el-form-item>
229 219 </el-col>
230   - <el-col :span="8">
231   - <el-form-item label="出库成本合计">
232   - <el-input :value="displayOutboundCostTotalText" placeholder="按明细成本汇总" readonly :style='{"width":"100%"}' />
233   - </el-form-item>
234   - </el-col>
235   - <el-col :span="8">
  220 + <el-col :span="12">
236 221 <el-form-item label="收款金额" prop="skje">
237 222 <el-input v-model="dataForm.skje" placeholder="自动计算" clearable :style='{"width":"100%"}' readonly>
238 223 </el-input>
... ... @@ -299,10 +284,10 @@
299 284 </template>
300 285 <script>
301 286 import request from '@/utils/request'
302   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
303 287 import { previewDataInterface } from '@/api/systemData/dataInterface'
304 288 import BarcodeSelect from '../wtCgrkd/BarcodeSelect.vue'
305 289 import SerialNumberSelect from './SerialNumberSelect.vue'
  290 + import { getAccountSelector } from '@/api/extend/wtAccount'
306 291 export default {
307 292 components: { BarcodeSelect, SerialNumberSelect },
308 293 props: [],
... ... @@ -339,8 +324,6 @@
339 324 },
340 325 rules: {
341 326 },
342   - // 当前出库门店下各商品成本预览(下拉展示用,key=商品F_Id)
343   - productCostPreviewMap: {},
344 327 cjckOptions : [],
345 328 rkckOptions : [],
346 329 khOptions : [],
... ... @@ -364,19 +347,6 @@
364 347 totalJe() {
365 348 return (this.dataForm.wtXsckdMxList || []).reduce((sum, row) => sum + (parseFloat(row.je) || 0), 0)
366 349 },
367   - // 详情页优先用主表 cbje;新建/编辑按明细成本金额汇总
368   - displayOutboundCostTotal() {
369   - if (this.isDetail && this.dataForm.cbje != null && this.dataForm.cbje !== '') {
370   - const m = parseFloat(this.dataForm.cbje)
371   - if (!isNaN(m)) return m
372   - }
373   - return (this.dataForm.wtXsckdMxList || []).reduce((s, r) => s + (parseFloat(r.cbje) || 0), 0)
374   - },
375   - displayOutboundCostTotalText() {
376   - const v = this.displayOutboundCostTotal
377   - return (typeof v === 'number' && !isNaN(v)) ? v.toFixed(2) : '0.00'
378   - },
379   -
380 350 },
381 351 watch: {},
382 352 created() {
... ... @@ -643,7 +613,7 @@
643 613 });
644 614 },
645 615 getskzhOptions(){
646   - getDictionaryDataSelector('681761709836207365').then(res => {
  616 + getAccountSelector().then(res => {
647 617 this.skzhOptions = res.data.list
648 618 });
649 619 },
... ... @@ -723,7 +693,6 @@
723 693 _this.restoreSerialNumbers();
724 694 // 编辑时自动获取所有明细行的账面库存
725 695 _this.$nextTick(() => {
726   - _this.loadProductCostPreviewMap();
727 696 _this.dataForm.wtXsckdMxList.forEach(row => {
728 697 if (row.spbh && row.ckck) {
729 698 _this.getStockQuantity(row);
... ... @@ -745,7 +714,6 @@
745 714 if (res.data.mrwldw) _this.dataForm.kh = res.data.mrwldw
746 715 if (res.data.mrskzh) _this.dataForm.skzh = res.data.mrskzh
747 716 }
748   - _this.loadProductCostPreviewMap();
749 717 }).catch(() => {})
750 718 }
751 719 })
... ... @@ -1117,7 +1085,12 @@
1117 1085 if (!this.currentBarcodeRow.ckck && this.dataForm.cjck) {
1118 1086 this.currentBarcodeRow.ckck = this.dataForm.cjck
1119 1087 }
1120   - this.fetchRowCost(this.currentBarcodeRow)
  1088 + // 与下拉选商品一致:拉序列号类型、账面库存(销售单价仍手工录入)
  1089 + this.$nextTick(() => {
  1090 + if (this.currentBarcodeRow && this.currentBarcodeRow.spbh) {
  1091 + this.handleProductChange(this.currentBarcodeRow)
  1092 + }
  1093 + })
1121 1094 }
1122 1095 },
1123 1096  
... ... @@ -1154,7 +1127,6 @@
1154 1127 if (currentRow.dj) {
1155 1128 currentRow.je = (parseFloat(currentRow.sl) * parseFloat(currentRow.dj)).toFixed(2)
1156 1129 }
1157   - this.updateRowCostAmount(currentRow)
1158 1130 // 更新总收款金额
1159 1131 this.calculateTotalAmount();
1160 1132  
... ... @@ -1165,7 +1137,6 @@
1165 1137 const sl = parseFloat(row.sl) || 0;
1166 1138 const dj = parseFloat(row.dj) || 0;
1167 1139 row.je = (sl * dj).toFixed(2);
1168   - this.updateRowCostAmount(row)
1169 1140 // 自动计算总收款金额
1170 1141 this.calculateTotalAmount();
1171 1142 // 检查数量与序列号数量是否一致
... ... @@ -1187,12 +1158,10 @@
1187 1158 }
1188 1159 // 同步更新所有明细行的出库仓库
1189 1160 this.syncDetailWarehouses();
1190   - this.loadProductCostPreviewMap()
1191   - // 更新所有明细行的库存与成本预览
  1161 + // 更新所有明细行的账面库存
1192 1162 this.dataForm.wtXsckdMxList.forEach(row => {
1193 1163 if (row.spbh) {
1194 1164 this.getStockQuantity(row);
1195   - this.fetchRowCost(row);
1196 1165 }
1197 1166 });
1198 1167 },
... ... @@ -1561,12 +1530,12 @@
1561 1530 sums[index] = '合计';
1562 1531 return;
1563 1532 }
1564   - if (['kucun', 'sl', 'je', 'cbje'].includes(column.property)) {
  1533 + if (['kucun', 'sl', 'je'].includes(column.property)) {
1565 1534 const t = data.reduce((total, row) => {
1566 1535 const value = parseFloat(row[column.property]);
1567 1536 return total + (isNaN(value) ? 0 : value);
1568 1537 }, 0);
1569   - sums[index] = (column.property === 'cbje' || column.property === 'je') ? t.toFixed(2) : t;
  1538 + sums[index] = column.property === 'je' ? t.toFixed(2) : t;
1570 1539 } else {
1571 1540 sums[index] = '';
1572 1541 }
... ... @@ -1578,99 +1547,24 @@
1578 1547 const label = (option.label || '').toLowerCase();
1579 1548 return label.includes(query.toLowerCase());
1580 1549 },
1581   - // 成本/库存接口使用的门店或仓库ID
1582   - costContextCk() {
1583   - if (this.dataForm.cjckId != null && this.dataForm.cjckId !== '') {
1584   - return this.dataForm.cjckId
1585   - }
1586   - return this.dataForm.cjck
1587   - },
1588   - formatCostCell(val) {
1589   - if (val == null || val === '') return '无'
1590   - const n = parseFloat(val)
1591   - if (isNaN(n)) return '无'
1592   - return n.toFixed(2)
1593   - },
1594 1550 getSpOptionLabel(item) {
1595 1551 const base = ((item.spbm || '') + ' ' + (item.F_Spmc || '')).trim()
1596   - // const c = this.productCostPreviewMap[item.F_Id]
1597   - // if (c != null && c !== '' && !isNaN(parseFloat(c))) {
1598   - // return base + ' (成本¥' + parseFloat(c).toFixed(2) + ')'
1599   - // }
1600   - // if (!this.costContextCk()) {
1601   - // return base + ' (选仓库后显示成本)'
1602   - // }
1603 1552 return base
1604 1553 },
1605   - async loadProductCostPreviewMap() {
1606   - const ck = this.costContextCk()
1607   - if (!ck) {
1608   - this.productCostPreviewMap = {}
1609   - return
1610   - }
1611   - try {
1612   - const res = await request({
1613   - url: '/api/Extend/WtTjd/Actions/GetCostPreviewForStore',
1614   - method: 'get',
1615   - data: { ck }
1616   - })
1617   - let items = res.data
1618   - if (items && items.items) items = items.items
1619   - else if (res.items) items = res.items
1620   - const map = {}
1621   - ;(Array.isArray(items) ? items : []).forEach(x => {
1622   - if (x && x.spbh != null && map[x.spbh] == null) {
1623   - map[x.spbh] = parseFloat(x.cbj) || 0
1624   - }
1625   - })
1626   - this.productCostPreviewMap = map
1627   - } catch (e) {
1628   - console.warn('loadProductCostPreviewMap failed', e)
1629   - this.productCostPreviewMap = {}
1630   - }
1631   - },
1632   - async fetchRowCost(row) {
1633   - const ck = row.ckck || this.costContextCk()
1634   - if (!row.spbh || !ck) {
1635   - this.$set(row, 'cbdj', undefined)
1636   - this.$set(row, 'cbje', undefined)
1637   - return
1638   - }
1639   - try {
1640   - const res = await request({
1641   - url: '/api/Extend/WtTjd/Actions/GetCost',
1642   - method: 'get',
1643   - data: { spbh: row.spbh, ck }
1644   - })
1645   - let payload = res.data
1646   - if (payload && typeof payload.cbj === 'undefined' && res.data && res.data.data) {
1647   - payload = res.data.data
1648   - }
1649   - const cbj = parseFloat(payload && payload.cbj != null ? payload.cbj : 0) || 0
1650   - this.$set(row, 'cbdj', cbj)
1651   - this.updateRowCostAmount(row)
1652   - } catch (e) {
1653   - this.$set(row, 'cbdj', 0)
1654   - this.updateRowCostAmount(row)
1655   - }
1656   - },
1657   - updateRowCostAmount(row) {
1658   - const sl = parseFloat(row.sl) || 0
1659   - const cbdj = parseFloat(row.cbdj) || 0
1660   - this.$set(row, 'cbje', (cbdj * sl).toFixed(2))
1661   - },
1662 1554 handleProductChange(row) {
1663 1555 if (!row.spbh) {
1664 1556 this.$set(row, 'cbdj', undefined)
1665 1557 this.$set(row, 'cbje', undefined)
  1558 + this.$set(row, 'dj', undefined)
  1559 + this.$set(row, 'je', undefined)
  1560 + this.$set(row, 'spmc', '')
1666 1561 return
1667 1562 }
1668 1563 // 选中商品后可自动回填商品名称等信息
1669 1564 const product = this.spbhOptions.find(item => item.F_Id === row.spbh);
1670 1565 if (product) {
1671 1566 row.spmc = product.F_Spmc || '';
1672   - // ✅ 从商品主档回填单价(零售价)
1673   - row.dj = product.F_Lsj || 0;
  1567 + // 销售单价由用户手工录入,不从商品主档自动带出
1674 1568 // 选中商品后,立即加载商品信息(如序列号类型)
1675 1569 this.getProductInfo(row.spbh).then(productInfo => {
1676 1570 // 触发当前行的响应式刷新
... ... @@ -1697,11 +1591,9 @@
1697 1591 return;
1698 1592 }
1699 1593  
1700   - // 如果已选择出库仓库,自动获取库存与成本
  1594 + // 如果已选择出库仓库,自动获取账面库存
1701 1595 console.log('开始获取库存...');
1702   - this.getStockQuantity(row).finally(() => {
1703   - this.fetchRowCost(row)
1704   - });
  1596 + this.getStockQuantity(row)
1705 1597 }
1706 1598 },
1707 1599 handleProductQuery(val, scope) {
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtXsckd/detail-view.vue
... ... @@ -134,11 +134,6 @@
134 134 <span class="cell-nowrap mx-cell__money">{{ formatMoneyCol(scope.row.je) }}</span>
135 135 </template>
136 136 </el-table-column>
137   - <el-table-column prop="cbje" label="成本" width="96" align="right">
138   - <template slot-scope="scope">
139   - <span class="cell-nowrap">{{ formatMoneyCol(scope.row.cbje) }}</span>
140   - </template>
141   - </el-table-column>
142 137 <el-table-column label="序列号" min-width="168">
143 138 <template slot-scope="scope">
144 139 <div v-if="scope.row.selectedSerialNumbers && scope.row.selectedSerialNumbers.length" class="sn-tags">
... ... @@ -181,12 +176,6 @@
181 176 {{ displayDiscountAmount }}
182 177 </span>
183 178 </el-descriptions-item>
184   - <el-descriptions-item label="出库成本">
185   - <span class="cell-nowrap">
186   - <i class="el-icon-s-grid desc-icon desc-icon--info" />
187   - {{ formatMoneyCol(detail.cbje) }}
188   - </span>
189   - </el-descriptions-item>
190 179 <el-descriptions-item label="制单人">
191 180 <span class="cell-nowrap">
192 181 <i class="el-icon-edit-outline desc-icon desc-icon--muted" />
... ... @@ -310,9 +299,9 @@
310 299  
311 300 <script>
312 301 import request from '@/utils/request'
313   -import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
314 302 import { previewDataInterface } from '@/api/systemData/dataInterface'
315 303 import { dynamicText } from '@/filters'
  304 +import { getAccountSelector } from '@/api/extend/wtAccount'
316 305 import {
317 306 formatWtSkzhDisplay,
318 307 resolveSkzhDictionaryLabel,
... ... @@ -473,12 +462,23 @@ export default {
473 462 },
474 463 formatDjrq(ts) {
475 464 if (ts == null || ts === '') return '无'
476   - const d = new Date(typeof ts === 'number' ? ts : Number(ts))
  465 + const raw = typeof ts === 'string' ? ts.trim() : ts
  466 + if (raw === '') return '无'
  467 + let d
  468 + if (typeof raw === 'number') {
  469 + d = new Date(raw)
  470 + } else {
  471 + const n = Number(raw)
  472 + d = !isNaN(n) ? new Date(n) : new Date(String(raw).replace(/-/g, '/'))
  473 + }
477 474 if (isNaN(d.getTime())) return '无'
478 475 const y = d.getFullYear()
479 476 const m = String(d.getMonth() + 1).padStart(2, '0')
480 477 const day = String(d.getDate()).padStart(2, '0')
481   - return `${y}-${m}-${day}`
  478 + const h = String(d.getHours()).padStart(2, '0')
  479 + const mi = String(d.getMinutes()).padStart(2, '0')
  480 + const s = String(d.getSeconds()).padStart(2, '0')
  481 + return `${y}-${m}-${day} ${h}:${mi}:${s}`
482 482 },
483 483 getSummaries(param) {
484 484 const { columns, data } = param
... ... @@ -494,10 +494,6 @@ export default {
494 494 sums[index] = data
495 495 .reduce((t, row) => t + (parseFloat(row.je) || 0), 0)
496 496 .toFixed(2)
497   - } else if (column.property === 'cbje') {
498   - sums[index] = data
499   - .reduce((t, row) => t + (parseFloat(row.cbje) || 0), 0)
500   - .toFixed(2)
501 497 } else {
502 498 sums[index] = ''
503 499 }
... ... @@ -539,7 +535,7 @@ export default {
539 535 previewDataInterface('681758216954053893').then(res => {
540 536 this.cjckOptions = res.data || []
541 537 })
542   - getDictionaryDataSelector('681761709836207365').then(res => {
  538 + getAccountSelector().then(res => {
543 539 const d = res.data
544 540 this.skzhOptions =
545 541 d && Array.isArray(d.list) ? d.list : Array.isArray(d) ? d : []
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtXsckd/index.vue
... ... @@ -140,15 +140,9 @@
140 140 <el-table-column label="优惠金额" align="right" min-width="96" show-overflow-tooltip>
141 141 <template slot-scope="scope">{{ getDisplayDiscountAmount(scope.row) }}</template>
142 142 </el-table-column>
143   - <el-table-column label="出库成本" align="right" min-width="96" show-overflow-tooltip>
144   - <template slot-scope="scope">{{ getDisplayOutboundCost(scope.row) }}</template>
145   - </el-table-column>
146 143 <el-table-column label="收款账户" prop="skzh" align="left" min-width="120" show-overflow-tooltip>
147 144 <template slot-scope="scope">{{ displayText(formatSkzhRow(scope.row)) }}</template>
148 145 </el-table-column>
149   - <el-table-column prop="zdr" label="制单人" align="left" min-width="88" show-overflow-tooltip>
150   - <template slot-scope="scope">{{ displayText(scope.row.zdr) }}</template>
151   - </el-table-column>
152 146 <el-table-column prop="shr" label="审核人" align="left" min-width="88" show-overflow-tooltip>
153 147 <template slot-scope="scope">{{ displayText(scope.row.shr) }}</template>
154 148 </el-table-column>
... ... @@ -210,7 +204,6 @@
210 204 </template>
211 205 <script>
212 206 import request from '@/utils/request'
213   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
214 207 import NCCForm from './Form'
215 208 import DetailView from './detail-view'
216 209 import ExportBox from './ExportBox'
... ... @@ -218,6 +211,7 @@
218 211 import { promptApprovalRemark, postApproveSalesOutbound, postRejectGeneric } from '@/utils/wtRejectApproval'
219 212 import { formatWtSkzhDisplay } from '@/utils/wtComboSkzhDisplay'
220 213 import { dynamicText } from '@/filters'
  214 + import { getAccountSelector } from '@/api/extend/wtAccount'
221 215 export default {
222 216 components: { NCCForm, DetailView, ExportBox },
223 217 data() {
... ... @@ -260,7 +254,6 @@
260 254 { prop: 'skzh', label: '收款账户' },
261 255 { prop: 'skje', label: '收款金额' },
262 256 { prop: 'ysje', label: '优惠金额' },
263   - { prop: 'zdr', label: '制单人' },
264 257 { prop: 'shr', label: '审核人' },
265 258 { prop: 'gzr', label: '过账人' },
266 259 { prop: 'bz', label: '备注' },
... ... @@ -404,11 +397,6 @@
404 397 }
405 398 return (row.skje != null && row.skje !== '') ? parseFloat(row.skje).toFixed(2) : '0.00';
406 399 },
407   - // ✅ 出库成本:使用主表字段 cbje,空值按金额风格显示为 0.00
408   - getDisplayOutboundCost(row) {
409   - const val = parseFloat(row.cbje);
410   - return isNaN(val) ? '0.00' : val.toFixed(2);
411   - },
412 400 getcjckOptions(){
413 401 previewDataInterface('681758216954053893').then(res => {
414 402 this.cjckOptions = res.data
... ... @@ -420,7 +408,7 @@
420 408 });
421 409 },
422 410 getskzhOptions(){
423   - getDictionaryDataSelector('681761709836207365').then(res => {
  411 + getAccountSelector().then(res => {
424 412 this.skzhOptions = res.data.list
425 413 });
426 414 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtXsthd/Form.vue
... ... @@ -250,10 +250,10 @@
250 250 </template>
251 251 <script>
252 252 import request from '@/utils/request'
253   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
254 253 import { previewDataInterface } from '@/api/systemData/dataInterface'
255 254 import SerialNumberSelect from '../wtXsckd/SerialNumberSelect.vue'
256 255 import ShipmentOrderSelect from '../wtXswtdxjsd/ShipmentOrderSelect.vue'
  256 + import { getAccountSelector } from '@/api/extend/wtAccount'
257 257 export default {
258 258 components: { SerialNumberSelect, ShipmentOrderSelect },
259 259 props: [],
... ... @@ -345,7 +345,7 @@
345 345 });
346 346 },
347 347 getskzhOptions(){
348   - getDictionaryDataSelector('681761709836207365').then(res => {
  348 + getAccountSelector().then(res => {
349 349 this.skzhOptions = res.data.list
350 350 });
351 351 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtXsthd/detail-view.vue
... ... @@ -203,10 +203,10 @@
203 203 <script>
204 204 import request from '@/utils/request'
205 205 import { getUserInfoList } from '@/api/permission/user'
206   -import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
207 206 import { previewDataInterface } from '@/api/systemData/dataInterface'
208 207 import { dynamicText } from '@/filters'
209 208 import XsckdDetailView from '../wtXsckd/detail-view'
  209 +import { getAccountSelector } from '@/api/extend/wtAccount'
210 210  
211 211 export default {
212 212 name: 'WtXsthdDetailView',
... ... @@ -298,12 +298,23 @@ export default {
298 298 },
299 299 formatDjrq(ts) {
300 300 if (ts == null || ts === '') return '无'
301   - const d = new Date(typeof ts === 'number' ? ts : Number(ts))
  301 + const raw = typeof ts === 'string' ? ts.trim() : ts
  302 + if (raw === '') return '无'
  303 + let d
  304 + if (typeof raw === 'number') {
  305 + d = new Date(raw)
  306 + } else {
  307 + const n = Number(raw)
  308 + d = !isNaN(n) ? new Date(n) : new Date(String(raw).replace(/-/g, '/'))
  309 + }
302 310 if (isNaN(d.getTime())) return '无'
303 311 const y = d.getFullYear()
304 312 const m = String(d.getMonth() + 1).padStart(2, '0')
305 313 const day = String(d.getDate()).padStart(2, '0')
306   - return `${y}-${m}-${day}`
  314 + const h = String(d.getHours()).padStart(2, '0')
  315 + const mi = String(d.getMinutes()).padStart(2, '0')
  316 + const s = String(d.getSeconds()).padStart(2, '0')
  317 + return `${y}-${m}-${day} ${h}:${mi}:${s}`
307 318 },
308 319 getSummaries(param) {
309 320 const { columns, data } = param
... ... @@ -419,7 +430,7 @@ export default {
419 430 previewDataInterface('681758216954053893').then(res => {
420 431 this.cjckOptions = res.data || []
421 432 })
422   - getDictionaryDataSelector('681761709836207365').then(res => {
  433 + getAccountSelector().then(res => {
423 434 this.skzhOptions = res.data.list || []
424 435 })
425 436 }
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtXsthd/index.vue
... ... @@ -161,13 +161,13 @@
161 161 </template>
162 162 <script>
163 163 import request from '@/utils/request'
164   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
165 164 import NCCForm from './Form'
166 165 import DetailView from './detail-view'
167 166 import XsckdDetailView from '../wtXsckd/detail-view'
168 167 import ExportBox from './ExportBox'
169 168 import { previewDataInterface } from '@/api/systemData/dataInterface'
170 169 import { promptApprovalRemark, postApproveGeneric, postRejectGeneric } from '@/utils/wtRejectApproval'
  170 + import { getAccountSelector } from '@/api/extend/wtAccount'
171 171 export default {
172 172 components: { NCCForm, DetailView, XsckdDetailView, ExportBox },
173 173 data() {
... ... @@ -280,7 +280,7 @@
280 280 });
281 281 },
282 282 getskzhOptions(){
283   - getDictionaryDataSelector('681761709836207365').then(res => {
  283 + getAccountSelector().then(res => {
284 284 this.skzhOptions = res.data.list
285 285 });
286 286 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtXswtdxfhd/Form.vue
... ... @@ -280,10 +280,10 @@
280 280 </template>
281 281 <script>
282 282 import request from '@/utils/request'
283   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
284 283 import { previewDataInterface } from '@/api/systemData/dataInterface'
285 284 import BarcodeSelect from '../wtCgrkd/BarcodeSelect.vue'
286 285 import SerialNumberSelect from './SerialNumberSelect.vue'
  286 + import { getAccountSelector } from '@/api/extend/wtAccount'
287 287 export default {
288 288 components: { BarcodeSelect, SerialNumberSelect },
289 289 props: [],
... ... @@ -632,7 +632,7 @@
632 632 });
633 633 },
634 634 getskzhOptions(){
635   - getDictionaryDataSelector('681761709836207365').then(res => {
  635 + getAccountSelector().then(res => {
636 636 this.skzhOptions = res.data.list
637 637 });
638 638 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtXswtdxfhd/detail-view.vue
... ... @@ -133,11 +133,6 @@
133 133 <span class="cell-nowrap mx-cell__money">{{ formatMoneyCol(scope.row.je) }}</span>
134 134 </template>
135 135 </el-table-column>
136   - <el-table-column prop="cbje" label="成本" width="96" align="right">
137   - <template slot-scope="scope">
138   - <span class="cell-nowrap">{{ formatMoneyCol(scope.row.cbje) }}</span>
139   - </template>
140   - </el-table-column>
141 136 <el-table-column label="序列号" min-width="168">
142 137 <template slot-scope="scope">
143 138 <div v-if="scope.row.selectedSerialNumbers && scope.row.selectedSerialNumbers.length" class="sn-tags">
... ... @@ -180,12 +175,6 @@
180 175 {{ displayDiscountAmount }}
181 176 </span>
182 177 </el-descriptions-item>
183   - <el-descriptions-item label="出库成本">
184   - <span class="cell-nowrap">
185   - <i class="el-icon-s-grid desc-icon desc-icon--info" />
186   - {{ formatMoneyCol(detail.cbje) }}
187   - </span>
188   - </el-descriptions-item>
189 178 <el-descriptions-item label="制单人">
190 179 <span class="cell-nowrap">
191 180 <i class="el-icon-edit-outline desc-icon desc-icon--muted" />
... ... @@ -225,9 +214,9 @@
225 214  
226 215 <script>
227 216 import request from '@/utils/request'
228   -import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
229 217 import { previewDataInterface } from '@/api/systemData/dataInterface'
230 218 import { dynamicText } from '@/filters'
  219 +import { getAccountSelector } from '@/api/extend/wtAccount'
231 220  
232 221 export default {
233 222 name: 'WtXswtdxfhdDetailView',
... ... @@ -330,12 +319,23 @@ export default {
330 319 },
331 320 formatDjrq(ts) {
332 321 if (ts == null || ts === '') return '无'
333   - const d = new Date(typeof ts === 'number' ? ts : Number(ts))
  322 + const raw = typeof ts === 'string' ? ts.trim() : ts
  323 + if (raw === '') return '无'
  324 + let d
  325 + if (typeof raw === 'number') {
  326 + d = new Date(raw)
  327 + } else {
  328 + const n = Number(raw)
  329 + d = !isNaN(n) ? new Date(n) : new Date(String(raw).replace(/-/g, '/'))
  330 + }
334 331 if (isNaN(d.getTime())) return '无'
335 332 const y = d.getFullYear()
336 333 const m = String(d.getMonth() + 1).padStart(2, '0')
337 334 const day = String(d.getDate()).padStart(2, '0')
338   - return `${y}-${m}-${day}`
  335 + const h = String(d.getHours()).padStart(2, '0')
  336 + const mi = String(d.getMinutes()).padStart(2, '0')
  337 + const s = String(d.getSeconds()).padStart(2, '0')
  338 + return `${y}-${m}-${day} ${h}:${mi}:${s}`
339 339 },
340 340 getSummaries(param) {
341 341 const { columns, data } = param
... ... @@ -351,10 +351,6 @@ export default {
351 351 sums[index] = data
352 352 .reduce((t, row) => t + (parseFloat(row.je) || 0), 0)
353 353 .toFixed(2)
354   - } else if (column.property === 'cbje') {
355   - sums[index] = data
356   - .reduce((t, row) => t + (parseFloat(row.cbje) || 0), 0)
357   - .toFixed(2)
358 354 } else {
359 355 sums[index] = ''
360 356 }
... ... @@ -396,7 +392,7 @@ export default {
396 392 previewDataInterface('681758216954053893').then(res => {
397 393 this.cjckOptions = res.data || []
398 394 })
399   - getDictionaryDataSelector('681761709836207365').then(res => {
  395 + getAccountSelector().then(res => {
400 396 this.skzhOptions = res.data.list || []
401 397 })
402 398 request({
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtXswtdxfhd/index.vue
... ... @@ -165,12 +165,12 @@
165 165 </template>
166 166 <script>
167 167 import request from '@/utils/request'
168   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
169 168 import NCCForm from './Form'
170 169 import DetailView from './detail-view'
171 170 import ExportBox from './ExportBox'
172 171 import { previewDataInterface } from '@/api/systemData/dataInterface'
173 172 import { promptApprovalRemark, postApproveGeneric } from '@/utils/wtRejectApproval'
  173 + import { getAccountSelector } from '@/api/extend/wtAccount'
174 174 export default {
175 175 components: { NCCForm, DetailView, ExportBox },
176 176 data() {
... ... @@ -244,7 +244,7 @@
244 244 });
245 245 },
246 246 getskzhOptions(){
247   - getDictionaryDataSelector('681761709836207365').then(res => {
  247 + getAccountSelector().then(res => {
248 248 this.skzhOptions = res.data.list
249 249 });
250 250 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtXswtdxjsd/Form.vue
... ... @@ -278,11 +278,11 @@
278 278 </template>
279 279 <script>
280 280 import request from '@/utils/request'
281   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
282 281 import { previewDataInterface } from '@/api/systemData/dataInterface'
283 282 import BarcodeSelect from '../wtCgrkd/BarcodeSelect.vue'
284 283 import SerialNumberSelect from './SerialNumberSelect.vue'
285 284 import ShipmentOrderSelect from './ShipmentOrderSelect.vue'
  285 + import { getAccountSelector } from '@/api/extend/wtAccount'
286 286 export default {
287 287 components: { BarcodeSelect, SerialNumberSelect, ShipmentOrderSelect },
288 288 props: [],
... ... @@ -596,7 +596,7 @@
596 596 });
597 597 },
598 598 getskzhOptions(){
599   - getDictionaryDataSelector('681761709836207365').then(res => {
  599 + getAccountSelector().then(res => {
600 600 this.skzhOptions = res.data.list
601 601 });
602 602 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtXswtdxjsd/detail-view.vue
... ... @@ -230,9 +230,9 @@
230 230  
231 231 <script>
232 232 import request from '@/utils/request'
233   -import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
234 233 import { previewDataInterface } from '@/api/systemData/dataInterface'
235 234 import { dynamicText } from '@/filters'
  235 +import { getAccountSelector } from '@/api/extend/wtAccount'
236 236  
237 237 export default {
238 238 name: 'WtXswtdxjsdDetailView',
... ... @@ -303,12 +303,23 @@ export default {
303 303 },
304 304 formatDjrq(ts) {
305 305 if (ts == null || ts === '') return '无'
306   - const d = new Date(typeof ts === 'number' ? ts : Number(ts))
  306 + const raw = typeof ts === 'string' ? ts.trim() : ts
  307 + if (raw === '') return '无'
  308 + let d
  309 + if (typeof raw === 'number') {
  310 + d = new Date(raw)
  311 + } else {
  312 + const n = Number(raw)
  313 + d = !isNaN(n) ? new Date(n) : new Date(String(raw).replace(/-/g, '/'))
  314 + }
307 315 if (isNaN(d.getTime())) return '无'
308 316 const y = d.getFullYear()
309 317 const m = String(d.getMonth() + 1).padStart(2, '0')
310 318 const day = String(d.getDate()).padStart(2, '0')
311   - return `${y}-${m}-${day}`
  319 + const h = String(d.getHours()).padStart(2, '0')
  320 + const mi = String(d.getMinutes()).padStart(2, '0')
  321 + const s = String(d.getSeconds()).padStart(2, '0')
  322 + return `${y}-${m}-${day} ${h}:${mi}:${s}`
312 323 },
313 324 getSummaries(param) {
314 325 const { columns, data } = param
... ... @@ -365,7 +376,7 @@ export default {
365 376 previewDataInterface('681758216954053893').then(res => {
366 377 this.cjckOptions = res.data || []
367 378 })
368   - getDictionaryDataSelector('681761709836207365').then(res => {
  379 + getAccountSelector().then(res => {
369 380 this.skzhOptions = res.data.list || []
370 381 })
371 382 }
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtXswtdxjsd/index.vue
... ... @@ -155,12 +155,12 @@
155 155 </template>
156 156 <script>
157 157 import request from '@/utils/request'
158   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
159 158 import NCCForm from './Form'
160 159 import DetailView from './detail-view'
161 160 import ExportBox from './ExportBox'
162 161 import { previewDataInterface } from '@/api/systemData/dataInterface'
163 162 import { promptApprovalRemark, postApproveGeneric } from '@/utils/wtRejectApproval'
  163 + import { getAccountSelector } from '@/api/extend/wtAccount'
164 164 export default {
165 165 components: { NCCForm, DetailView, ExportBox },
166 166 data() {
... ... @@ -231,7 +231,7 @@
231 231 });
232 232 },
233 233 getskzhOptions(){
234   - getDictionaryDataSelector('681761709836207365').then(res => {
  234 + getAccountSelector().then(res => {
235 235 this.skzhOptions = res.data.list
236 236 });
237 237 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtXswtdxthd/Form.vue
... ... @@ -264,10 +264,10 @@
264 264 </template>
265 265 <script>
266 266 import request from '@/utils/request'
267   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
268 267 import { previewDataInterface } from '@/api/systemData/dataInterface'
269 268 import SerialNumberSelect from '../wtXsckd/SerialNumberSelect.vue'
270 269 import ShipmentOrderSelect from '../wtXswtdxjsd/ShipmentOrderSelect.vue'
  270 + import { getAccountSelector } from '@/api/extend/wtAccount'
271 271 export default {
272 272 components: { SerialNumberSelect, ShipmentOrderSelect },
273 273 props: [],
... ... @@ -363,7 +363,7 @@
363 363 });
364 364 },
365 365 getskzhOptions(){
366   - getDictionaryDataSelector('681761709836207365').then(res => {
  366 + getAccountSelector().then(res => {
367 367 this.skzhOptions = res.data.list
368 368 });
369 369 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtXswtdxthd/detail-view.vue
... ... @@ -196,9 +196,9 @@
196 196  
197 197 <script>
198 198 import request from '@/utils/request'
199   -import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
200 199 import { previewDataInterface } from '@/api/systemData/dataInterface'
201 200 import { dynamicText } from '@/filters'
  201 +import { getAccountSelector } from '@/api/extend/wtAccount'
202 202  
203 203 export default {
204 204 name: 'WtXswtdxthdDetailView',
... ... @@ -287,12 +287,23 @@ export default {
287 287 },
288 288 formatDjrq(ts) {
289 289 if (ts == null || ts === '') return '无'
290   - const d = new Date(typeof ts === 'number' ? ts : Number(ts))
  290 + const raw = typeof ts === 'string' ? ts.trim() : ts
  291 + if (raw === '') return '无'
  292 + let d
  293 + if (typeof raw === 'number') {
  294 + d = new Date(raw)
  295 + } else {
  296 + const n = Number(raw)
  297 + d = !isNaN(n) ? new Date(n) : new Date(String(raw).replace(/-/g, '/'))
  298 + }
291 299 if (isNaN(d.getTime())) return '无'
292 300 const y = d.getFullYear()
293 301 const m = String(d.getMonth() + 1).padStart(2, '0')
294 302 const day = String(d.getDate()).padStart(2, '0')
295   - return `${y}-${m}-${day}`
  303 + const h = String(d.getHours()).padStart(2, '0')
  304 + const mi = String(d.getMinutes()).padStart(2, '0')
  305 + const s = String(d.getSeconds()).padStart(2, '0')
  306 + return `${y}-${m}-${day} ${h}:${mi}:${s}`
296 307 },
297 308 getSummaries(param) {
298 309 const { columns, data } = param
... ... @@ -405,7 +416,7 @@ export default {
405 416 previewDataInterface('681758216954053893').then(res => {
406 417 this.cjckOptions = res.data || []
407 418 })
408   - getDictionaryDataSelector('681761709836207365').then(res => {
  419 + getAccountSelector().then(res => {
409 420 this.skzhOptions = res.data.list || []
410 421 })
411 422 }
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtXswtdxthd/index.vue
... ... @@ -156,12 +156,12 @@
156 156 </template>
157 157 <script>
158 158 import request from '@/utils/request'
159   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
160 159 import NCCForm from './Form'
161 160 import DetailView from './detail-view'
162 161 import ExportBox from './ExportBox'
163 162 import { previewDataInterface } from '@/api/systemData/dataInterface'
164 163 import { promptApprovalRemark, postApproveGeneric } from '@/utils/wtRejectApproval'
  164 + import { getAccountSelector } from '@/api/extend/wtAccount'
165 165 export default {
166 166 components: { NCCForm, DetailView, ExportBox },
167 167 data() {
... ... @@ -234,7 +234,7 @@
234 234 });
235 235 },
236 236 getskzhOptions(){
237   - getDictionaryDataSelector('681761709836207365').then(res => {
  237 + getAccountSelector().then(res => {
238 238 this.skzhOptions = res.data.list
239 239 });
240 240 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtYfkzjjs/Form.vue
... ... @@ -127,6 +127,7 @@
127 127 import request from '@/utils/request'
128 128 import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
129 129 import { previewDataInterface } from '@/api/systemData/dataInterface'
  130 + import { getAccountSelector } from '@/api/extend/wtAccount'
130 131 export default {
131 132 components: {},
132 133 props: [],
... ... @@ -202,17 +203,17 @@
202 203 });
203 204 },
204 205 getzhbhOptions(){
205   - getDictionaryDataSelector('681761709836207365').then(res => {
  206 + getAccountSelector().then(res => {
206 207 this.zhbhOptions = res.data.list
207 208 });
208 209 },
209 210 getfkzhOptions(){
210   - getDictionaryDataSelector('681761709836207365').then(res => {
  211 + getAccountSelector().then(res => {
211 212 this.fkzhOptions = res.data.list
212 213 });
213 214 },
214 215 getskzhOptions(){
215   - getDictionaryDataSelector('681761709836207365').then(res => {
  216 + getAccountSelector().then(res => {
216 217 this.skzhOptions = res.data.list
217 218 });
218 219 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtYfkzjjs/index.vue
... ... @@ -121,10 +121,10 @@
121 121 </template>
122 122 <script>
123 123 import request from '@/utils/request'
124   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
125 124 import NCCForm from './Form'
126 125 import DetailView from './detail-view'
127 126 import ExportBox from './ExportBox'
  127 + import { getAccountSelector } from '@/api/extend/wtAccount'
128 128 export default {
129 129 components: { NCCForm, DetailView, ExportBox },
130 130 data() {
... ... @@ -178,12 +178,12 @@
178 178 },
179 179 methods: {
180 180 getfkzhOptions(){
181   - getDictionaryDataSelector('681761709836207365').then(res => {
  181 + getAccountSelector().then(res => {
182 182 this.fkzhOptions = res.data.list
183 183 });
184 184 },
185 185 getskzhOptions(){
186   - getDictionaryDataSelector('681761709836207365').then(res => {
  186 + getAccountSelector().then(res => {
187 187 this.skzhOptions = res.data.list
188 188 });
189 189 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtYfkzjjs_js/Form.vue
... ... @@ -110,6 +110,7 @@
110 110 import request from '@/utils/request'
111 111 import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
112 112 import { previewDataInterface } from '@/api/systemData/dataInterface'
  113 + import { getAccountSelector } from '@/api/extend/wtAccount'
113 114 export default {
114 115 components: {},
115 116 props: [],
... ... @@ -183,17 +184,17 @@
183 184 });
184 185 },
185 186 getzhbhOptions(){
186   - getDictionaryDataSelector('681761709836207365').then(res => {
  187 + getAccountSelector().then(res => {
187 188 this.zhbhOptions = res.data.list
188 189 });
189 190 },
190 191 getfkzhOptions(){
191   - getDictionaryDataSelector('681761709836207365').then(res => {
  192 + getAccountSelector().then(res => {
192 193 this.fkzhOptions = res.data.list
193 194 });
194 195 },
195 196 getskzhOptions(){
196   - getDictionaryDataSelector('681761709836207365').then(res => {
  197 + getAccountSelector().then(res => {
197 198 this.skzhOptions = res.data.list
198 199 });
199 200 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtYfkzjjs_js/index.vue
... ... @@ -121,10 +121,10 @@
121 121 </template>
122 122 <script>
123 123 import request from '@/utils/request'
124   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
125 124 import NCCForm from './Form'
126 125 import DetailView from './detail-view'
127 126 import ExportBox from './ExportBox'
  127 + import { getAccountSelector } from '@/api/extend/wtAccount'
128 128 export default {
129 129 components: { NCCForm, DetailView, ExportBox },
130 130 data() {
... ... @@ -178,12 +178,12 @@
178 178 },
179 179 methods: {
180 180 getfkzhOptions(){
181   - getDictionaryDataSelector('681761709836207365').then(res => {
  181 + getAccountSelector().then(res => {
182 182 this.fkzhOptions = res.data.list
183 183 });
184 184 },
185 185 getskzhOptions(){
186   - getDictionaryDataSelector('681761709836207365').then(res => {
  186 + getAccountSelector().then(res => {
187 187 this.skzhOptions = res.data.list
188 188 });
189 189 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtYsckd/Form.vue
... ... @@ -278,10 +278,10 @@
278 278 </template>
279 279 <script>
280 280 import request from '@/utils/request'
281   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
282 281 import { previewDataInterface } from '@/api/systemData/dataInterface'
283 282 import BarcodeSelect from '../wtCgrkd/BarcodeSelect.vue'
284 283 import SerialNumberSelect from './SerialNumberSelect.vue'
  284 + import { getAccountSelector } from '@/api/extend/wtAccount'
285 285 export default {
286 286 components: { BarcodeSelect, SerialNumberSelect },
287 287 props: [],
... ... @@ -608,7 +608,7 @@
608 608 });
609 609 },
610 610 getskzhOptions(){
611   - getDictionaryDataSelector('681761709836207365').then(res => {
  611 + getAccountSelector().then(res => {
612 612 this.skzhOptions = res.data.list
613 613 });
614 614 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtYsckd/detail-view.vue
... ... @@ -139,11 +139,6 @@
139 139 <span class="cell-nowrap mx-cell__money">{{ formatMoneyCol(scope.row.je) }}</span>
140 140 </template>
141 141 </el-table-column>
142   - <el-table-column prop="cbje" label="成本" width="96" align="right">
143   - <template slot-scope="scope">
144   - <span class="cell-nowrap">{{ formatMoneyCol(scope.row.cbje) }}</span>
145   - </template>
146   - </el-table-column>
147 142 <el-table-column label="序列号" min-width="168">
148 143 <template slot-scope="scope">
149 144 <div v-if="scope.row.selectedSerialNumbers && scope.row.selectedSerialNumbers.length" class="sn-tags">
... ... @@ -186,12 +181,6 @@
186 181 {{ displayDiscountAmount }}
187 182 </span>
188 183 </el-descriptions-item>
189   - <el-descriptions-item label="出库成本">
190   - <span class="cell-nowrap">
191   - <i class="el-icon-s-grid desc-icon desc-icon--info" />
192   - {{ formatMoneyCol(detail.cbje) }}
193   - </span>
194   - </el-descriptions-item>
195 184 <el-descriptions-item label="制单人">
196 185 <span class="cell-nowrap">
197 186 <i class="el-icon-edit-outline desc-icon desc-icon--muted" />
... ... @@ -312,9 +301,9 @@
312 301  
313 302 <script>
314 303 import request from '@/utils/request'
315   -import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
316 304 import { previewDataInterface } from '@/api/systemData/dataInterface'
317 305 import { dynamicText } from '@/filters'
  306 +import { getAccountSelector } from '@/api/extend/wtAccount'
318 307 import {
319 308 formatWtSkzhDisplay,
320 309 resolveSkzhDictionaryLabel,
... ... @@ -467,12 +456,23 @@ export default {
467 456 },
468 457 formatDjrq(ts) {
469 458 if (ts == null || ts === '') return '无'
470   - const d = new Date(typeof ts === 'number' ? ts : Number(ts))
  459 + const raw = typeof ts === 'string' ? ts.trim() : ts
  460 + if (raw === '') return '无'
  461 + let d
  462 + if (typeof raw === 'number') {
  463 + d = new Date(raw)
  464 + } else {
  465 + const n = Number(raw)
  466 + d = !isNaN(n) ? new Date(n) : new Date(String(raw).replace(/-/g, '/'))
  467 + }
471 468 if (isNaN(d.getTime())) return '无'
472 469 const y = d.getFullYear()
473 470 const m = String(d.getMonth() + 1).padStart(2, '0')
474 471 const day = String(d.getDate()).padStart(2, '0')
475   - return `${y}-${m}-${day}`
  472 + const h = String(d.getHours()).padStart(2, '0')
  473 + const mi = String(d.getMinutes()).padStart(2, '0')
  474 + const s = String(d.getSeconds()).padStart(2, '0')
  475 + return `${y}-${m}-${day} ${h}:${mi}:${s}`
476 476 },
477 477 getSummaries(param) {
478 478 const { columns, data } = param
... ... @@ -488,10 +488,6 @@ export default {
488 488 sums[index] = data
489 489 .reduce((t, row) => t + (parseFloat(row.je) || 0), 0)
490 490 .toFixed(2)
491   - } else if (column.property === 'cbje') {
492   - sums[index] = data
493   - .reduce((t, row) => t + (parseFloat(row.cbje) || 0), 0)
494   - .toFixed(2)
495 491 } else {
496 492 sums[index] = ''
497 493 }
... ... @@ -530,7 +526,7 @@ export default {
530 526 previewDataInterface('681758216954053893').then(res => {
531 527 this.cjckOptions = res.data || []
532 528 })
533   - getDictionaryDataSelector('681761709836207365').then(res => {
  529 + getAccountSelector().then(res => {
534 530 const d = res.data
535 531 this.skzhOptions =
536 532 d && Array.isArray(d.list) ? d.list : Array.isArray(d) ? d : []
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtYsckd/index.vue
... ... @@ -135,9 +135,6 @@
135 135 <el-table-column label="优惠金额" align="left" min-width="90">
136 136 <template slot-scope="scope">{{ getDisplayDiscountAmount(scope.row) }}</template>
137 137 </el-table-column>
138   - <el-table-column label="出库成本" align="left" min-width="90">
139   - <template slot-scope="scope">{{ getDisplayOutboundCost(scope.row) }}</template>
140   - </el-table-column>
141 138 <el-table-column label="收款账户" prop="skzh" align="left">
142 139 <template slot-scope="scope">{{ formatSkzhRow(scope.row) }}</template>
143 140 </el-table-column>
... ... @@ -257,7 +254,6 @@
257 254 </template>
258 255 <script>
259 256 import request from '@/utils/request'
260   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
261 257 import NCCForm from './Form'
262 258 import DetailView from './detail-view'
263 259 import ExportBox from './ExportBox'
... ... @@ -265,6 +261,7 @@
265 261 import { previewDataInterface } from '@/api/systemData/dataInterface'
266 262 import { promptApprovalRemark, postApproveSalesOutbound } from '@/utils/wtRejectApproval'
267 263 import { formatWtSkzhDisplay } from '@/utils/wtComboSkzhDisplay'
  264 + import { getAccountSelector } from '@/api/extend/wtAccount'
268 265 export default {
269 266 components: { NCCForm, DetailView, ExportBox, SerialNumberSelect },
270 267 data() {
... ... @@ -307,7 +304,6 @@
307 304 { prop: 'skzh', label: '收款账户' },
308 305 { prop: 'skje', label: '收款金额' },
309 306 { prop: 'ysje', label: '优惠金额' },
310   - { prop: 'cbje', label: '出库成本' },
311 307 { prop: 'zdr', label: '制单人' },
312 308 { prop: 'shr', label: '审核人' },
313 309 { prop: 'gzr', label: '过账人' },
... ... @@ -369,10 +365,6 @@
369 365 formatSkzhRow(row) {
370 366 return formatWtSkzhDisplay(row, this.skzhOptions)
371 367 },
372   - getDisplayOutboundCost(row) {
373   - const val = parseFloat(row.cbje)
374   - return isNaN(val) ? '0.00' : val.toFixed(2)
375   - },
376 368 openDetail(id) {
377 369 if (!id) return
378 370 this.detailVisible = true
... ... @@ -454,7 +446,7 @@
454 446 });
455 447 },
456 448 getskzhOptions(){
457   - getDictionaryDataSelector('681761709836207365').then(res => {
  449 + getAccountSelector().then(res => {
458 450 this.skzhOptions = res.data.list
459 451 });
460 452 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtYskzjjs/Form.vue
... ... @@ -127,6 +127,7 @@
127 127 import request from '@/utils/request'
128 128 import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
129 129 import { previewDataInterface } from '@/api/systemData/dataInterface'
  130 + import { getAccountSelector } from '@/api/extend/wtAccount'
130 131 export default {
131 132 components: {},
132 133 props: [],
... ... @@ -202,17 +203,17 @@
202 203 });
203 204 },
204 205 getzhbhOptions(){
205   - getDictionaryDataSelector('681761709836207365').then(res => {
  206 + getAccountSelector().then(res => {
206 207 this.zhbhOptions = res.data.list
207 208 });
208 209 },
209 210 getfkzhOptions(){
210   - getDictionaryDataSelector('681761709836207365').then(res => {
  211 + getAccountSelector().then(res => {
211 212 this.fkzhOptions = res.data.list
212 213 });
213 214 },
214 215 getskzhOptions(){
215   - getDictionaryDataSelector('681761709836207365').then(res => {
  216 + getAccountSelector().then(res => {
216 217 this.skzhOptions = res.data.list
217 218 });
218 219 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtYskzjjs/index.vue
... ... @@ -122,10 +122,10 @@
122 122 </template>
123 123 <script>
124 124 import request from '@/utils/request'
125   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
126 125 import NCCForm from './Form'
127 126 import DetailView from './detail-view'
128 127 import ExportBox from './ExportBox'
  128 + import { getAccountSelector } from '@/api/extend/wtAccount'
129 129 export default {
130 130 components: { NCCForm, DetailView, ExportBox },
131 131 data() {
... ... @@ -178,12 +178,12 @@
178 178 },
179 179 methods: {
180 180 getfkzhOptions(){
181   - getDictionaryDataSelector('681761709836207365').then(res => {
  181 + getAccountSelector().then(res => {
182 182 this.fkzhOptions = res.data.list
183 183 });
184 184 },
185 185 getskzhOptions(){
186   - getDictionaryDataSelector('681761709836207365').then(res => {
  186 + getAccountSelector().then(res => {
187 187 this.skzhOptions = res.data.list
188 188 });
189 189 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtYskzjjs_hy/Form.vue
... ... @@ -152,6 +152,7 @@
152 152 import request from '@/utils/request'
153 153 import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
154 154 import { previewDataInterface } from '@/api/systemData/dataInterface'
  155 + import { getAccountSelector } from '@/api/extend/wtAccount'
155 156 export default {
156 157 components: {},
157 158 props: [],
... ... @@ -234,17 +235,17 @@
234 235 });
235 236 },
236 237 getzhbhOptions(){
237   - getDictionaryDataSelector('681761709836207365').then(res => {
  238 + getAccountSelector().then(res => {
238 239 this.zhbhOptions = res.data.list
239 240 });
240 241 },
241 242 getfkzhOptions(){
242   - getDictionaryDataSelector('681761709836207365').then(res => {
  243 + getAccountSelector().then(res => {
243 244 this.fkzhOptions = res.data.list
244 245 });
245 246 },
246 247 getskzhOptions(){
247   - getDictionaryDataSelector('681761709836207365').then(res => {
  248 + getAccountSelector().then(res => {
248 249 this.skzhOptions = res.data.list
249 250 });
250 251 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtYskzjjs_hy/detail-view.vue
... ... @@ -43,7 +43,7 @@
43 43  
44 44 <script>
45 45 import request from '@/utils/request'
46   -import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
  46 +import { getAccountSelector } from '@/api/extend/wtAccount'
47 47  
48 48 export default {
49 49 name: 'WtYskzjjsHyDetailView',
... ... @@ -60,7 +60,7 @@ export default {
60 60 },
61 61 methods: {
62 62 loadAccountOptions() {
63   - getDictionaryDataSelector('681761709836207365').then(res => {
  63 + getAccountSelector().then(res => {
64 64 this.accountOptions = (res.data && res.data.list) || []
65 65 })
66 66 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtYskzjjs_hy/index.vue
... ... @@ -101,11 +101,11 @@
101 101 </template>
102 102 <script>
103 103 import request from '@/utils/request'
104   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
105 104 import NCCForm from './Form'
106 105 import DetailView from './detail-view'
107 106 import ExportBox from './ExportBox'
108 107 import { previewDataInterface } from '@/api/systemData/dataInterface'
  108 + import { getAccountSelector } from '@/api/extend/wtAccount'
109 109 export default {
110 110 components: { NCCForm, ExportBox, DetailView },
111 111 data() {
... ... @@ -155,12 +155,12 @@
155 155 },
156 156 methods: {
157 157 getfkzhOptions(){
158   - getDictionaryDataSelector('681761709836207365').then(res => {
  158 + getAccountSelector().then(res => {
159 159 this.fkzhOptions = res.data.list
160 160 });
161 161 },
162 162 getskzhOptions(){
163   - getDictionaryDataSelector('681761709836207365').then(res => {
  163 + getAccountSelector().then(res => {
164 164 this.skzhOptions = res.data.list
165 165 });
166 166 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtYskzjjs_js/Form.vue
... ... @@ -110,6 +110,7 @@
110 110 import request from '@/utils/request'
111 111 import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
112 112 import { previewDataInterface } from '@/api/systemData/dataInterface'
  113 + import { getAccountSelector } from '@/api/extend/wtAccount'
113 114 export default {
114 115 components: {},
115 116 props: [],
... ... @@ -183,17 +184,17 @@
183 184 });
184 185 },
185 186 getzhbhOptions(){
186   - getDictionaryDataSelector('681761709836207365').then(res => {
  187 + getAccountSelector().then(res => {
187 188 this.zhbhOptions = res.data.list
188 189 });
189 190 },
190 191 getfkzhOptions(){
191   - getDictionaryDataSelector('681761709836207365').then(res => {
  192 + getAccountSelector().then(res => {
192 193 this.fkzhOptions = res.data.list
193 194 });
194 195 },
195 196 getskzhOptions(){
196   - getDictionaryDataSelector('681761709836207365').then(res => {
  197 + getAccountSelector().then(res => {
197 198 this.skzhOptions = res.data.list
198 199 });
199 200 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtYskzjjs_js/index.vue
... ... @@ -121,10 +121,10 @@
121 121 </template>
122 122 <script>
123 123 import request from '@/utils/request'
124   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
125 124 import NCCForm from './Form'
126 125 import DetailView from './detail-view'
127 126 import ExportBox from './ExportBox'
  127 + import { getAccountSelector } from '@/api/extend/wtAccount'
128 128 export default {
129 129 components: { NCCForm, DetailView, ExportBox },
130 130 data() {
... ... @@ -178,12 +178,12 @@
178 178 },
179 179 methods: {
180 180 getfkzhOptions(){
181   - getDictionaryDataSelector('681761709836207365').then(res => {
  181 + getAccountSelector().then(res => {
182 182 this.fkzhOptions = res.data.list
183 183 });
184 184 },
185 185 getskzhOptions(){
186   - getDictionaryDataSelector('681761709836207365').then(res => {
  186 + getAccountSelector().then(res => {
187 187 this.skzhOptions = res.data.list
188 188 });
189 189 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtYskzjjs_qt/Form.vue
... ... @@ -120,6 +120,7 @@
120 120 <script>
121 121 import request from '@/utils/request'
122 122 import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
  123 + import { getAccountSelector } from '@/api/extend/wtAccount'
123 124 export default {
124 125 components: {},
125 126 props: [],
... ... @@ -177,12 +178,12 @@
177 178 });
178 179 },
179 180 getfkzhOptions(){
180   - getDictionaryDataSelector('681761709836207365').then(res => {
  181 + getAccountSelector().then(res => {
181 182 this.fkzhOptions = res.data.list
182 183 });
183 184 },
184 185 getskzhOptions(){
185   - getDictionaryDataSelector('681761709836207365').then(res => {
  186 + getAccountSelector().then(res => {
186 187 this.skzhOptions = res.data.list
187 188 });
188 189 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtYskzjjs_xj/Form.vue
... ... @@ -121,6 +121,7 @@
121 121 import request from '@/utils/request'
122 122 import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
123 123 import { previewDataInterface } from '@/api/systemData/dataInterface'
  124 + import { getAccountSelector } from '@/api/extend/wtAccount'
124 125 export default {
125 126 components: {},
126 127 props: [],
... ... @@ -198,17 +199,17 @@
198 199 });
199 200 },
200 201 getzhbhOptions(){
201   - getDictionaryDataSelector('681761709836207365').then(res => {
  202 + getAccountSelector().then(res => {
202 203 this.zhbhOptions = res.data.list
203 204 });
204 205 },
205 206 getfkzhOptions(){
206   - getDictionaryDataSelector('681761709836207365').then(res => {
  207 + getAccountSelector().then(res => {
207 208 this.fkzhOptions = res.data.list
208 209 });
209 210 },
210 211 getskzhOptions(){
211   - getDictionaryDataSelector('681761709836207365').then(res => {
  212 + getAccountSelector().then(res => {
212 213 this.skzhOptions = res.data.list
213 214 });
214 215 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtYskzjjs_xj/detail-view.vue
... ... @@ -44,6 +44,7 @@
44 44 <script>
45 45 import request from '@/utils/request'
46 46 import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
  47 +import { getAccountSelector } from '@/api/extend/wtAccount'
47 48  
48 49 export default {
49 50 name: 'WtYskzjjsXjDetailView',
... ... @@ -81,7 +82,7 @@ export default {
81 82 })
82 83 },
83 84 loadAccounts() {
84   - getDictionaryDataSelector('681761709836207365').then(res => {
  85 + getAccountSelector().then(res => {
85 86 this.accountOptions = res.data.list || []
86 87 })
87 88 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtYskzjjs_xj/index.vue
... ... @@ -118,10 +118,10 @@
118 118 </template>
119 119 <script>
120 120 import request from '@/utils/request'
121   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
122 121 import NCCForm from './Form'
123 122 import DetailView from './detail-view'
124 123 import ExportBox from './ExportBox'
  124 + import { getAccountSelector } from '@/api/extend/wtAccount'
125 125 export default {
126 126 components: { NCCForm, DetailView, ExportBox },
127 127 data() {
... ... @@ -170,12 +170,12 @@
170 170 },
171 171 methods: {
172 172 getfkzhOptions(){
173   - getDictionaryDataSelector('681761709836207365').then(res => {
  173 + getAccountSelector().then(res => {
174 174 this.fkzhOptions = res.data.list
175 175 });
176 176 },
177 177 getskzhOptions(){
178   - getDictionaryDataSelector('681761709836207365').then(res => {
  178 + getAccountSelector().then(res => {
179 179 this.skzhOptions = res.data.list
180 180 });
181 181 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtYskzjjs_zk/Form.vue
... ... @@ -106,6 +106,7 @@
106 106 import request from '@/utils/request'
107 107 import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
108 108 import { previewDataInterface } from '@/api/systemData/dataInterface'
  109 + import { getAccountSelector } from '@/api/extend/wtAccount'
109 110 export default {
110 111 components: {},
111 112 props: [],
... ... @@ -183,17 +184,17 @@
183 184 });
184 185 },
185 186 getzhbhOptions(){
186   - getDictionaryDataSelector('681761709836207365').then(res => {
  187 + getAccountSelector().then(res => {
187 188 this.zhbhOptions = res.data.list
188 189 });
189 190 },
190 191 getfkzhOptions(){
191   - getDictionaryDataSelector('681761709836207365').then(res => {
  192 + getAccountSelector().then(res => {
192 193 this.fkzhOptions = res.data.list
193 194 });
194 195 },
195 196 getskzhOptions(){
196   - getDictionaryDataSelector('681761709836207365').then(res => {
  197 + getAccountSelector().then(res => {
197 198 this.skzhOptions = res.data.list
198 199 });
199 200 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtYskzjjs_zk/detail-view.vue
... ... @@ -47,7 +47,7 @@
47 47  
48 48 <script>
49 49 import request from '@/utils/request'
50   -import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
  50 +import { getAccountSelector } from '@/api/extend/wtAccount'
51 51  
52 52 export default {
53 53 name: 'WtYskzjjsZkDetailView',
... ... @@ -64,7 +64,7 @@ export default {
64 64 },
65 65 methods: {
66 66 getZhOptions() {
67   - getDictionaryDataSelector('681761709836207365').then(res => {
  67 + getAccountSelector().then(res => {
68 68 this.zhOptions = (res.data && res.data.list) || []
69 69 })
70 70 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtYskzjjs_zk/index.vue
... ... @@ -126,10 +126,10 @@
126 126 </template>
127 127 <script>
128 128 import request from '@/utils/request'
129   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
130 129 import NCCForm from './Form'
131 130 import DetailView from './detail-view'
132 131 import ExportBox from './ExportBox'
  132 + import { getAccountSelector } from '@/api/extend/wtAccount'
133 133 export default {
134 134 components: { NCCForm, DetailView, ExportBox },
135 135 data() {
... ... @@ -180,12 +180,12 @@
180 180 },
181 181 methods: {
182 182 getfkzhOptions(){
183   - getDictionaryDataSelector('681761709836207365').then(res => {
  183 + getAccountSelector().then(res => {
184 184 this.fkzhOptions = res.data.list
185 185 });
186 186 },
187 187 getskzhOptions(){
188   - getDictionaryDataSelector('681761709836207365').then(res => {
  188 + getAccountSelector().then(res => {
189 189 this.skzhOptions = res.data.list
190 190 });
191 191 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtYsthd copy/Form.vue
... ... @@ -223,9 +223,9 @@
223 223 </template>
224 224 <script>
225 225 import request from '@/utils/request'
226   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
227 226 import { previewDataInterface } from '@/api/systemData/dataInterface'
228 227 import SerialNumberSelect from '../wtXsckd/SerialNumberSelect.vue'
  228 + import { getAccountSelector } from '@/api/extend/wtAccount'
229 229 export default {
230 230 components: { SerialNumberSelect },
231 231 props: [],
... ... @@ -317,7 +317,7 @@
317 317 });
318 318 },
319 319 getskzhOptions(){
320   - getDictionaryDataSelector('681761709836207365').then(res => {
  320 + getAccountSelector().then(res => {
321 321 this.skzhOptions = res.data.list
322 322 });
323 323 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtYsthd copy/index.vue
... ... @@ -127,10 +127,10 @@
127 127 </template>
128 128 <script>
129 129 import request from '@/utils/request'
130   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
131 130 import NCCForm from './Form'
132 131 import ExportBox from './ExportBox'
133 132 import { previewDataInterface } from '@/api/systemData/dataInterface'
  133 + import { getAccountSelector } from '@/api/extend/wtAccount'
134 134 export default {
135 135 components: { NCCForm, ExportBox },
136 136 data() {
... ... @@ -199,7 +199,7 @@
199 199 });
200 200 },
201 201 getskzhOptions(){
202   - getDictionaryDataSelector('681761709836207365').then(res => {
  202 + getAccountSelector().then(res => {
203 203 this.skzhOptions = res.data.list
204 204 });
205 205 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtYsthd/Form.vue
... ... @@ -251,10 +251,10 @@
251 251 </template>
252 252 <script>
253 253 import request from '@/utils/request'
254   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
255 254 import { previewDataInterface } from '@/api/systemData/dataInterface'
256 255 import SerialNumberSelect from '../wtXsckd/SerialNumberSelect.vue'
257 256 import ShipmentOrderSelect from '../wtXswtdxjsd/ShipmentOrderSelect.vue'
  257 + import { getAccountSelector } from '@/api/extend/wtAccount'
258 258 export default {
259 259 components: { SerialNumberSelect, ShipmentOrderSelect },
260 260 props: [],
... ... @@ -347,7 +347,7 @@
347 347 });
348 348 },
349 349 getskzhOptions(){
350   - getDictionaryDataSelector('681761709836207365').then(res => {
  350 + getAccountSelector().then(res => {
351 351 this.skzhOptions = res.data.list
352 352 });
353 353 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtYsthd/detail-view.vue
... ... @@ -201,10 +201,10 @@
201 201 <script>
202 202 import request from '@/utils/request'
203 203 import { getUserInfoList } from '@/api/permission/user'
204   -import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
205 204 import { previewDataInterface } from '@/api/systemData/dataInterface'
206 205 import { dynamicText } from '@/filters'
207 206 import YsckdDetailView from '../wtYsckd/detail-view'
  207 +import { getAccountSelector } from '@/api/extend/wtAccount'
208 208  
209 209 export default {
210 210 name: 'WtYsthdDetailView',
... ... @@ -289,12 +289,23 @@ export default {
289 289 },
290 290 formatDjrq(ts) {
291 291 if (ts == null || ts === '') return '无'
292   - const d = new Date(typeof ts === 'number' ? ts : Number(ts))
  292 + const raw = typeof ts === 'string' ? ts.trim() : ts
  293 + if (raw === '') return '无'
  294 + let d
  295 + if (typeof raw === 'number') {
  296 + d = new Date(raw)
  297 + } else {
  298 + const n = Number(raw)
  299 + d = !isNaN(n) ? new Date(n) : new Date(String(raw).replace(/-/g, '/'))
  300 + }
293 301 if (isNaN(d.getTime())) return '无'
294 302 const y = d.getFullYear()
295 303 const m = String(d.getMonth() + 1).padStart(2, '0')
296 304 const day = String(d.getDate()).padStart(2, '0')
297   - return `${y}-${m}-${day}`
  305 + const h = String(d.getHours()).padStart(2, '0')
  306 + const mi = String(d.getMinutes()).padStart(2, '0')
  307 + const s = String(d.getSeconds()).padStart(2, '0')
  308 + return `${y}-${m}-${day} ${h}:${mi}:${s}`
298 309 },
299 310 getSummaries(param) {
300 311 const { columns, data } = param
... ... @@ -418,7 +429,7 @@ export default {
418 429 previewDataInterface('681758216954053893').then(res => {
419 430 this.cjckOptions = res.data || []
420 431 })
421   - getDictionaryDataSelector('681761709836207365').then(res => {
  432 + getAccountSelector().then(res => {
422 433 this.skzhOptions = res.data.list || []
423 434 })
424 435 }
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtYsthd/index.vue
... ... @@ -159,13 +159,13 @@
159 159 </template>
160 160 <script>
161 161 import request from '@/utils/request'
162   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
163 162 import NCCForm from './Form'
164 163 import DetailView from './detail-view'
165 164 import YsckdDetailView from '../wtYsckd/detail-view'
166 165 import ExportBox from './ExportBox'
167 166 import { previewDataInterface } from '@/api/systemData/dataInterface'
168 167 import { promptApprovalRemark, postApproveGeneric } from '@/utils/wtRejectApproval'
  168 + import { getAccountSelector } from '@/api/extend/wtAccount'
169 169 export default {
170 170 components: { NCCForm, DetailView, YsckdDetailView, ExportBox },
171 171 data() {
... ... @@ -279,7 +279,7 @@
279 279 });
280 280 },
281 281 getskzhOptions(){
282   - getDictionaryDataSelector('681761709836207365').then(res => {
  282 + getAccountSelector().then(res => {
283 283 this.skzhOptions = res.data.list
284 284 });
285 285 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtZkd/Form.vue
... ... @@ -92,8 +92,8 @@
92 92 </template>
93 93 <script>
94 94 import request from '@/utils/request'
95   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
96 95 import { previewDataInterface } from '@/api/systemData/dataInterface'
  96 + import { getAccountSelector } from '@/api/extend/wtAccount'
97 97 export default {
98 98 components: {},
99 99 props: [],
... ... @@ -134,12 +134,12 @@
134 134 },
135 135 methods: {
136 136 getfkzhOptions(){
137   - getDictionaryDataSelector('681761709836207365').then(res => {
  137 + getAccountSelector().then(res => {
138 138 this.fkzhOptions = res.data.list
139 139 });
140 140 },
141 141 getskzhOptions(){
142   - getDictionaryDataSelector('681761709836207365').then(res => {
  142 + getAccountSelector().then(res => {
143 143 this.skzhOptions = res.data.list
144 144 });
145 145 },
... ...
Antis.Erp.Plat/antis-ncc-admin/src/views/wtZkd/index.vue
... ... @@ -133,10 +133,10 @@
133 133 </template>
134 134 <script>
135 135 import request from '@/utils/request'
136   - import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
137 136 import NCCForm from './Form'
138 137 import ExportBox from './ExportBox'
139 138 import { previewDataInterface } from '@/api/systemData/dataInterface'
  139 + import { getAccountSelector } from '@/api/extend/wtAccount'
140 140 export default {
141 141 components: { NCCForm, ExportBox },
142 142 data() {
... ... @@ -195,12 +195,12 @@
195 195 },
196 196 methods: {
197 197 getfkzhOptions(){
198   - getDictionaryDataSelector('681761709836207365').then(res => {
  198 + getAccountSelector().then(res => {
199 199 this.fkzhOptions = res.data.list
200 200 });
201 201 },
202 202 getskzhOptions(){
203   - getDictionaryDataSelector('681761709836207365').then(res => {
  203 + getAccountSelector().then(res => {
204 204 this.skzhOptions = res.data.list
205 205 });
206 206 },
... ...
Antis.Erp.Plat/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/WtAccount/WtAccountCrInput.cs 0 → 100644
  1 +namespace NCC.Extend.Entitys.Dto.WtAccount
  2 +{
  3 + /// <summary>
  4 + /// 账户管理 - 新建入参
  5 + /// </summary>
  6 + public class WtAccountCrInput
  7 + {
  8 + /// <summary>
  9 + /// 账户名称(必填)
  10 + /// </summary>
  11 + public string accountName { get; set; }
  12 +
  13 + /// <summary>
  14 + /// 账户分类
  15 + /// </summary>
  16 + public string category { get; set; }
  17 +
  18 + /// <summary>
  19 + /// 业务编码;留空则按 codeRule 自动生成
  20 + /// </summary>
  21 + public string accountCode { get; set; }
  22 +
  23 + /// <summary>
  24 + /// 编码生成规则:1=数字序号(SKZH00001 递增),2=名称拼音首字母缩写;默认1
  25 + /// </summary>
  26 + public int? codeRule { get; set; }
  27 +
  28 + /// <summary>
  29 + /// 排序码
  30 + /// </summary>
  31 + public int? sortCode { get; set; }
  32 + }
  33 +}
... ...
Antis.Erp.Plat/netcore/src/Modularity/Extend/NCC.Extend.Entitys/Dto/WtAccount/WtAccountInfoOutput.cs 0 → 100644
  1 +using System;
  2 +
  3 +namespace NCC.Extend.Entitys.Dto.WtAccount
  4 +{
  5 + /// <summary>
  6 + /// 账户管理 - 详情输出
  7 + /// </summary>
  8 + public class WtAccountInfoOutput
  9 + {
  10 + /// <summary>
  11 + /// 主键
  12 + /// </summary>
  13 + public string id { get; set; }
  14 +
  15 + /// <summary>
  16 + /// 业务编码
  17 + /// </summary>
  18 + public string accountCode { get; set; }
  19 +
  20 + /// <summary>
  21 + /// 账户名称
  22 + /// </summary>
  23 + public string accountName { get; set; }
  24 +
  25 + /// <summary>
  26 + /// 账户分类
  27 + /// </summary>
  28 + public string category { get; set; }
  29 +
  30 + /// <summary>
  31 + /// 状态:1=启用 0=禁用
  32 + /// </summary>
  33 + public int status { get; set; }
  34 +
  35 + /// <summary>
  36 + /// 排序码
  37 + /// </summary>
  38 + public int sortCode { get; set; }
  39 +
  40 + /// <summary>
  41 + /// 创建时间
  42 + /// </summary>
  43 + public DateTime? createTime { get; set; }
  44 + }
  45 +}
... ...