Merge remote-tracking branch 'origin/master' into zhc4dev

zhc4dev
zhc077 2 years ago
commit 3c04287086
  1. 67
      ant-design-vue-jeecg/package.json
  2. 17
      ant-design-vue-jeecg/src/main.js
  3. 233
      ant-design-vue-jeecg/src/views/customerinvoice/custom/CustomerInvoiceList.vue
  4. 158
      ant-design-vue-jeecg/src/views/customerinvoice/custom/modules/CustomerInvoiceForm.vue
  5. 60
      ant-design-vue-jeecg/src/views/customerinvoice/custom/modules/CustomerInvoiceModal.vue
  6. 84
      ant-design-vue-jeecg/src/views/customerinvoice/custom/modules/CustomerInvoiceModal__Style#Drawer.vue
  7. 258
      ant-design-vue-jeecg/src/views/customermeasure/custo/CustomerMeasureList.vue
  8. 199
      ant-design-vue-jeecg/src/views/customermeasure/custo/modules/CustomerMeasureForm.vue
  9. 60
      ant-design-vue-jeecg/src/views/customermeasure/custo/modules/CustomerMeasureModal.vue
  10. 84
      ant-design-vue-jeecg/src/views/customermeasure/custo/modules/CustomerMeasureModal__Style#Drawer.vue
  11. 246
      ant-design-vue-jeecg/src/views/customerpayment/custom/CustomerPaymentList.vue
  12. 119
      ant-design-vue-jeecg/src/views/customerpayment/custom/modules/CustomerPaymentForm.vue
  13. 60
      ant-design-vue-jeecg/src/views/customerpayment/custom/modules/CustomerPaymentModal.vue
  14. 84
      ant-design-vue-jeecg/src/views/customerpayment/custom/modules/CustomerPaymentModal__Style#Drawer.vue
  15. 250
      ant-design-vue-jeecg/src/views/customerreceivingaddress/custom/CustomerReceivingAddressList.vue
  16. 143
      ant-design-vue-jeecg/src/views/customerreceivingaddress/custom/modules/CustomerReceivingAddressForm.vue
  17. 60
      ant-design-vue-jeecg/src/views/customerreceivingaddress/custom/modules/CustomerReceivingAddressModal.vue
  18. 84
      ant-design-vue-jeecg/src/views/customerreceivingaddress/custom/modules/CustomerReceivingAddressModal__Style#Drawer.vue
  19. 6
      ant-design-vue-jeecg/src/views/customershoppingcart/admin/CustomerShoppingCartList.vue
  20. 257
      ant-design-vue-jeecg/src/views/customershoppingcart/custum/CustomerShoppingCartList.vue
  21. 150
      ant-design-vue-jeecg/src/views/customershoppingcart/custum/modules/CustomerShoppingCartForm.vue
  22. 60
      ant-design-vue-jeecg/src/views/customershoppingcart/custum/modules/CustomerShoppingCartModal.vue
  23. 84
      ant-design-vue-jeecg/src/views/customershoppingcart/custum/modules/CustomerShoppingCartModal__Style#Drawer.vue
  24. 18
      ant-design-vue-jeecg/src/views/erp/accessories/ZyAccessoriesList.vue
  25. 20
      ant-design-vue-jeecg/src/views/erp/accessories/ZyAccessoriesTypeList.vue
  26. 11
      ant-design-vue-jeecg/src/views/erp/accessories/modules/ZyAccessoriesForm.vue
  27. 14
      ant-design-vue-jeecg/src/views/erp/fabric/modules/ZyFabricForm.vue
  28. 2
      ant-design-vue-jeecg/src/views/maker/modules/QRCode.vue
  29. 17
      ant-design-vue-jeecg/src/views/process/ZyClothsTypeList.vue
  30. 28
      ant-design-vue-jeecg/src/views/process/ZyProcessList.vue
  31. 3
      ant-design-vue-jeecg/src/views/process/modules/ZyClothActionForm.vue
  32. 33
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsTypeForm.vue
  33. 7
      ant-design-vue-jeecg/src/views/process/modules/ZyProcessActionList.vue
  34. 139
      ant-design-vue-jeecg/src/views/process/modules/ZyProcessForm.vue
  35. 2
      ant-design-vue-jeecg/src/views/process/modules/ZyProcessModal.vue
  36. 269
      ant-design-vue-jeecg/src/views/product/productProcess/ZyProductProcessList.vue
  37. 301
      ant-design-vue-jeecg/src/views/product/productProcess/modules/ZyProcessList.vue
  38. 114
      ant-design-vue-jeecg/src/views/product/productProcess/modules/ZyProductProcessForm.vue
  39. 79
      ant-design-vue-jeecg/src/views/product/productProcess/modules/ZyProductProcessModal.vue
  40. 84
      ant-design-vue-jeecg/src/views/product/productProcess/modules/ZyProductProcessModal__Style#Drawer.vue
  41. 79
      ant-design-vue-jeecg/src/views/system/Depart3List.vue
  42. 43
      ant-design-vue-jeecg/src/views/system/modules/DepartModal.vue
  43. 8
      ant-design-vue-jeecg/src/views/zyclothsample/modules/ZyClothSampleForm.vue
  44. 308
      ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleForm.vue
  45. 6
      ant-design-vue-jeecg/src/views/zystyleaccessories/ZyStyleAccessoriesList.vue
  46. 6
      ant-design-vue-jeecg/src/views/zystylefabric/ZyStyleFabricList.vue
  47. 6
      ant-design-vue-jeecg/src/views/zystylemodel/ZyStyleModelList.vue
  48. 9
      ant-design-vue-jeecg/src/views/zystylemodular/ZyStyleModularList.vue
  49. 6
      ant-design-vue-jeecg/src/views/zystylemodule/ZyStyleModuleList.vue
  50. 2
      ant-design-vue-jeecg/src/views/zyworkorder/modules/QRCode.vue
  51. 4
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/accessories/controller/ZyAccessoriesController.java
  52. 4
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/accessories/controller/ZyAccessoriesTypeController.java
  53. 1
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/accessories/entity/ZyAccessories.java
  54. 19
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsTypeController.java
  55. 4
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/ZyClothsTypeMapper.java
  56. 2
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/IZyClothsTypeService.java
  57. 9
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsTypeServiceImpl.java
  58. 2
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/mapper/ZyProcessActionMapper.java
  59. 43
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerinvoice/controller/CustomerInvoiceController.java
  60. 45
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customermeasure/controller/CustomerMeasureController.java
  61. 41
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerpayment/controller/CustomerPaymentController.java
  62. 28
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerreceivingaddress/controller/CustomerReceivingAddressController.java
  63. 31
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customershoppingcart/controller/CustomerShoppingCartController.java
  64. 202
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/zyproductprocess/controller/ZyProductProcessController.java
  65. 70
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/zyproductprocess/entity/ZyProductProcess.java
  66. 27
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/zyproductprocess/mapper/ZyProductProcessMapper.java
  67. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/zyproductprocess/mapper/xml/ZyProductProcessMapper.xml
  68. 22
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/zyproductprocess/service/IZyProductProcessService.java
  69. 39
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/zyproductprocess/service/impl/ZyProductProcessServiceImpl.java

@ -10,63 +10,65 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"@antv/data-set": "^0.11.4",
"@jeecg/antd-online-mini": "2.4.5-RC",
"@jiaminghi/data-view": "^2.10.0",
"@tinymce/tinymce-vue": "^2.1.0",
"@toast-ui/editor": "^2.1.2",
"ant-design-vue": "^1.7.2",
"area-data": "^5.0.6",
"axios": "^0.27.2",
"clipboard": "^2.0.10",
"codemirror": "^5.65.1",
"cron-parser": "^2.10.0",
"@antv/data-set": "^0.11.4",
"viser-vue": "^2.4.8",
"axios": "^0.18.0",
"dayjs": "^1.8.0",
"dircountdown": "^1.1.0",
"dom-align": "1.12.0",
"echarts": "^5.3.0",
"element-ui": "^2.15.6",
"enquire.js": "^2.1.6",
"jquery": "^3.6.0",
"js-cookie": "^2.2.0",
"lodash.get": "^4.4.2",
"lodash.pick": "^4.4.0",
"md5": "^2.2.1",
"nprogress": "^0.2.0",
"qs": "^6.10.3",
"tinymce": "^5.10.3",
"viser-vue": "^2.4.8",
"vue": "^2.6.10",
"vue-area-linkage": "^5.1.0",
"vue-cropper": "^0.5.4",
"vue-i18n": "^8.27.0",
"vue-i18n": "^8.7.0",
"vue-loader": "^15.7.0",
"vue-ls": "^3.2.0",
"vue-photo-preview": "^1.0.9",
"vue-print-nb": "^1.7.5",
"vue-print-nb-jeecg": "^1.0.9",
"vue-router": "^3.0.1",
"vuex": "^3.1.0",
"vue-print-nb-jeecg": "^1.0.10",
"clipboard": "^2.0.4",
"vue-photo-preview": "^1.1.3",
"vue-splitpane": "^1.0.4",
"vuedraggable": "^2.20.0",
"vuex": "^3.1.0",
"codemirror": "^5.46.0",
"@tinymce/tinymce-vue": "2.1.0",
"tinymce": "5.4.1",
"@toast-ui/editor": "^2.1.2",
"vue-area-linkage": "^5.1.0",
"china-area-data": "^5.0.1",
"dom-align": "1.12.0",
"xe-utils": "2.4.8",
"vxe-table": "2.9.13",
"vxe-table-plugin-antd": "1.8.10",
"xe-utils": "2.4.8"
"cron-parser": "^2.10.0",
"qiankun": "^2.5.1",
"xss": "^1.0.13",
"@jiaminghi/data-view": "^2.10.0",
"area-data": "^5.0.6",
"dircountdown": "^1.1.0",
"echarts": "^5.3.0",
"element-ui": "^2.15.6",
"jquery": "^3.6.0",
"qs": "^6.10.3"
},
"devDependencies": {
"@babel/polyfill": "^7.2.5",
"@vue/cli-plugin-babel": "^3.3.0",
"@vue/cli-plugin-eslint": "^5.0.8",
"@vue/cli-service": "^5.0.8",
"@vue/cli-plugin-eslint": "^3.3.0",
"@vue/cli-service": "^3.3.0",
"@vue/eslint-config-standard": "^4.0.0",
"babel-eslint": "7.2.3",
"compression-webpack-plugin": "^10.0.0",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.1.0",
"html-webpack-plugin": "^4.2.0",
"less": "^3.9.0",
"less-loader": "^4.1.0",
"vue-template-compiler": "^2.6.10"
"vue-template-compiler": "^2.6.10",
"html-webpack-plugin": "^4.2.0",
"compression-webpack-plugin": "^3.1.0"
},
"eslintConfig": {
"root": true,
@ -104,10 +106,7 @@
"vue/html-closing-bracket-newline": 0,
"vue/no-parsing-error": 0,
"no-tabs": 0,
"indent": [
"off",
2
],
"indent": ["off", 2],
"no-console": 0,
"space-before-function-paren": 0
}

@ -12,11 +12,14 @@ import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
// YU-优化
require('@jeecg/antd-online-mini')
require('@jeecg/antd-online-mini/dist/OnlineForm.css')
require('@jeecg/antd-online-mini')
require('@jeecg/antd-online-mini/dist/OnlineForm.css')
// 引入 按需组件的统一引入文件
//import './components/use'
import Antd, { version } from 'ant-design-vue'
console.log('ant-design-vue version:', version)
// 按需引入所需组件,统一引入文件---优化
//import './components/lazy_antd'
//console.log('ant-design-vue version:', version)
import Viser from 'viser-vue'
import 'ant-design-vue/dist/antd.less'; // or 'ant-design-vue/dist/antd.less'
@ -24,7 +27,7 @@ import 'ant-design-vue/dist/antd.less'; // or 'ant-design-vue/dist/antd.less'
import '@/permission' // permission control
import '@/utils/filter' // base filter
// YU-优化
//import Print from 'vue-print-nb-jeecg'
import Print from 'vue-print-nb-jeecg'
import preview from 'vue-photo-preview'
import 'vue-photo-preview/dist/skin.css'
import SSO from '@/cas/sso.js'
@ -68,13 +71,15 @@ Vue.prototype.$axios=axios;
Vue.prototype.rules = rules
Vue.config.productionTip = false
Vue.use(Storage, config.storageOptions)
// 按需引入所需组件,统一引入文件---优化
Vue.use(Antd)
Vue.use(ElementUI);
Vue.use(VueAxios, router)
Vue.use(Viser)
Vue.use(hasPermission)
Vue.use(JDictSelectTag)
//Vue.use(Print)
Vue.use(Print)
Vue.use(preview)
Vue.use(vueBus);
Vue.use(JeecgComponents);

@ -0,0 +1,233 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('客户发票信息')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<customer-invoice-modal ref="modalForm" @ok="modalFormOk"></customer-invoice-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import CustomerInvoiceModal from './modules/CustomerInvoiceModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'CustomerInvoiceList',
mixins:[JeecgListMixin, mixinDevice],
components: {
CustomerInvoiceModal
},
data () {
return {
description: '客户发票信息管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'创建日期',
align:"center",
dataIndex: 'createTime'
},
{
title:'用户',
align:"center",
dataIndex: 'userId_dictText'
},
{
title:'客户类型',
align:"center",
dataIndex: 'customerType_dictText'
},
{
title:'发票类型',
align:"center",
dataIndex: 'invoiceType_dictText'
},
{
title:'名称',
align:"center",
dataIndex: 'name'
},
{
title:'纳税人识别号',
align:"center",
dataIndex: 'taxIdentificationNumber'
},
{
title:'地址',
align:"center",
dataIndex: 'address'
},
{
title:'电话',
align:"center",
dataIndex: 'telephone'
},
{
title:'开户行',
align:"center",
dataIndex: 'bankDeposit'
},
{
title:'账号',
align:"center",
dataIndex: 'accountNumber'
},
{
title:'排序',
align:"center",
sorter: true,
dataIndex: 'sort'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/customerinvoice/customerInvoice/listcustom",
delete: "/customerinvoice/customerInvoice/delete",
deleteBatch: "/customerinvoice/customerInvoice/deleteBatch",
exportXlsUrl: "/customerinvoice/customerInvoice/exportXls",
importExcelUrl: "customerinvoice/customerInvoice/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'datetime',value:'createTime',text:'创建日期'})
fieldList.push({type:'sel_user',value:'userId',text:'用户'})
fieldList.push({type:'string',value:'customerType',text:'客户类型',dictCode:'khlx'})
fieldList.push({type:'string',value:'invoiceType',text:'发票类型',dictCode:'fplx'})
fieldList.push({type:'string',value:'name',text:'名称',dictCode:''})
fieldList.push({type:'string',value:'taxIdentificationNumber',text:'纳税人识别号',dictCode:''})
fieldList.push({type:'string',value:'address',text:'地址',dictCode:''})
fieldList.push({type:'string',value:'telephone',text:'电话',dictCode:''})
fieldList.push({type:'string',value:'bankDeposit',text:'开户行',dictCode:''})
fieldList.push({type:'string',value:'accountNumber',text:'账号',dictCode:''})
fieldList.push({type:'int',value:'sort',text:'排序',dictCode:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,158 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="创建日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="createTime">
<j-date placeholder="请选择创建日期" v-model="model.createTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="用户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">
<j-select-user-by-dep v-model="model.userId" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="客户类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="customerType">
<j-dict-select-tag type="list" v-model="model.customerType" dictCode="khlx" placeholder="请选择客户类型" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="发票类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="invoiceType">
<j-dict-select-tag type="list" v-model="model.invoiceType" dictCode="fplx" placeholder="请选择发票类型" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
<a-input v-model="model.name" placeholder="请输入名称" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="纳税人识别号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="taxIdentificationNumber">
<a-input v-model="model.taxIdentificationNumber" placeholder="请输入纳税人识别号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address">
<a-input v-model="model.address" placeholder="请输入地址" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="telephone">
<a-input v-model="model.telephone" placeholder="请输入电话" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="开户行" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bankDeposit">
<a-input v-model="model.bankDeposit" placeholder="请输入开户行" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="账号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="accountNumber">
<a-input v-model="model.accountNumber" placeholder="请输入账号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="排序" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sort">
<a-input-number v-model="model.sort" placeholder="请输入排序" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'CustomerInvoiceForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
telephone: [
{ required: false},
{ pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号码!'},
],
},
url: {
add: "/customerinvoice/customerInvoice/add",
edit: "/customerinvoice/customerInvoice/edit",
queryById: "/customerinvoice/customerInvoice/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<customer-invoice-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></customer-invoice-form>
</j-modal>
</template>
<script>
import CustomerInvoiceForm from './CustomerInvoiceForm'
export default {
name: 'CustomerInvoiceModal',
components: {
CustomerInvoiceForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<customer-invoice-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></customer-invoice-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import CustomerInvoiceForm from './CustomerInvoiceForm'
export default {
name: 'CustomerInvoiceModal',
components: {
CustomerInvoiceForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

@ -0,0 +1,258 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="用户">
<j-select-user-by-dep placeholder="请选择用户" v-model="queryParam.userId"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="量体店铺">
<j-select-depart placeholder="请选择量体店铺" v-model="queryParam.storeId"/>
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="量体设备">
<j-search-select-tag placeholder="请选择量体设备" v-model="queryParam.deviceId" dict="se_equipmenttype,name,id"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="量体师">
<j-select-user-by-dep placeholder="请选择量体师" v-model="queryParam.measurerId"/>
</a-form-item>
</a-col>
</template>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('顾客测体管理')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<customer-measure-modal ref="modalForm" @ok="modalFormOk"></customer-measure-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import CustomerMeasureModal from './modules/CustomerMeasureModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'CustomerMeasureList',
mixins:[JeecgListMixin, mixinDevice],
components: {
CustomerMeasureModal
},
data () {
return {
description: '顾客测体管理管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'用户',
align:"center",
dataIndex: 'userId_dictText'
},
{
title:'排序',
align:"center",
dataIndex: 'sort'
},
{
title:'身高(厘米)',
align:"center",
dataIndex: 'height'
},
{
title:'体重(千克)',
align:"center",
dataIndex: 'weight'
},
{
title:'胸围(厘米)',
align:"center",
dataIndex: 'bust'
},
{
title:'腰围(厘米)',
align:"center",
dataIndex: 'theWaist'
},
{
title:'肩宽(厘米)',
align:"center",
dataIndex: 'shoulderWidth'
},
{
title:'量体时间',
align:"center",
dataIndex: 'measurementTime'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/customermeasure/customerMeasure/listcustom",
delete: "/customermeasure/customerMeasure/delete",
deleteBatch: "/customermeasure/customerMeasure/deleteBatch",
exportXlsUrl: "/customermeasure/customerMeasure/exportXls",
importExcelUrl: "customermeasure/customerMeasure/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'sel_user',value:'userId',text:'用户'})
fieldList.push({type:'int',value:'sort',text:'排序',dictCode:''})
fieldList.push({type:'double',value:'height',text:'身高(厘米)',dictCode:''})
fieldList.push({type:'double',value:'weight',text:'体重(千克)',dictCode:''})
fieldList.push({type:'double',value:'hem',text:'下摆(厘米)',dictCode:''})
fieldList.push({type:'double',value:'cuff',text:'袖口(厘米)',dictCode:''})
fieldList.push({type:'double',value:'sleeveLength',text:'袖长(厘米)',dictCode:''})
fieldList.push({type:'double',value:'bust',text:'胸围(厘米)',dictCode:''})
fieldList.push({type:'double',value:'theWaist',text:'腰围(厘米)',dictCode:''})
fieldList.push({type:'double',value:'shoulderWidth',text:'肩宽(厘米)',dictCode:''})
fieldList.push({type:'double',value:'forebodyLength',text:'前身长(厘米)',dictCode:''})
fieldList.push({type:'double',value:'neck',text:'领围(厘米)',dictCode:''})
fieldList.push({type:'double',value:'hipline',text:'臀围(厘米)',dictCode:''})
fieldList.push({type:'double',value:'length',text:'衣长',dictCode:''})
fieldList.push({type:'double',value:'sternalDistance',text:'胸距',dictCode:''})
fieldList.push({type:'string',value:'measurementMethod',text:'量体方式',dictCode:'ctfs'})
fieldList.push({type:'sel_depart',value:'storeId',text:'量体店铺'})
fieldList.push({type:'sel_search',value:'deviceId',text:'量体设备',dictTable:'se_equipmenttype', dictText:'name', dictCode:'id'})
fieldList.push({type:'sel_user',value:'measurerId',text:'量体师'})
fieldList.push({type:'datetime',value:'measurementTime',text:'量体时间'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,199 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="用户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">
<j-select-user-by-dep v-model="model.userId" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="排序" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sort">
<a-input-number v-model="model.sort" placeholder="请输入排序" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="身高(厘米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="height">
<a-input-number v-model="model.height" placeholder="请输入身高(厘米)" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="体重(千克)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="weight">
<a-input-number v-model="model.weight" placeholder="请输入体重(千克)" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="下摆(厘米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hem">
<a-input-number v-model="model.hem" placeholder="请输入下摆(厘米)" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="袖口(厘米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cuff">
<a-input-number v-model="model.cuff" placeholder="请输入袖口(厘米)" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="袖长(厘米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sleeveLength">
<a-input-number v-model="model.sleeveLength" placeholder="请输入袖长(厘米)" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="胸围(厘米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bust">
<a-input-number v-model="model.bust" placeholder="请输入胸围(厘米)" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="腰围(厘米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="theWaist">
<a-input-number v-model="model.theWaist" placeholder="请输入腰围(厘米)" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="肩宽(厘米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shoulderWidth">
<a-input-number v-model="model.shoulderWidth" placeholder="请输入肩宽(厘米)" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="前身长(厘米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="forebodyLength">
<a-input-number v-model="model.forebodyLength" placeholder="请输入前身长(厘米)" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="领围(厘米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="neck">
<a-input-number v-model="model.neck" placeholder="请输入领围(厘米)" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="臀围(厘米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hipline">
<a-input-number v-model="model.hipline" placeholder="请输入臀围(厘米)" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="衣长" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="length">
<a-input-number v-model="model.length" placeholder="请输入衣长" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="胸距" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sternalDistance">
<a-input-number v-model="model.sternalDistance" placeholder="请输入胸距" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="量体方式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="measurementMethod">
<j-dict-select-tag type="list" v-model="model.measurementMethod" dictCode="ctfs" placeholder="请选择量体方式" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="量体店铺" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="storeId">
<j-select-depart v-model="model.storeId" multi />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="量体设备" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deviceId">
<j-search-select-tag v-model="model.deviceId" dict="se_equipmenttype,name,id" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="量体师" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="measurerId">
<j-select-user-by-dep v-model="model.measurerId" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="量体时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="measurementTime">
<j-date placeholder="请选择量体时间" v-model="model.measurementTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'CustomerMeasureForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/customermeasure/customerMeasure/add",
edit: "/customermeasure/customerMeasure/edit",
queryById: "/customermeasure/customerMeasure/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<customer-measure-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></customer-measure-form>
</j-modal>
</template>
<script>
import CustomerMeasureForm from './CustomerMeasureForm'
export default {
name: 'CustomerMeasureModal',
components: {
CustomerMeasureForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<customer-measure-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></customer-measure-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import CustomerMeasureForm from './CustomerMeasureForm'
export default {
name: 'CustomerMeasureModal',
components: {
CustomerMeasureForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

@ -0,0 +1,246 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="用户">
<j-select-user-by-dep placeholder="请选择用户" v-model="queryParam.userId"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="支付类型">
<j-dict-select-tag placeholder="请选择支付类型" v-model="queryParam.paymentType" dictCode="zflx"/>
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="账号/卡号">
<a-input placeholder="请输入账号/卡号" v-model="queryParam.accountNo"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="开户银行">
<a-input placeholder="请输入开户银行" v-model="queryParam.bankDeposit"></a-input>
</a-form-item>
</a-col>
</template>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('顾客支付信息管理')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<customer-payment-modal ref="modalForm" @ok="modalFormOk"></customer-payment-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import CustomerPaymentModal from './modules/CustomerPaymentModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'CustomerPaymentList',
mixins:[JeecgListMixin, mixinDevice],
components: {
CustomerPaymentModal
},
data () {
return {
description: '顾客支付信息管理管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'创建人',
align:"center",
dataIndex: 'createBy'
},
{
title:'创建日期',
align:"center",
dataIndex: 'createTime'
},
{
title:'更新人',
align:"center",
dataIndex: 'updateBy'
},
{
title:'更新日期',
align:"center",
dataIndex: 'updateTime'
},
{
title:'用户',
align:"center",
dataIndex: 'userId_dictText'
},
{
title:'支付类型',
align:"center",
dataIndex: 'paymentType_dictText'
},
{
title:'账号/卡号',
align:"center",
dataIndex: 'accountNo'
},
{
title:'开户银行',
align:"center",
dataIndex: 'bankDeposit'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/customerpayment/customerPayment/listcustom",
delete: "/customerpayment/customerPayment/delete",
deleteBatch: "/customerpayment/customerPayment/deleteBatch",
exportXlsUrl: "/customerpayment/customerPayment/exportXls",
importExcelUrl: "customerpayment/customerPayment/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'createBy',text:'创建人',dictCode:''})
fieldList.push({type:'datetime',value:'createTime',text:'创建日期'})
fieldList.push({type:'string',value:'updateBy',text:'更新人',dictCode:''})
fieldList.push({type:'datetime',value:'updateTime',text:'更新日期'})
fieldList.push({type:'sel_user',value:'userId',text:'用户'})
fieldList.push({type:'string',value:'paymentType',text:'支付类型',dictCode:'zflx'})
fieldList.push({type:'string',value:'accountNo',text:'账号/卡号',dictCode:''})
fieldList.push({type:'string',value:'bankDeposit',text:'开户银行',dictCode:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,119 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="用户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">
<j-select-user-by-dep v-model="model.userId" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="支付类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="paymentType">
<j-dict-select-tag type="list" v-model="model.paymentType" dictCode="zflx" placeholder="请选择支付类型" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="账号/卡号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="accountNo">
<a-input v-model="model.accountNo" placeholder="请输入账号/卡号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="开户银行" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bankDeposit">
<a-input v-model="model.bankDeposit" placeholder="请输入开户银行" ></a-input>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'CustomerPaymentForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/customerpayment/customerPayment/add",
edit: "/customerpayment/customerPayment/edit",
queryById: "/customerpayment/customerPayment/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<customer-payment-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></customer-payment-form>
</j-modal>
</template>
<script>
import CustomerPaymentForm from './CustomerPaymentForm'
export default {
name: 'CustomerPaymentModal',
components: {
CustomerPaymentForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<customer-payment-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></customer-payment-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import CustomerPaymentForm from './CustomerPaymentForm'
export default {
name: 'CustomerPaymentModal',
components: {
CustomerPaymentForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

@ -0,0 +1,250 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="用户">
<j-select-user-by-dep placeholder="请选择用户" v-model="queryParam.userId"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="收货人">
<a-input placeholder="请输入收货人" v-model="queryParam.receiver"></a-input>
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="联系电话">
<a-input placeholder="请输入联系电话" v-model="queryParam.mobile"></a-input>
</a-form-item>
</a-col>
</template>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('顾客地址表')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="pcaSlot" slot-scope="text">
<div>{{ getPcaText(text) }}</div>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<customer-receiving-address-modal ref="modalForm" @ok="modalFormOk"></customer-receiving-address-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import CustomerReceivingAddressModal from './modules/CustomerReceivingAddressModal'
import Area from '@/components/_util/Area'
export default {
name: 'CustomerReceivingAddressList',
mixins:[JeecgListMixin, mixinDevice],
components: {
CustomerReceivingAddressModal
},
data () {
return {
description: '顾客地址表管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'用户',
align:"center",
dataIndex: 'userId_dictText'
},
{
title:'城市',
align:"center",
dataIndex: 'cityId',
scopedSlots: {customRender: 'pcaSlot'}
},
{
title:'地址',
align:"center",
dataIndex: 'address'
},
{
title:'邮编',
align:"center",
dataIndex: 'zipCode'
},
{
title:'收货人',
align:"center",
dataIndex: 'receiver'
},
{
title:'联系电话',
align:"center",
dataIndex: 'mobile'
},
{
title:'排序',
align:"center",
dataIndex: 'sort'
},
{
title:'标识',
align:"center",
dataIndex: 'labelcl'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/customerreceivingaddress/customerReceivingAddress/listcustom",
delete: "/customerreceivingaddress/customerReceivingAddress/delete",
deleteBatch: "/customerreceivingaddress/customerReceivingAddress/deleteBatch",
exportXlsUrl: "/customerreceivingaddress/customerReceivingAddress/exportXls",
importExcelUrl: "customerreceivingaddress/customerReceivingAddress/importExcel",
},
dictOptions:{},
pcaData:'',
superFieldList:[],
}
},
created() {
this.pcaData = new Area()
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
getPcaText(code){
return this.pcaData.getText(code);
},
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'sel_user',value:'userId',text:'用户'})
fieldList.push({type:'pca',value:'cityId',text:'城市'})
fieldList.push({type:'string',value:'address',text:'地址',dictCode:''})
fieldList.push({type:'string',value:'zipCode',text:'邮编',dictCode:''})
fieldList.push({type:'string',value:'receiver',text:'收货人',dictCode:''})
fieldList.push({type:'string',value:'mobile',text:'联系电话',dictCode:''})
fieldList.push({type:'int',value:'sort',text:'排序',dictCode:''})
fieldList.push({type:'string',value:'labelcl',text:'标识',dictCode:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,143 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="用户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">
<j-select-user-by-dep v-model="model.userId" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="城市" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cityId">
<j-area-linkage type="cascader" v-model="model.cityId" placeholder="请输入省市区" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address">
<a-input v-model="model.address" placeholder="请输入地址" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="邮编" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="zipCode">
<a-input v-model="model.zipCode" placeholder="请输入邮编" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="收货人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="receiver">
<a-input v-model="model.receiver" placeholder="请输入收货人" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="联系电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mobile">
<a-input v-model="model.mobile" placeholder="请输入联系电话" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="排序" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sort">
<a-input-number v-model="model.sort" placeholder="请输入排序" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="标识" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="labelcl">
<a-input v-model="model.labelcl" placeholder="请输入标识" ></a-input>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'CustomerReceivingAddressForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
mobile: [
{ required: false},
{ pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号码!'},
],
},
url: {
add: "/customerreceivingaddress/customerReceivingAddress/add",
edit: "/customerreceivingaddress/customerReceivingAddress/edit",
queryById: "/customerreceivingaddress/customerReceivingAddress/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<customer-receiving-address-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></customer-receiving-address-form>
</j-modal>
</template>
<script>
import CustomerReceivingAddressForm from './CustomerReceivingAddressForm'
export default {
name: 'CustomerReceivingAddressModal',
components: {
CustomerReceivingAddressForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<customer-receiving-address-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></customer-receiving-address-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import CustomerReceivingAddressForm from './CustomerReceivingAddressForm'
export default {
name: 'CustomerReceivingAddressModal',
components: {
CustomerReceivingAddressForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

@ -138,7 +138,6 @@
return {
selectedRows: [],
totalPrice: 0,
ssrjian: 0,
description: '购物车管理页面',
//
columns: [
@ -217,7 +216,6 @@
this.selectedRowKeys = selectedRowKeys
},
onSelect(record, selected) {
var ssr
// push
if (selected) {
this.selectedRows.push(record)
@ -227,8 +225,8 @@
let index = this.selectedRows.findIndex((item) => item.id == record.id)
if (index >= 0) {
this.selectedRows.splice(index, 1)
this.ssrjian = record.number*record.price
this.totalPrice=this.totalPrice- this.ssrjian
this.totalPrice=this.totalPrice- record.number*record.price
}
}

@ -0,0 +1,257 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="用户">
<j-select-user-by-dep placeholder="请选择用户" v-model="queryParam.userId"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="商品">
<j-search-select-tag placeholder="请选择商品" v-model="queryParam.goodsId" dict="zy_goods,goods_name,id"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('购物车')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,onSelect: onSelect}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
<div class="card-end">
总计<span style="color: red;font-size: 20px">{{ totalPrice }}</span
>
</div>
</div>
<customer-shopping-cart-modal ref="modalForm" @ok="modalFormOk"></customer-shopping-cart-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import CustomerShoppingCartModal from './modules/CustomerShoppingCartModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'CustomerShoppingCartList',
mixins:[JeecgListMixin, mixinDevice],
components: {
CustomerShoppingCartModal
},
data () {
return {
selectedRows: [],
totalPrice: 0,
description: '购物车管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
/*{
title:'图片',
align:"center",
dataIndex: 'temiimg',
scopedSlots: {customRender: 'imgSlot'}
},*/
{
title:'创建日期',
align:"center",
dataIndex: 'createTime'
},
{
title:'用户',
align:"center",
dataIndex: 'userId_dictText'
},
{
title:'商品',
align:"center",
dataIndex: 'goodsId_dictText'
},
{
title:'当前单价',
align:"center",
dataIndex: 'price'
},
{
title:'数量',
align:"center",
dataIndex: 'number'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/customershoppingcart/customerShoppingCart/listcust",
delete: "/customershoppingcart/customerShoppingCart/delete",
deleteBatch: "/customershoppingcart/customerShoppingCart/deleteBatch",
exportXlsUrl: "/customershoppingcart/customerShoppingCart/exportXls",
importExcelUrl: "customershoppingcart/customerShoppingCart/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
onSelectChange(selectedRowKeys) {
this.selectedRowKeys = selectedRowKeys
},
onSelect(record, selected) {
// push
if (selected) {
this.selectedRows.push(record)
this.totalPrice=this.totalPrice+(record.number*record.price)
} else {
//
let index = this.selectedRows.findIndex((item) => item.id == record.id)
if (index >= 0) {
this.selectedRows.splice(index, 1)
this.totalPrice=this.totalPrice- record.number*record.price
}
}
},
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'datetime',value:'createTime',text:'创建日期'})
fieldList.push({type:'sel_user',value:'userId',text:'用户'})
fieldList.push({type:'sel_search',value:'goodsId',text:'商品',dictTable:'zy_goods', dictText:'goods_name', dictCode:'id'})
fieldList.push({type:'double',value:'price',text:'当前单价',dictCode:''})
fieldList.push({type:'int',value:'number',text:'数量',dictCode:''})
fieldList.push({type:'string',value:'temp1',text:'中间字段临时存储',dictCode:''})
fieldList.push({type:'string',value:'temp2',text:'中间字段临时存储',dictCode:''})
fieldList.push({type:'string',value:'temp3',text:'中间字段临时存储',dictCode:''})
fieldList.push({type:'string',value:'temp4',text:'中间字段临时存储',dictCode:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,150 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="图片字段" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="temiimg">
<j-image-upload isMultiple v-model="model.temiimg" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="创建日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="createTime">
<j-date placeholder="请选择创建日期" v-model="model.createTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" disabled/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="用户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">
<j-select-user-by-dep v-model="model.userId" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="商品" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="goodsId">
<j-search-select-tag v-model="model.goodsId" dict="zy_goods,goods_name,id" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="当前单价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="price">
<a-input-number v-model="model.price" placeholder="请输入当前单价" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="number">
<a-input-number v-model="model.number" placeholder="请输入数量" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="面料" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="temp1">
<a-input v-model="model.temp1" placeholder="请输入面料" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="发货地" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="temp2">
<a-input v-model="model.temp2" placeholder="请输入中间字段临时存储" disabled></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="中间字段临时存储" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="temp3">
<a-input v-model="model.temp3" placeholder="发货地" disabled ></a-input>
</a-form-model-item>
</a-col>
<!-- <a-col :span="24">
<a-form-model-item label="中间字段临时存储" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="temp4">
<a-input v-model="model.temp4" placeholder="请输入中间字段临时存储" ></a-input>
</a-form-model-item>
</a-col>-->
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'CustomerShoppingCartForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/customershoppingcart/customerShoppingCart/add",
edit: "/customershoppingcart/customerShoppingCart/edit",
queryById: "/customershoppingcart/customerShoppingCart/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<customer-shopping-cart-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></customer-shopping-cart-form>
</j-modal>
</template>
<script>
import CustomerShoppingCartForm from './CustomerShoppingCartForm'
export default {
name: 'CustomerShoppingCartModal',
components: {
CustomerShoppingCartForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<customer-shopping-cart-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></customer-shopping-cart-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import CustomerShoppingCartForm from './CustomerShoppingCartForm'
export default {
name: 'CustomerShoppingCartModal',
components: {
CustomerShoppingCartForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

@ -4,6 +4,22 @@
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="编号">
<a-input placeholder="编号" v-model="queryParam.nums"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="名称">
<a-input placeholder="名称" v-model="queryParam.contents"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
@ -161,7 +177,7 @@
{
title:'供货商信息',
align:"center",
dataIndex: 'supplierInfo'
dataIndex: 'supplierInfo_dictText'
},
{
title: '操作',

@ -3,8 +3,24 @@
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="编号">
<a-input placeholder="请输入编号" v-model="queryParam.nums"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="名称">
<a-input placeholder="请输入名称" v-model="queryParam.contents"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->

@ -52,9 +52,14 @@
<a-input-number v-model="model.store" placeholder="请输入库存量" style="width: 100%" />
</a-form-model-item>
</a-col>
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="供货商信息" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="supplierInfo">-->
<!-- <a-input v-model="model.supplierInfo" placeholder="请输入供货商信息" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<a-col :span="24">
<a-form-model-item label="供货商信息" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="supplierInfo">
<a-input v-model="model.supplierInfo" placeholder="请输入供货商信息" ></a-input>
<j-select-depart v-model="model.supplierInfo" placeholder="请输入供货商信息" />
</a-form-model-item>
</a-col>
</a-row>
@ -104,6 +109,10 @@
contents: [
{ required: true, message: '请输入名称!'},
],
store: [
{
pattern: /^\d*\.?\d+$/,message:'请输入正数'
}],
},
url: {
add: "/accessories/zyAccessories/add",

@ -63,12 +63,12 @@
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="零售价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="retailPrice">
<a-form-model-item label="零售价(元)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="retailPrice">
<a-input-number v-model="model.retailPrice" placeholder="请输入零售价" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="unit">
<a-form-model-item label="单位(元)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="unit">
<j-dict-select-tag v-model="model.unit" type="radioButton" title="单位" dictCode="unit1" />
</a-form-model-item>
</a-col>
@ -83,7 +83,7 @@
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="幅宽" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clothW">
<a-form-model-item label="幅宽(米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clothW">
<j-search-select-tag v-model="model.clothW" dict="clothW" />
</a-form-model-item>
</a-col>
@ -189,6 +189,14 @@
name: [
{ required: true, message: '请输入名称!'},
],
money: [
{ required: true, message: '请输入单价!'},
{pattern: /^\d+$/,message:'请输入正整数'}
],
retailPrice: [
{ required: true, message: '请输入零售价!'},
{pattern: /^\d+$/,message:'请输入正整数'}
],
// money: [
// { required: false},
// { pattern: /^\d{0,11}$/, message: '11'},

@ -29,7 +29,7 @@
import { httpAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
import { Print } from 'vue-print-nb'
import { Print } from 'vue-print-nb-jeecg'
export default {
name: "MakerQRCode",
components: {

@ -10,9 +10,16 @@
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="类型名称">
<a-input placeholder="请输入类型名称" v-model="queryParam.typeName" ></a-input>
<a-form-item label="类型名称" >
<j-tree-select v-model="queryParam.id"
dict="zy_cloths_type,type_name,id"
pidField="type_id"
placeholder="请选择类型名称" >
</j-tree-select>
</a-form-item>
<!-- <a-form-item label="类型名称">-->
<!-- <a-input placeholder="请输入类型名称" v-model="queryParam.typeName" ></a-input>-->
<!-- </a-form-item>-->
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="企业名称">
@ -111,6 +118,8 @@
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ZyClothsTypeModal from './modules/ZyClothsTypeModal'
import {filterObj} from "@/utils/util";
import {getAction} from "@api/manage";
export default {
name: 'ZyClothsTypeList',
@ -147,7 +156,7 @@
title:'类型名称',
align:"center",
dataIndex: 'typeName',
sorter:true
sorter:true,
},
{
title:'企业',
@ -174,7 +183,6 @@
deleteBatch: "/base/zyClothsType/deleteBatch",
exportXlsUrl: "/base/zyClothsType/exportXls",
importExcelUrl: "base/zyClothsType/importExcel",
},
dictOptions:{},
superFieldList:[],
@ -182,6 +190,7 @@
},
created() {
this.getSuperFieldList();
// this.loadParameter();
},
computed: {
importExcelUrl: function(){

@ -10,6 +10,21 @@
v-model="styleId"></j-dict-select-tag>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="工序代码">
<a-input placeholder="工序代码" v-model="processCode"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="工序名称">
<a-input placeholder="工序名称" v-model="processName"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">
<j-select-depart v-model="enterpriseId" placeholder="请输入企业名称" />
</a-form-model-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
@ -312,6 +327,9 @@ export default {
//
loadRouteType: false,
styleId: "",
processCode:'',
processName:'',
enterpriseId:'',
dictOptions: {},
superFieldList: [],
}
@ -378,8 +396,18 @@ export default {
param.pageNo = this.ipagination.current;
param.pageSize = this.ipagination.pageSize;
param.styleId = this.styleId;
param.enterpriseId=this.enterpriseId;
param.processCode=this.processCode;
param.processName=this.processName;
return filterObj(param);
},
searchReset() {
this.styleId = ''
this.processCode = ''
this.processName = ''
this.enterpriseId = ''
this.loadData(1);
},
getSuperFieldList() {
let fieldList = [];
fieldList.push({type: 'string', value: 'processCode', text: '工序代码', dictCode: ''})

@ -75,12 +75,15 @@
validatorRules: {
freq: [
{ required: true, message: '请输入频率!'},
{pattern: /^\d+$/,message:'请输入正整数'}
],
machineTmu: [
{ required: true, message: '请输入机器TMU!'},
{pattern: /^\d+$/,message:'请输入正整数'}
],
manualTmu: [
{ required: true, message: '请输入手工TMU!'},
{pattern: /^\d+$/,message:'请输入正整数'}
],
nums: [
{ required: true, message: '请输入编号!'},

@ -5,7 +5,12 @@
<a-row>
<a-col :span="24">
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">
<j-select-depart v-model="model.enterpriseId" />
<j-select-depart v-model="model.enterpriseId" @change="bianhao" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="nums">
<a-input v-model="model.nums" placeholder="请输入编号" disabled ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
@ -18,11 +23,7 @@
{{ typeId }}
</a-form-item>
</a-col>
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="nums">-->
<!-- <a-input v-model="model.nums" placeholder="请输入编号" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<a-col :span="24">
<a-form-model-item label="类型名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeName">
<a-input v-model="model.typeName" placeholder="请输入类型名称" ></a-input>
@ -62,6 +63,7 @@
data () {
return {
model:{
nums:''
},
typeId:"",
labelCol: {
@ -79,7 +81,7 @@
// ],
typeName: [
{ required: true, message: '请输入类型名称!'},
{ pattern: /^[0-9A-Za-z\u4e00-\u9fa5.,;,。;、!?]{0,5}$/, message: '文本长度过长'},
{ pattern: /^[0-9A-Za-z\u4e00-\u9fa5.,;,。;、!?]{0,50}$/, message: '文本长度过长'},
],
enterpriseId: [
{ required: true, message: '请输入企业!'},
@ -88,7 +90,8 @@
url: {
add: "/base/zyClothsType/add",
edit: "/base/zyClothsType/edit",
queryById: "/base/zyClothsType/queryById"
queryById: "/base/zyClothsType/queryById",
weiyi:"/base/zyClothsType/weiyi"
}
}
},
@ -102,6 +105,20 @@
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
bianhao(){
var n=6
getAction(this.url.weiyi,null).then((res)=>{
var num=parseInt(res.result,10)+1
console.log(num)
num=num.toString()
while(num.length<n){
num="0"+num
}
console.log(num)
this.model.nums="QIYE"+num;
})
},
add () {
this.edit(this.modelDefault);
},

@ -157,6 +157,11 @@
align:"center",
dataIndex: 'nums'
},
{
title:'顺序',
align:"center",
dataIndex: 'sortAction'
},
{
title:'动作',
align:"center",
@ -207,6 +212,7 @@
up(id){
getAction(this.url.up,{id:id}).then((res)=>{
if(res.success){
this.loadData();
this.$message.success(res.message);
}else{
this.$message.warning(res.message);
@ -215,6 +221,7 @@
down(id){
getAction(this.url.down,{id:id}).then((res)=>{
if(res.success){
this.loadData();
this.$message.success(res.message);
}else{
this.$message.warning(res.message);

@ -1,14 +1,14 @@
<template>
<a-spin :spinning="confirmLoading">
<a-spin :spinning="confirmLoading" style="padding: 10px 20px">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-row type="flex" justify="space-between">
<a-col :span="11">
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">
<j-select-depart v-model="model.enterpriseId" placeholder="请输入企业名称" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="12">
<a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId">
<j-popup
v-model="model.typeName"
@ -22,43 +22,36 @@
</a-form-model-item>
<a-input v-model="model.styleId" hidden/>
</a-col>
<a-col :span="24">
<a-col :span="11">
<a-form-model-item label="工序代码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processCode">
<a-input v-model="model.processCode" placeholder="请输入工序代码" disabled></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="12">
<a-form-model-item label="工序名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processName">
<a-input v-model="model.processName" placeholder="请输入工序名称" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="工艺描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processDescribe">
<a-textarea v-model="model.processDescribe" rows="4" placeholder="请输入工艺描述"/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="做工说明" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mkExplain">
<a-textarea v-model="model.mkExplain" rows="4" placeholder="请输入做工说明"/>
</a-form-model-item>
</a-col>
<a-col :span="24">
</a-row>
<a-row type="flex" justify="space-between">
<a-col :span="11">
<a-form-model-item label="品质要求" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="qualityRequire">
<a-input v-model="model.qualityRequire" placeholder="请输入品质要求" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="工序时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processTime">
<a-col :span="12">
<a-form-model-item label="工序时间(秒)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processTime">
<a-input v-model="model.processTime" placeholder="请输入工序时间" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="工序单价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="price">
<a-col :span="11">
<a-form-model-item label="工序单价(元)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="price">
<a-input-number v-model="model.price" placeholder="请输入工序单价" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="工序等级" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="grade">
<a-col :span="12">
<a-form-model-item label="工序等级(键值对)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="grade">
<a-input v-model="model.grade" placeholder="请输入工序等级" ></a-input>
</a-form-model-item>
</a-col>
@ -72,52 +65,52 @@
<!-- <a-input v-model="model.fabricGrade" placeholder="请输入面料等级" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<a-col :span="24">
<a-col :span="11">
<a-form-model-item label="针距(针/厘米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="needlePitch">
<a-input-number v-model="model.needlePitch" placeholder="请输入针距(针/厘米)" style="width: 100%" />
</a-form-model-item>
</a-col>
<!-- <a-col :span="24">-->
<!-- <a-col :span="11">-->
<!-- <a-form-model-item label="机器名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="machineId">-->
<!-- <j-dict-select-tag type="list" v-model="model.machineId" dictCode="zy_devicetype,name,id" placeholder="请选择机器名" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<a-col :span="24">
<a-form-model-item label="手工宽放" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="manualWide">
<a-col :span="12">
<a-form-model-item label="手工宽放(毫米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="manualWide">
<a-input v-model="model.manualWide" placeholder="请输入手工宽放" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="手工时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="manualTime">
<a-col :span="11">
<a-form-model-item label="手工时间(秒)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="manualTime">
<a-input-number v-model="model.manualTime" placeholder="请输入手工时间" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="机器转速" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="machineSpeed">
<a-col :span="12">
<a-form-model-item label="机器转速(转/分钟)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="machineSpeed">
<a-input-number v-model="model.machineSpeed" placeholder="请输入机器转速" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="机器宽放" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="machineWide">
<a-col :span="11">
<a-form-model-item label="机器宽放(毫米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="machineWide">
<a-input v-model="model.machineWide" placeholder="请输入机器宽放" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="机器时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="machineTime">
<a-col :span="12">
<a-form-model-item label="机器时间(秒)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="machineTime">
<a-input-number v-model="model.machineTime" placeholder="请输入机器时间" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="机器浮于" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="machineFloat">
<a-input v-model="model.machineFloat" placeholder="请输入机器浮于" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="绑包宽放" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bundleWide">
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="机器浮于" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="machineFloat">-->
<!-- <a-input v-model="model.machineFloat" placeholder="请输入机器浮于" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<a-col :span="11">
<a-form-model-item label="绑包宽放(毫米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bundleWide">
<a-input v-model="model.bundleWide" placeholder="请输入绑包宽放" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="12">
<a-form-model-item label="绑包时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bundleTime">
<a-input v-model="model.bundleTime" placeholder="请输入绑包时间" ></a-input>
</a-form-model-item>
@ -153,12 +146,12 @@
<!-- <j-dict-select-tag v-model="model.styleId" placeholder="请输入款式名称" dictCode="zy_cloths_style,style_names,id" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<a-col :span="24">
<a-col :span="11">
<a-form-model-item label="工段代码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="worksectionCode">
<a-input v-model="model.worksectionCode" placeholder="请输入工段代码" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="12">
<a-form-model-item label="工序类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processType">
<j-dict-select-tag type="radio" v-model="model.processType" dictCode="processType" placeholder="" />
</a-form-model-item>
@ -168,37 +161,54 @@
<!-- <a-input v-model="model.contractNum" placeholder="请输入合同号" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<a-col :span="24">
<a-col :span="11">
<a-form-model-item label="合计(手工TMU)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="totalManualTmu">
<a-input-number v-model="model.totalManualTmu" placeholder="请输入合计(手工TMU)" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="12">
<a-form-model-item label="合计(机器TMU)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="totalMachineTmu">
<a-input-number v-model="model.totalMachineTmu" placeholder="请输入合计(机器TMU)" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="11">
<a-form-model-item label="合计(手工秒)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="totalMaunal">
<a-input-number v-model="model.totalMaunal" placeholder="请输入合计(手工秒)" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="12">
<a-form-model-item label="合计(机器秒)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="totalMachine">
<a-input-number v-model="model.totalMachine" placeholder="请输入合计(机器秒)" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24" class='coin'>
</a-row>
<a-row>
<a-col :span="48">
<a-form-model-item label="工艺描述" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="processDescribe">
<a-textarea v-model="model.processDescribe" rows="2" placeholder="请输入工艺描述"/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="48">
<a-form-model-item label="做工说明" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="mkExplain">
<a-textarea v-model="model.mkExplain" rows="2" placeholder="请输入做工说明"/>
</a-form-model-item>
</a-col>
</a-row>
<a-row type="flex" align="middle" class="imageDiv">
<a-col :span="8">
<a-form-model-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="image" >
<j-image-upload isMultiple v-model="model.image" ></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="8">
<a-form-model-item label="视频" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="vedio">
<j-upload v-model="model.vedio" ></j-upload>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
@ -236,12 +246,30 @@
xs: { span: 24 },
sm: { span: 16 },
},
labelCol1: {
xs: { span: 24 },
sm: { span: 3 },
},
wrapperCol1: {
xs: { span: 24 },
sm: { span: 21 },
},
labelCol2: {
xs: { span: 24 },
sm: { span: 3 },
},
wrapperCol2: {
xs: { span: 24 },
sm: { span: 21 },
},
confirmLoading: false,
validatorRules: {
fabricNum: [
{ required: true, message: '请输入面料代码!'},
],
price:[{
pattern: /^\d*\.?\d+$/,message:'请输入正数'
},],
processCode: [
{ required: true, message: '请输入工序代码!'},
],
@ -324,4 +352,9 @@
},
}
}
</script>
</script>
<style scoped>
/deep/ .imageDiv .ant-row{
margin-bottom: 0;
}
</style>

@ -23,7 +23,7 @@
data () {
return {
title:'',
width:800,
width:1000,
visible: false,
disableSubmit: false
}

@ -0,0 +1,269 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="工序名称">
<a-input placeholder="工序名称" v-model="processId"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<!-- <a-button type="primary" icon="download" @click="handleExportXls('产品工序')">导出</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
<a-divider type="vertical" />
<a @click="up(record.id)">升序</a>
<a-divider type="vertical" />
<a @click="down(record.id)">降序</a>
</span>
</a-table>
</div>
<zy-product-process-modal @valueChange="valueChange" ref="modalForm" @ok="modalFormOk"></zy-product-process-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ZyProductProcessModal from './modules/ZyProductProcessModal'
import {getAction} from "@api/manage";
import {filterObj} from "@/utils/util";
export default {
name: 'ZyProductProcessList',
mixins:[JeecgListMixin, mixinDevice],
components: {
ZyProductProcessModal
},
data () {
return {
description: '产品工序管理页面',
//
columns: [
{
processId:'',
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'产品编号',
align:"center",
dataIndex: 'productId_dicText'
},
{
title:'工序名称',
align:"center",
dataIndex: 'processId_dictText'
},
{
title:'序号',
align:"center",
dataIndex: 'number'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/zyproductprocess/zyProductProcess/list",
delete: "/zyproductprocess/zyProductProcess/delete",
deleteBatch: "/zyproductprocess/zyProductProcess/deleteBatch",
exportXlsUrl: "/zyproductprocess/zyProductProcess/exportXls",
importExcelUrl: "/zyproductprocess/zyProductProcess/importExcel",
up: "/zyproductprocess/zyProductProcess/up",
down: "/zyproductprocess/zyProductProcess/down"
},
dictOptions:{},
superFieldList:[],
loadRouteType: false,
}
},
created() {
this.loadParameter();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
up(id){
getAction(this.url.up,{id:id}).then((res)=>{
if(res.success){
this.loadData();
this.$message.success(res.message);
}else{
this.$message.warning(res.message);
}
})},
down(id){
getAction(this.url.down,{id:id}).then((res)=>{
if(res.success){
this.loadData();
this.$message.success(res.message);
}else{
this.$message.warning(res.message);
}
})},
initDictConfig(){
},
valueChange(value){
if (value) this.loadData()
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'productId',text:'产品id',dictCode:''})
fieldList.push({type:'string',value:'processId',text:'工序id',dictCode:''})
fieldList.push({type:'int',value:'number',text:'序号',dictCode:''})
this.superFieldList = fieldList
},
loadParameter() {
if (this.loadRouteType === false) {
this.id = this.$route.query.id;
console.log("***********")
this.loadRouteType = true;
}
},
loadData(arg) {
if (!this.url.list) {
this.$message.error("请设置url.list属性!");
return
}
// 1
if (arg === 1) {
this.ipagination.current = 1;
}
this.loadParameter();
var params = this.getQueryParams();//
this.loading = true;
getAction(this.url.list, params).then((res) => {
if (res.success) {
//update-begin---author:zhangyafei Date:20201118 for------------
this.dataSource = res.result.records || res.result;
if (res.result.total) {
this.ipagination.total = res.result.total;
} else {
this.ipagination.total = 0;
}
//update-end---author:zhangyafei Date:20201118 for------------
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
},
getQueryParams() {
//
let sqp = {}
if (this.superQueryParams) {
sqp['superQueryParams'] = encodeURI(this.superQueryParams)
sqp['superQueryMatchType'] = this.superQueryMatchType
}
var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters);
param.field = this.getQueryField();
param.pageNo = this.ipagination.current;
param.pageSize = this.ipagination.pageSize;
//param.id=this.id;
param.productId = this.$route.query.id;
param.processId=this.processId;
return filterObj(param);
},
searchReset() {
this.processId = ''
this.loadData(1);
},
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,301 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!-- <a-form-item label="服装类型">-->
<!-- <j-dict-select-tag placeholder="请选择服装款式" dictCode="zy_cloths_type,type_name,nums"-->
<!-- v-model="styleId"></j-dict-select-tag>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="工序代码">
<a-input placeholder="工序代码" v-model="processCode"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="工序名称">
<a-input placeholder="工序名称" v-model="processName"></a-input>
</a-form-item>
</a-col>
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!-- <a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">-->
<!-- <j-select-depart v-model="enterpriseId" placeholder="请输入企业名称" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
<!-- <a-button type="primary" icon="download" @click="handleExportXls('zy_process')">导出</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal"
@handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel">
<a-icon type="delete"/>
删除
</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作
<a-icon type="down"/>
</a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a
style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange1}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt=""
style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<!-- 新建一个管理列-->
<!-- <span slot="action1" slot-scope="text, record">-->
<!-- -->
<!-- </span>-->
</a-table>
</div>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import {getAction} from "@api/manage";
import {filterObj} from "@/utils/util";
export default {
name: 'ZyProcessList',
mixins: [JeecgListMixin, mixinDevice],
components: {
},
data() {
return {
description: 'zy_process管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: "center",
customRender: function (t, r, index) {
return parseInt(index) + 1;
}
},
{
title: '工序代码',
align: "center",
dataIndex: 'processCode'
},
{
title: '工序名称',
align: "center",
dataIndex: 'processName'
},
],
url: {
list: "/base/zyProcess/list",
delete: "/base/zyProcess/delete",
deleteBatch: "/base/zyProcess/deleteBatch",
exportXlsUrl: "/base/zyProcess/exportXls",
importExcelUrl: "base/zyProcess/importExcel",
},
//
loadRouteType: false,
styleId: "",
processCode:'',
processName:'',
enterpriseId:'',
dictOptions: {},
superFieldList: [],
}
},
created() {
// queryParam.styleId=this.styleId
// this.getSuperFieldList();
this.loadParameter();
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig() {
},
onSelectChange1(selectedRowKeys, selectionRows) {
this.selectedRowKeys = selectedRowKeys;
this.selectionRows = selectionRows;
let ids = "";
for (var a = 0; a < this.selectedRowKeys.length; a++) {
ids += this.selectedRowKeys[a] + ",";
}
this.$emit('onChangeRowKey',ids)
},
//
loadParameter() {
if (this.loadRouteType == false) {
this.styleId = this.$route.query.styleId;
console.log(this.styleId)
this.loadRouteType = true;
}
},
loadData(arg) {
if (!this.url.list) {
this.$message.error("请设置url.list属性!")
return
}
// 1
if (arg === 1) {
this.ipagination.current = 1;
}
this.loadParameter();
var params = this.getQueryParams();//
this.loading = true;
getAction(this.url.list, params).then((res) => {
if (res.success) {
//update-begin---author:zhangyafei Date:20201118 for------------
this.dataSource = res.result.records || res.result;
if (res.result.total) {
this.ipagination.total = res.result.total;
} else {
this.ipagination.total = 0;
}
//update-end---author:zhangyafei Date:20201118 for------------
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
},
getQueryParams() {
//
let sqp = {}
if (this.superQueryParams) {
sqp['superQueryParams'] = encodeURI(this.superQueryParams)
sqp['superQueryMatchType'] = this.superQueryMatchType
}
var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters);
param.field = this.getQueryField();
param.pageNo = this.ipagination.current;
param.pageSize = this.ipagination.pageSize;
param.styleId = this.styleId;
param.enterpriseId=this.enterpriseId;
param.processCode=this.processCode;
param.processName=this.processName;
return filterObj(param);
},
searchReset() {
this.styleId = ''
this.processCode = ''
this.processName = ''
this.enterpriseId = ''
this.loadData(1);
},
getSuperFieldList() {
let fieldList = [];
fieldList.push({type: 'string', value: 'processCode', text: '工序代码', dictCode: ''})
fieldList.push({type: 'string', value: 'processName', text: '工序名称', dictCode: ''})
fieldList.push({type: 'string', value: 'processDescribe', text: '工艺描述', dictCode: ''})
fieldList.push({type: 'string', value: 'mkExplain', text: '做工说明', dictCode: ''})
fieldList.push({type: 'string', value: 'qualityRequire', text: '品质要求', dictCode: ''})
fieldList.push({type: 'string', value: 'processTime', text: '工序时间', dictCode: ''})
fieldList.push({type: 'double', value: 'price', text: '工序单价', dictCode: ''})
fieldList.push({type: 'string', value: 'grade', text: '工序等级', dictCode: ''})
fieldList.push({type: 'string', value: 'fabricNum', text: '面料代码', dictCode: ''})
fieldList.push({type: 'string', value: 'fabricGrade', text: '面料等级', dictCode: ''})
fieldList.push({type: 'int', value: 'needlePitch', text: '针距(针/厘米)', dictCode: ''})
fieldList.push({type: 'string', value: 'machineId', text: '机器名', dictCode: 'zy_machine,name,id'})
fieldList.push({type: 'string', value: 'manualWide', text: '手工宽放', dictCode: ''})
fieldList.push({type: 'double', value: 'manualTime', text: '手工时间', dictCode: ''})
fieldList.push({type: 'int', value: 'machineSpeed', text: '机器转速', dictCode: ''})
fieldList.push({type: 'string', value: 'machineWide', text: '机器宽放', dictCode: ''})
fieldList.push({type: 'double', value: 'machineTime', text: '机器时间', dictCode: ''})
fieldList.push({type: 'string', value: 'machineFloat', text: '机器浮于', dictCode: ''})
fieldList.push({type: 'string', value: 'bundleWide', text: '绑包宽放', dictCode: ''})
fieldList.push({type: 'string', value: 'bundleTime', text: '绑包时间', dictCode: ''})
fieldList.push({type: 'string', value: 'componentId', text: '部件表', dictCode: 'zy_cloths_component,parts_name,id'})
fieldList.push({type: 'int', value: 'isBottleneck', text: '是否为瓶颈工序', dictCode: ''})
fieldList.push({type: 'string', value: 'enterpriseId', text: '企业名称', dictCode: ''})
fieldList.push({type: 'string', value: 'toolId', text: '工具名称', dictCode: 'zy_tool,name,id'})
fieldList.push({type: 'string', value: 'styleId', text: '款式名称', dictCode: ''})
fieldList.push({type: 'string', value: 'worksectionCode', text: '工段代码', dictCode: ''})
fieldList.push({type: 'string', value: 'contractNum', text: '合同号', dictCode: ''})
fieldList.push({type: 'int', value: 'totalManualTmu', text: '合计(手工TMU)', dictCode: ''})
fieldList.push({type: 'int', value: 'totalMachineTmu', text: '合计(机器TMU)', dictCode: ''})
fieldList.push({type: 'int', value: 'totalMaunal', text: '合计(手工秒)', dictCode: ''})
fieldList.push({type: 'int', value: 'totalMachine', text: '合计(机器秒)', dictCode: ''})
fieldList.push({type: 'string', value: 'image', text: '图片', dictCode: ''})
fieldList.push({type: 'string', value: 'vedio', text: '视频', dictCode: ''})
this.superFieldList = fieldList
},
openDetail(id) {
this.$refs.zyProcessDetail.showModal(id)
// this.$children[0].showModal(id)
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,114 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="产品id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productId">
<a-input v-model="model.productId" placeholder="请输入产品id" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="工序id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processId">
<a-input v-model="model.processId" placeholder="请输入工序id" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="序号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="number">
<a-input-number v-model="model.number" placeholder="请输入序号" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'ZyProductProcessForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/zyproductprocess/zyProductProcess/add",
edit: "/zyproductprocess/zyProductProcess/edit",
queryById: "/zyproductprocess/zyProductProcess/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

@ -0,0 +1,79 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<zy-process-list ref="realForm" @onChangeRowKey="chuancan" @ok="submitCallback" :disabled="disableSubmit"></zy-process-list>
</j-modal>
</template>
<script>
import ZyProcessList from './ZyProcessList'
import {postAction} from "@api/manage";
export default {
name: 'ZyProductProcessModal',
components: {
ZyProcessList
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false,
model:{
productId:'',
processId:''
},
url:{
add: "/zyproductprocess/zyProductProcess/add",
},
}
},
created(){
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
})
},
edit (record) {
this.visible=true
},
close () {
this.$emit('close');
this.visible = false;
},
chuancan(res){
this.model.processId=res;
console.log(res)
},
handleOk () {
this.model.productId = this.$route.query.id
postAction(this.url.add,this.model).then((res)=>{
if(res.success){
this.$message.success(res.message);
}else{
this.$message.warning(res.message);
}
this.$emit('valueChange',1)
this.close()
})},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<zy-product-process-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></zy-product-process-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import ZyProductProcessForm from './ZyProductProcessForm'
export default {
name: 'ZyProductProcessModal',
components: {
ZyProductProcessForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

@ -7,11 +7,11 @@
<a-row style="margin-left: 14px">
<a-button @click="handleAdd(1)" type="primary">添加部门</a-button>
<a-button @click="handleAdd(2)" type="primary">添加下级</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('部门信息')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<a-button title="删除多条数据" @click="batchDel" type="default">批量删除</a-button>
<!--<a-button type="primary" icon="download" @click="handleExportXls('部门信息')">导出</a-button>-->
<!--<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!--<a-button type="primary" icon="import">导入</a-button>-->
<!--</a-upload>-->
<!--<a-button title="删除多条数据" @click="batchDel" type="default">批量删除</a-button>-->
<!--<a-button @click="refresh" type="default" icon="reload" :loading="loading">刷新</a-button>-->
</a-row>
<div style="background: #fff;padding-left:16px;height: 100%; margin-top: 5px">
@ -28,7 +28,7 @@
<a-dropdown :trigger="[this.dropTrigger]" @visibleChange="dropStatus">
<span style="user-select: none">
<a-tree
checkable
multiple
@select="onSelect"
@check="onCheck"
@ -78,9 +78,10 @@
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="机构名称">
label="部门名称">
<a-input placeholder="请输入机构/部门名称" v-decorator="['departName', validatorRules.departName ]"/>
</a-form-item>
<template v-if="!orgCategoryDisabled">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="上级部门">
<a-tree-select
style="width:100%"
@ -91,45 +92,43 @@
placeholder="无">
</a-tree-select>
</a-form-item>
</template>
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="机构编码">
<a-input disabled placeholder="请输入机构编码" v-decorator="['orgCode', validatorRules.orgCode ]"/>
label="部门编码">
<a-input disabled placeholder="请输入部门编码" v-decorator="['orgCode', validatorRules.orgCode ]"/>
</a-form-item>
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="机构类型">
label="部门类型">
<template v-if="orgCategoryDisabled">
<a-radio-group v-decorator="['orgCategory',validatorRules.orgCategory]" placeholder="请选择机构类型">
<a-radio-group v-decorator="['orgCategory',validatorRules.orgCategory]" placeholder="请选择部门类型">
<a-radio value="1">
行政
管理机构
</a-radio>
<a-radio value="2">
教学
生产企业
</a-radio>
<a-radio value="4">
网店
</a-radio>
<a-radio value="5">
公司
门店
</a-radio>
<a-radio value="6">
供应商
</a-radio>
<a-radio value="7">
物流公司
</a-radio>
</a-radio-group>
</template>
<template v-else>
<a-radio-group v-decorator="['orgCategory',validatorRules.orgCategory]" placeholder="请选择机构类型">
<a-radio value="1">
行政
</a-radio>
<a-radio value="2">
教学
</a-radio>
<a-radio-group v-decorator="['orgCategory',validatorRules.orgCategory]" placeholder="请选择部门类型">
<a-radio value="3">
班级
</a-radio>
<a-radio value="4">
分组
</a-radio>
<a-radio value="5">
公司
子部门
</a-radio>
</a-radio-group>
</template>
@ -170,9 +169,9 @@
</a-empty>
</a-card>
</a-tab-pane>
<a-tab-pane tab="部门权限" key="2" forceRender>
<depart-auth-modal ref="departAuth"/>
</a-tab-pane>
<!--<a-tab-pane tab="部门权限" key="2" forceRender>-->
<!--<depart-auth-modal ref="departAuth"/>-->
<!--</a-tab-pane>-->
</a-tabs>
</a-col>
@ -189,16 +188,16 @@
//
const columns = [
{
title: '机构名称',
title: '部门名称',
dataIndex: 'departName'
},
{
title: '机构类型',
title: '部门类型',
align: 'center',
dataIndex: 'orgType'
},
{
title: '机构编码',
title: '部门编码',
dataIndex: 'orgCode',
},
{
@ -273,9 +272,9 @@
edges: []
},
validatorRules: {
departName: {rules: [{required: true, message: '请输入机构/部门名称!'}]},
orgCode: {rules: [{required: true, message: '请输入机构编码!'}]},
orgCategory: {rules: [{required: true, message: '请输入机构类型!'}]},
departName: {rules: [{required: true, message: '请输入部门/部门名称!'}]},
orgCode: {rules: [{required: true, message: '请输入部门编码!'}]},
orgCategory: {rules: [{required: true, message: '请输入部门类型!'}]},
mobile: {rules: [{validator: this.validateMobile}]}
},
url: {
@ -447,10 +446,10 @@
},
// onSelect,form
setValuesToForm(record) {
if(record.orgCategory == '1'){
this.orgCategoryDisabled = true;
if(record.orgCategory == '3'){
this.orgCategoryDisabled =false ;
}else{
this.orgCategoryDisabled = false;
this.orgCategoryDisabled =true;
}
this.$nextTick(() => {
this.form.getFieldDecorator('fax', {initialValue: ''})

@ -15,10 +15,10 @@
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="机构名称"
label="部门名称"
:hidden="false"
hasFeedback>
<a-input id="departName" placeholder="请输入机构/部门名称" v-decorator="['departName', validatorRules.departName ]"/>
<a-input id="departName" placeholder="请输入部门/部门名称" v-decorator="['departName', validatorRules.departName ]"/>
</a-form-item>
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :hidden="seen" label="上级部门" hasFeedback>
<a-tree-select
@ -33,36 +33,33 @@
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="机构类型">
label="部门类型">
<template v-if="seen">
<a-radio-group v-decorator="['orgCategory',validatorRules.orgCategory]" placeholder="请选择机构类型">
<a-radio-group v-decorator="['orgCategory',validatorRules.orgCategory]" placeholder="请选择部门类型">
<a-radio value="1">
行政
管理机构
</a-radio>
<a-radio value="2">
教学
生产企业
</a-radio>
<a-radio value="4">
网店
</a-radio>
<a-radio value="5">
公司
门店
</a-radio>
<a-radio value="6">
供应商
</a-radio>
<a-radio value="7">
物流公司
</a-radio>
</a-radio-group>
</template>
<template v-else>
<a-radio-group v-decorator="['orgCategory',validatorRules.orgCategory]" placeholder="请选择机构类型">
<a-radio value="1">
行政
</a-radio>
<a-radio value="2">
教学
</a-radio>
<a-radio-group v-decorator="['orgCategory',validatorRules.orgCategory]" placeholder="请选择部门类型">
<a-radio value="3">
班级
</a-radio>
<a-radio value="4">
分组
</a-radio>
<a-radio value="5">
公司
子部门
</a-radio>
</a-radio-group>
</template>
@ -138,8 +135,8 @@
confirmLoading: false,
form: this.$form.createForm(this),
validatorRules: {
departName: {rules: [{required: true, message: '请输入机构/部门名称!'}]},
orgCode: {rules: [{required: true, message: '请输入机构编码!'}]},
departName: {rules: [{required: true, message: '请输入部门/部门名称!'}]},
orgCode: {rules: [{required: true, message: '请输入部门编码!'}]},
mobile: {rules: [{validator: this.validateMobile}]}
},
url: {

@ -5,7 +5,7 @@
<a-row>
<a-col :span="24">
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">
<j-select-depart v-model="model.userId" />
<j-select-depart v-model="model.userId" @change="kuanshi" />
</a-form-model-item>
</a-col>
@ -13,7 +13,7 @@
<a-col :span="24">
<a-form-model-item label="款式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleId">
<j-dict-select-tag v-model="model.styleId" placeholder="请输入款式"
dict-code="zy_cloths_style,style_names,nums"></j-dict-select-tag>
:dict-code="dict"></j-dict-select-tag>
</a-form-model-item>
<!-- 编码也是唯一的和id一样 -->
</a-col>
@ -90,6 +90,7 @@ export default {
model: {
nums:'',
},
dict:"zy_cloths_style,style_names,nums",
labelCol: {
xs: {span: 24},
sm: {span: 5},
@ -150,6 +151,9 @@ export default {
this.edit(this.modelDefault);
},
//
kuanshi(){
this.dict="zy_cloths_style,style_names,nums,enterprise_id="+"'"+this.model.userId+"'";
},
gaibian(){
var n=3;
console.log(this.model)

@ -1,11 +1,12 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail" :layout="horizontal">
<!-- <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail" :layout="horizontal">-->
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="12">
<a-form-model-item label="企业" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="enterpriseId">
<j-select-depart v-model="model.enterpriseId" multi />
<j-select-depart v-model="model.enterpriseId" multi/>
</a-form-model-item>
</a-col>
<a-col :span="12">
@ -13,62 +14,61 @@
<j-popup
v-model="model.typeName"
field="type_name"
org-fields="type_name,id"
dest-fields="typeName,typeId"
org-fields="type_name,nums"
dest-fields="typeName,styleId"
code="cloths_type"
:multi="false"
@input="popupCallback"
/>
</a-form-model-item>
<a-input v-model="model.typeId" hidden/>
<a-input v-model="model.typeId" hidden/>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item label="形式" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="shape">
<j-dict-select-tag type="radio" v-model="model.shape" dictCode="style_shape" placeholder="请输入形式" ></j-dict-select-tag>
<j-dict-select-tag type="radio" v-model="model.shape" dictCode="style_shape"
placeholder="请输入形式"></j-dict-select-tag>
</a-form-model-item>
</a-col>
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="nums">-->
<!-- <a-input v-model="model.nums" placeholder="请输入编号" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<a-col :span="12">
<a-form-model-item label="款式名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleNames">
<a-input v-model="model.styleNames" placeholder="请输入款式名称" ></a-input>
<a-input v-model="model.styleNames" placeholder="请输入款式名称"></a-input>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item label="规格" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="specification">
<a-input v-model="model.specification" placeholder="请输入规格" ></a-input>
<a-form-model-item label="编号" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="nums">
<a-input v-model="model.nums" placeholder="请输入编号" disabled=""></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="定额用料" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="quotaMaterials">
<a-input v-model="model.quotaMaterials" placeholder="请输入定额用料" ></a-input>
<a-input v-model="model.quotaMaterials" placeholder="请输入定额用料"></a-input>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item label="格" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="characteristic">
<a-input v-model="model.characteristic" placeholder="请输入风格" ></a-input>
<a-form-model-item label="格" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="specification">
<a-input v-model="model.specification" placeholder="请输入规格"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="测体余量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="error">
<a-input v-model="model.error" placeholder="请输入测体余量" ></a-input>
<a-input v-model="model.error" placeholder="请输入测体余量"></a-input>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item label="结构" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="structure">
<a-input v-model="model.structure" placeholder="请输入结构" ></a-input>
<a-form-model-item label="风格" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="characteristic">
<a-input v-model="model.characteristic" placeholder="请输入风格"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
@ -76,33 +76,45 @@
<j-dict-select-tag v-model="model.sewingForm" placeholder="请选择缝纫形式" dict-code="sewingForm"/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item label="结构" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="structure">
<a-input v-model="model.structure" placeholder="请输入结构"></a-input>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item label="折叠搭配及包装" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="foldingPackaging">
<j-dict-select-tag v-model="model.foldingPackaging" placeholder="请选择折叠搭配及包装" dict-code="foldingPackaging" />
<j-dict-select-tag v-model="model.foldingPackaging" placeholder="请选择折叠搭配及包装"
dict-code="foldingPackaging"/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col >
<a-col>
<a-form-model-item label="产品概述" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="productOverview">
<a-textarea v-model="model.productOverview" placeholder="请输入产品概述" />
<a-textarea v-model="model.productOverview" placeholder="请输入产品概述"/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col>
<a-form-model-item label="销售地区" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="salesTerritory" :labelAlign="left">
<a-textarea v-model="model.salesTerritory" placeholder="请输入销售地区" />
<!-- <a-form-model-item label="销售地区" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="salesTerritory" :labelAlign="left">-->
<!-- <a-textarea v-model="model.salesTerritory" placeholder="请输入销售地区" />-->
<!-- </a-form-model-item>-->
<a-form-model-item label="销售地区" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="salesTerritory">
<a-textarea v-model="model.salesTerritory" placeholder="请输入销售地区"/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col>
<a-form-model-item label="制衣参数" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="measuringMethod">
<a-textarea v-model="model.measuringMethod" placeholder="请输入制衣参数" ></a-textarea>
<a-textarea v-model="model.measuringMethod" placeholder="请输入制衣参数"></a-textarea>
</a-form-model-item>
</a-col>
</a-row>
@ -110,19 +122,19 @@
<a-row>
<a-col>
<a-form-model-item label="配件及标志" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="accLogos">
<a-textarea v-model="model.accLogos" placeholder="请输入配件及标志" />
<a-textarea v-model="model.accLogos" placeholder="请输入配件及标志"/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="8">
<a-form-model-item label="效果" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="designSketch">
<j-image-upload isMultiple v-model="model.designSketch" ></j-image-upload>
<j-image-upload isMultiple v-model="model.designSketch"></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="主图" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mainMap">
<j-image-upload isMultiple v-model="model.mainMap" ></j-image-upload>
<j-image-upload isMultiple v-model="model.mainMap"></j-image-upload>
</a-form-model-item>
</a-col>
</a-row>
@ -234,17 +246,6 @@
<!-- </a-col>-->
</a-row>
<!-- <a-row>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">-->
@ -355,120 +356,135 @@
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
import {httpAction, getAction} from '@/api/manage'
import {validateDuplicateValue} from '@/utils/util'
import store from '@/store'
export default {
name: 'ZyClothsStyleForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
typeId : "",
typeName:"",
model:{
shape:1
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
labelCol1: {
xs: { span: 24 },
sm: { span: 3 },
},
wrapperCol1: {
xs: { span: 24 },
sm: { span: 18 },
},
confirmLoading: false,
validatorRules: {
typeId: [
{ required: true, message: '请选择服装类型!'},
],
// nums: [
// { required: true, message: '!'},
// ],
styleNames: [
{ required: true, message: '请输入名称!'},
],
positionid: [
{ required: true, message: '请选择组委会职务!'},
],
},
url: {
add: "/zyclothsstyle/zyClothsStyle/add",
edit: "/zyclothsstyle/zyClothsStyle/edit",
queryById: "/zyclothsstyle/zyClothsStyle/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
export default {
name: 'ZyClothsStyleForm',
components: {},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data() {
return {
typeId: "",
typeName: "",
model: {
nums: '',
shape: 1
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
labelCol: {
xs: {span: 24},
sm: {span: 5},
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
wrapperCol: {
xs: {span: 24},
sm: {span: 16},
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
labelCol1: {
xs: {span: 24},
sm: {span: 3},
},
wrapperCol1: {
xs: {span: 24},
sm: {span: 18},
},
popupCallback(value,row){
this.model = Object.assign(this.model, row);
confirmLoading: false,
validatorRules: {
typeId: [
{required: true, message: '请选择服装类型!'},
],
// nums: [
// { required: true, message: '!'},
// ],
styleNames: [
{required: true, message: '请输入名称!'},
],
positionid: [
{required: true, message: '请选择组委会职务!'},
],
},
url: {
add: "/zyclothsstyle/zyClothsStyle/add",
edit: "/zyclothsstyle/zyClothsStyle/edit",
queryById: "/zyclothsstyle/zyClothsStyle/queryById",
//getActionurl
sort:"/base/zyProcess/sort"
}
}
},
computed: {
formDisabled() {
return this.disabled
},
},
created() {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add() {
this.edit(this.modelDefault);
},
edit(record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm() {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if (!this.model.id) {
httpurl += this.url.add;
method = 'post';
} else {
httpurl += this.url.edit;
method = 'put';
}
httpAction(httpurl, this.model, method).then((res) => {
if (res.success) {
that.$message.success(res.message);
that.$emit('ok');
} else {
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
popupCallback(value, row) {
console.log("1222346584" + "++++++")
var n = 8;
this.model = Object.assign(this.model, row);
getAction(this.url.sort, {id: this.model.styleId}).then((res) => {
console.log("aaaaaa"+res.result);
var num = parseInt(res.result, 10) + 1
num = num.toString()
while (num.length < n) {
num = "0" + num
}
this.model.nums = this.model.styleId + num;
// console.log(this.model.processCode)
})
},
}
}
</script>
<style scoped>
.ant-form-item{
margin-bottom: 16px;
}
.ant-form-item {
margin-bottom: 16px;
}
</style>

@ -1,5 +1,6 @@
<template>
<a-card :bordered="false">
<p style="font-size: 30px;color:#333">{{biaoTi}}</p>
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
@ -27,7 +28,7 @@
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
<a-button type="primary">{{biaoTi}}</a-button>
<!-- <a-button type="primary">{{biaoTi}}</a-button>-->
</a-row>
</a-row>
</a-form>
@ -38,6 +39,7 @@
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('款式辅料管理')">导出</a-button>
<a-button type="primary" icon="rollback" @click="fanHui()">返回</a-button>
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"-->
<!-- @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
@ -56,7 +58,7 @@
<a-icon type="down"/>
</a-button>
</a-dropdown>
<a-button type="primary" style="left: 80%" @click="fanHui()">返回</a-button>
</div>
<!-- table区域-begin -->

@ -1,5 +1,6 @@
<template>
<a-card :bordered="false">
<p style="font-size: 30px;color:#333">{{biaoTi}}</p>
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
@ -22,7 +23,7 @@
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
<a-button type="primary">{{biaoTi}}</a-button>
<!-- <a-button type="primary">{{biaoTi}}</a-button>-->
</a-row>
</a-form>
</div>
@ -33,6 +34,7 @@
<div class="table-operator">
<a-button @click="zyStyleFabricHandleAdd(id)" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('款式面料表')">导出</a-button>
<a-button type="primary" icon="rollback" @click="fanHui()">返回</a-button>
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>-->
@ -48,7 +50,7 @@
<a-icon type="down"/>
</a-button>
</a-dropdown>
<a-button type="primary" style="left: 80%" @click="fanHui()">返回</a-button>
</div>
<!-- table区域-begin -->

@ -5,13 +5,15 @@
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col>
<a-button type="primary">{{biaoTi}}</a-button>
<!-- <a-button type="primary">{{biaoTi}}</a-button>-->
<p style="font-size: 30px;color:#333">{{biaoTi}}</p>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<a-button type="primary" @click="fanHui()">返回</a-button>
<a-button type="primary" icon="rollback" @click="fanHui()">返回</a-button>
<!-- table区域-begin -->
<div>

@ -1,12 +1,14 @@
<template>
<a-card :bordered="false">
<p style="font-size: 30px;color:#333;margin-bottom: 0px">{{biaoTi}}</p>
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col>
<!-- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a-button type="primary">{{biaoTi}}</a-button>-->
<a-button type="primary">{{biaoTi}}</a-button>
<!-- <a-button type="primary">{{biaoTi}}</a-button>-->
</a-col>
</a-row>
</a-form>
@ -18,7 +20,9 @@
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('款式工序表')">导出</a-button>
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"-->
<a-button type="primary" icon="rollback" @click="fanHui()">返回</a-button>
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"-->
<!-- @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
@ -36,7 +40,6 @@
<a-icon type="down"/>
</a-button>
</a-dropdown>
<a-button type="primary" style="left: 80%" @click="fanHui()">返回</a-button>
</div>
<!-- table区域-begin -->

@ -1,5 +1,6 @@
<template>
<a-card :bordered="false">
<p style="font-size: 30px;color:#333">{{biaoTi}}</p>
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
@ -28,7 +29,7 @@
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
<a-button type="primary">{{biaoTi}}</a-button>
<!-- <a-button type="primary">{{biaoTi}}</a-button>-->
</a-row>
</a-form>
@ -40,6 +41,7 @@
<div class="table-operator">
<a-button @click="styleModuleHandleAdd(id,typeId)" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('款式模块表')">导出</a-button>
<a-button type="primary" icon="rollback" @click="fanHui()">返回</a-button>
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
@ -57,7 +59,7 @@
<a-icon type="down"/>
</a-button>
</a-dropdown>
<a-button type="primary" style="left: 80%" @click="fanHui()">返回</a-button>
</div>
<!-- table区域-begin -->
<div>

@ -30,7 +30,7 @@
import { httpAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
import { Print } from 'vue-print-nb'
import { Print } from 'vue-print-nb-jeecg'
export default {
name: "QRCode",
components: {

@ -67,8 +67,8 @@ public class ZyAccessoriesController extends JeecgController<ZyAccessories, IZyA
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
//QueryWrapper<ZyAccessories> queryWrapper = QueryGenerator.initQueryWrapper(zyAccessories, req.getParameterMap());
QueryWrapper queryWrapper = new QueryWrapper();
QueryWrapper<ZyAccessories> queryWrapper = QueryGenerator.initQueryWrapper(zyAccessories, req.getParameterMap());
// QueryWrapper queryWrapper = new QueryWrapper();
Page<ZyAccessories> page = new Page<ZyAccessories>(pageNo, pageSize);
IPage<ZyAccessories> pageList = zyAccessoriesService.page(page, queryWrapper);
return Result.OK(pageList);

@ -66,8 +66,8 @@ public class ZyAccessoriesTypeController extends JeecgController<ZyAccessoriesTy
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
//QueryWrapper<ZyAccessoriesType> queryWrapper = QueryGenerator.initQueryWrapper(zyAccessoriesType, req.getParameterMap());
QueryWrapper queryWrapper = new QueryWrapper();
QueryWrapper<ZyAccessoriesType> queryWrapper = QueryGenerator.initQueryWrapper(zyAccessoriesType, req.getParameterMap());
// QueryWrapper queryWrapper = new QueryWrapper();
Page<ZyAccessoriesType> page = new Page<ZyAccessoriesType>(pageNo, pageSize);
IPage<ZyAccessoriesType> pageList = zyAccessoriesTypeService.page(page, queryWrapper);
return Result.OK(pageList);

@ -67,6 +67,7 @@ public class ZyAccessories implements Serializable {
/**供货商信息*/
@Excel(name = "供货商信息", width = 15)
@ApiModelProperty(value = "供货商信息")
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
private java.lang.String supplierInfo;
/**创建人*/

@ -60,6 +60,13 @@ public class ZyClothsTypeController extends JeecgController<ZyClothsType, IZyClo
QueryWrapper<ZyClothsType> queryWrapper = QueryGenerator.initQueryWrapper(zyClothsType, req.getParameterMap());
Page<ZyClothsType> page = new Page<ZyClothsType>(pageNo, pageSize);
IPage<ZyClothsType> pageList = zyClothsTypeService.page(page, queryWrapper);
List<ZyClothsType> records = pageList.getRecords();
for (ZyClothsType zy : records) {
String typeId = zy.getTypeId();
if (StringUtils.isEmpty(typeId)){
zy.setTypeId("1455487094925819901");
}
}
return Result.OK(pageList);
}
@ -96,7 +103,7 @@ public class ZyClothsTypeController extends JeecgController<ZyClothsType, IZyClo
zyClothsType.setTypeId(null);
}
//生成编号 nums,编号,varchar,10,非空,不重复,企业缩写(4)+顺序号(6)在service层处理
zyClothsType.setNums(zyClothsTypeService.generateNumber());
// zyClothsType.setNums(zyClothsTypeService.generateNumber());
zyClothsTypeService.save(zyClothsType);
return Result.OK("添加成功!");
}
@ -183,4 +190,14 @@ public class ZyClothsTypeController extends JeecgController<ZyClothsType, IZyClo
return super.importExcel(request, response, ZyClothsType.class);
}
@GetMapping(value = "/weiyi")
public Result<?> weiyi() {
String a=zyClothsTypeService.sort();
if(a==null){
return Result.OK("0");
}
return Result.OK(a.substring(4));
}
}

@ -3,6 +3,7 @@ package org.jeecg.modules.demo.base.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.demo.base.entity.ZyClothsType;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@ -17,4 +18,7 @@ public interface ZyClothsTypeMapper extends BaseMapper<ZyClothsType> {
List<String> selectNumsList();
List<String> listByTypeId(String typeId);
@Select("select nums from zy_cloths_type where nums like 'QIYE%' order by nums desc limit 0,1 ")
String sort();
}

@ -13,4 +13,6 @@ public interface IZyClothsTypeService extends IService<ZyClothsType> {
/**nums,编号,varchar,10,非空,不重复,企业缩写(4)+顺序号(6)*/
String generateNumber();
String sort();
}

@ -40,6 +40,15 @@ public class ZyClothsTypeServiceImpl extends ServiceImpl<ZyClothsTypeMapper, ZyC
return nums + format;
}
/*
* 顺序号
* */
@Override
public String sort() {
return zyClothsTypeMapper.sort();
}
private Long orderNumber() {
List<String> listString = zyClothsTypeMapper.selectNumsList();
//System.out.println(listString);

@ -22,7 +22,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
public interface ZyProcessActionMapper extends BaseMapper<ZyProcessAction> {
@Select("<script>select * from zy_process_action <where><if test=\" p != null\">process_id in (select id from zy_process where process_name like #{p})</if><if test=\" m != null\"> and action_id in (select id from zy_cloth_action where descr like #{m})</if></where></script>")
IPage<ZyProcessAction> page(Page<ZyProcessAction> page, @Param("p") String s, @Param("m") String t);
@Select("<script>select a.*,b.process_code,c.nums from zy_process_action as a,zy_process as b,zy_cloth_action as c <where> a.process_id=b.id and a.action_id=c.id and a.process_id =#{p}<if test=\" m != null\"> and action_id in (select id from zy_cloth_action where descr like #{m})</if></where></script>")
@Select("<script>select a.*,b.process_code,c.nums from zy_process_action as a,zy_process as b,zy_cloth_action as c <where> a.process_id=b.id and a.action_id=c.id and a.process_id =#{p}<if test=\" m != null\"> and action_id in (select id from zy_cloth_action where descr like #{m})</if></where> order by sort_action desc</script>")
IPage<ZyProcessAction> page1(Page<ZyProcessAction> page, @Param("p") String s, @Param("m") String t);
@Select("select * from zy_cloth_action where id in (select action_id from zy_process_action where process_id=#{id}) ")
List<ZyClothAction> selectByid(String id);

@ -9,8 +9,11 @@ import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.customerinvoice.entity.CustomerInvoice;
import org.jeecg.modules.demo.customerinvoice.service.ICustomerInvoiceService;
@ -49,7 +52,7 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class CustomerInvoiceController extends JeecgController<CustomerInvoice, ICustomerInvoiceService> {
@Autowired
private ICustomerInvoiceService customerInvoiceService;
/**
* 分页列表查询
*
@ -71,7 +74,35 @@ public class CustomerInvoiceController extends JeecgController<CustomerInvoice,
IPage<CustomerInvoice> pageList = customerInvoiceService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 分页列表查询
*
* @param customerInvoice
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "客户发票信息-分页列表查询")
@ApiOperation(value="客户发票信息-分页列表查询", notes="客户发票信息-分页列表查询")
@GetMapping(value = "/listcustom")
public Result<?> listcustom(CustomerInvoice customerInvoice,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
QueryWrapper<CustomerInvoice> queryWrapper = QueryGenerator.initQueryWrapper(customerInvoice, req.getParameterMap());
queryWrapper.eq("createBy",sysUser.getUsername());
Page<CustomerInvoice> page = new Page<CustomerInvoice>(pageNo, pageSize);
IPage<CustomerInvoice> pageList = customerInvoiceService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
@ -85,7 +116,7 @@ public class CustomerInvoiceController extends JeecgController<CustomerInvoice,
customerInvoiceService.save(customerInvoice);
return Result.OK("添加成功!");
}
/**
* 编辑
*
@ -99,7 +130,7 @@ public class CustomerInvoiceController extends JeecgController<CustomerInvoice,
customerInvoiceService.updateById(customerInvoice);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
@ -113,7 +144,7 @@ public class CustomerInvoiceController extends JeecgController<CustomerInvoice,
customerInvoiceService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
@ -127,7 +158,7 @@ public class CustomerInvoiceController extends JeecgController<CustomerInvoice,
this.customerInvoiceService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*

@ -9,8 +9,11 @@ import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.customermeasure.entity.CustomerMeasure;
import org.jeecg.modules.demo.customermeasure.service.ICustomerMeasureService;
@ -49,7 +52,7 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class CustomerMeasureController extends JeecgController<CustomerMeasure, ICustomerMeasureService> {
@Autowired
private ICustomerMeasureService customerMeasureService;
/**
* 分页列表查询
*
@ -71,8 +74,36 @@ public class CustomerMeasureController extends JeecgController<CustomerMeasure,
IPage<CustomerMeasure> pageList = customerMeasureService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
/**
* 分页列表查询
*
* @param customerMeasure
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "顾客测体管理-分页列表查询")
@ApiOperation(value="顾客测体管理-分页列表查询", notes="顾客测体管理-分页列表查询")
@GetMapping(value = "/listcustom")
public Result<?> listcustom(CustomerMeasure customerMeasure,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
QueryWrapper<CustomerMeasure> queryWrapper = QueryGenerator.initQueryWrapper(customerMeasure, req.getParameterMap());
queryWrapper.eq("createBy",sysUser.getUsername());
Page<CustomerMeasure> page = new Page<CustomerMeasure>(pageNo, pageSize);
IPage<CustomerMeasure> pageList = customerMeasureService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param customerMeasure
@ -85,7 +116,7 @@ public class CustomerMeasureController extends JeecgController<CustomerMeasure,
customerMeasureService.save(customerMeasure);
return Result.OK("添加成功!");
}
/**
* 编辑
*
@ -99,7 +130,7 @@ public class CustomerMeasureController extends JeecgController<CustomerMeasure,
customerMeasureService.updateById(customerMeasure);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
@ -113,7 +144,7 @@ public class CustomerMeasureController extends JeecgController<CustomerMeasure,
customerMeasureService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
@ -127,7 +158,7 @@ public class CustomerMeasureController extends JeecgController<CustomerMeasure,
this.customerMeasureService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*

@ -9,8 +9,11 @@ import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.customerpayment.entity.CustomerPayment;
import org.jeecg.modules.demo.customerpayment.service.ICustomerPaymentService;
@ -49,7 +52,7 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class CustomerPaymentController extends JeecgController<CustomerPayment, ICustomerPaymentService> {
@Autowired
private ICustomerPaymentService customerPaymentService;
/**
* 分页列表查询
*
@ -71,7 +74,33 @@ public class CustomerPaymentController extends JeecgController<CustomerPayment,
IPage<CustomerPayment> pageList = customerPaymentService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 分页列表查询
*
* @param customerPayment
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "顾客支付信息管理-分页列表查询")
@ApiOperation(value="顾客支付信息管理-分页列表查询", notes="顾客支付信息管理-分页列表查询")
@GetMapping(value = "/listcustom")
public Result<?> listcustom(CustomerPayment customerPayment,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
QueryWrapper<CustomerPayment> queryWrapper = QueryGenerator.initQueryWrapper(customerPayment, req.getParameterMap());
queryWrapper.eq("createBy",sysUser.getUsername());
Page<CustomerPayment> page = new Page<CustomerPayment>(pageNo, pageSize);
IPage<CustomerPayment> pageList = customerPaymentService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
@ -85,7 +114,7 @@ public class CustomerPaymentController extends JeecgController<CustomerPayment,
customerPaymentService.save(customerPayment);
return Result.OK("添加成功!");
}
/**
* 编辑
*
@ -99,7 +128,7 @@ public class CustomerPaymentController extends JeecgController<CustomerPayment,
customerPaymentService.updateById(customerPayment);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
@ -113,7 +142,7 @@ public class CustomerPaymentController extends JeecgController<CustomerPayment,
customerPaymentService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
@ -127,7 +156,7 @@ public class CustomerPaymentController extends JeecgController<CustomerPayment,
this.customerPaymentService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*

@ -75,6 +75,34 @@ public class CustomerReceivingAddressController extends JeecgController<Customer
return Result.OK(pageList);
}
/**
* 分页列表查询
*
* @param customerReceivingAddress
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "顾客地址表-分页列表查询")
@ApiOperation(value="顾客地址表-分页列表查询", notes="顾客地址表-分页列表查询")
@GetMapping(value = "/listcustom")
public Result<?> listcustom(CustomerReceivingAddress customerReceivingAddress,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal();
QueryWrapper<CustomerReceivingAddress> queryWrapper = QueryGenerator.initQueryWrapper(customerReceivingAddress, req.getParameterMap());
queryWrapper.eq("createBy",sysUser.getUsername());
Page<CustomerReceivingAddress> page = new Page<CustomerReceivingAddress>(pageNo, pageSize);
IPage<CustomerReceivingAddress> pageList = customerReceivingAddressService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*

@ -9,8 +9,11 @@ import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.customershoppingcart.entity.CustomerShoppingCart;
import org.jeecg.modules.demo.customershoppingcart.service.ICustomerShoppingCartService;
@ -77,6 +80,34 @@ public class CustomerShoppingCartController extends JeecgController<CustomerShop
return Result.OK(pageList);
}
/**
* 顾客分页列表查询
*
* @param customerShoppingCart
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "购物车-分页列表查询")
@ApiOperation(value="购物车-分页列表查询", notes="购物车-分页列表查询")
@GetMapping(value = "/listcust")
public Result<?> listcust(CustomerShoppingCart customerShoppingCart,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
QueryWrapper<CustomerShoppingCart> queryWrapper = QueryGenerator.initQueryWrapper(customerShoppingCart, req.getParameterMap());
queryWrapper.eq("createBy",sysUser.getUsername());
Page<CustomerShoppingCart> page = new Page<CustomerShoppingCart>(pageNo, pageSize);
IPage<CustomerShoppingCart> pageList = customerShoppingCartService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*

@ -0,0 +1,202 @@
package org.jeecg.modules.product.zyproductprocess.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.product.zyproductprocess.entity.ZyProductProcess;
import org.jeecg.modules.product.zyproductprocess.service.IZyProductProcessService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 产品工序
* @Author: jeecg-boot
* @Date: 2022-12-14
* @Version: V1.0
*/
@Api(tags="产品工序")
@RestController
@RequestMapping("/zyproductprocess/zyProductProcess")
@Slf4j
public class ZyProductProcessController extends JeecgController<ZyProductProcess, IZyProductProcessService> {
@Autowired
private IZyProductProcessService zyProductProcessService;
/**
* 分页列表查询
*
* @param zyProductProcess
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "产品工序-分页列表查询")
@ApiOperation(value="产品工序-分页列表查询", notes="产品工序-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(ZyProductProcess zyProductProcess,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
//QueryWrapper<ZyProductProcess> queryWrapper = QueryGenerator.initQueryWrapper(zyProductProcess, req.getParameterMap());
QueryWrapper queryWrapper=new QueryWrapper();
queryWrapper.orderByDesc("number");
queryWrapper.eq("product_id",zyProductProcess.getProductId());
if(zyProductProcess.getProcessId()!=null&&!zyProductProcess.getProcessId().equals("")){
String s="%"+zyProductProcess.getProcessId()+"%";
List<String> list=zyProductProcessService.find(s);
queryWrapper.in("process_id",list);
}
Page<ZyProductProcess> page = new Page<ZyProductProcess>(pageNo, pageSize);
IPage<ZyProductProcess> pageList = zyProductProcessService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param zyProductProcess
* @return
*/
@AutoLog(value = "产品工序-添加")
@ApiOperation(value="产品工序-添加", notes="产品工序-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyProductProcess zyProductProcess) {
String[] split = zyProductProcess.getProcessId().split(",");
for (String k : split) {
zyProductProcess.setProcessId(k);
QueryWrapper s=new QueryWrapper();
s.eq("product_id",zyProductProcess.getProductId());
s.eq("process_id",zyProductProcess.getProcessId());
int a=zyProductProcessService.count(s);
if(a==0)
zyProductProcessService.save(zyProductProcess);
zyProductProcess.setId(null);
}
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param zyProductProcess
* @return
*/
@AutoLog(value = "产品工序-编辑")
@ApiOperation(value="产品工序-编辑", notes="产品工序-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody ZyProductProcess zyProductProcess) {
zyProductProcessService.updateById(zyProductProcess);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "产品工序-通过id删除")
@ApiOperation(value="产品工序-通过id删除", notes="产品工序-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
zyProductProcessService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "产品工序-批量删除")
@ApiOperation(value="产品工序-批量删除", notes="产品工序-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.zyProductProcessService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "产品工序-通过id查询")
@ApiOperation(value="产品工序-通过id查询", notes="产品工序-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
ZyProductProcess zyProductProcess = zyProductProcessService.getById(id);
if(zyProductProcess==null) {
return Result.error("未找到对应数据");
}
return Result.OK(zyProductProcess);
}
/**
* 导出excel
*
* @param request
* @param zyProductProcess
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ZyProductProcess zyProductProcess) {
return super.exportXls(request, zyProductProcess, ZyProductProcess.class, "产品工序");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, ZyProductProcess.class);
}
@GetMapping(value = "/up")
public Result<?> up(@RequestParam(name="id",required=true) String id) {
zyProductProcessService.up(id);
return Result.OK("升序成功");
}
@GetMapping(value = "/down")
public Result<?> down(@RequestParam(name="id",required=true) String id) {
ZyProductProcess zyProductProcess = zyProductProcessService.getById(id);
if(zyProductProcess==null||zyProductProcess.getNumber()==0)
return Result.error("当前以是最低级别!!");
zyProductProcessService.down(id);
return Result.OK("降序成功");
}
}

@ -0,0 +1,70 @@
package org.jeecg.modules.product.zyproductprocess.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 产品工序
* @Author: jeecg-boot
* @Date: 2022-12-14
* @Version: V1.0
*/
@Data
@TableName("zy_product_process")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="zy_product_process对象", description="产品工序")
public class ZyProductProcess implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private Date updateTime;
/**产品id*/
@Excel(name = "产品id", width = 15)
@ApiModelProperty(value = "产品id")
// @Dict(dictTable = "zy_product",dicText = "product_code",dicCode = "id") 由于当前产品还没有,需要后期打开
private String productId;
/**工序id*/
@Excel(name = "工序id", width = 15)
@ApiModelProperty(value = "工序id")
@Dict(dictTable = "zy_process",dicText = "process_name",dicCode = "id")
private String processId;
/**序号*/
@Excel(name = "序号", width = 15)
@ApiModelProperty(value = "序号")
private Integer number;
}

@ -0,0 +1,27 @@
package org.jeecg.modules.product.zyproductprocess.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.jeecg.modules.product.zyproductprocess.entity.ZyProductProcess;
/**
* @Description: 产品工序
* @Author: jeecg-boot
* @Date: 2022-12-14
* @Version: V1.0
*/
public interface ZyProductProcessMapper extends BaseMapper<ZyProductProcess> {
@Update("update zy_product_process set number=number+1 where id=#{id}")
void up(String id);
@Update("update zy_product_process set number=number-1 where id=#{id}")
void down(String id);
@Select("select id from zy_process where process_name like #{s}")
List<String> find(String s);
}

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.product.zyproductprocess.mapper.ZyProductProcessMapper">
</mapper>

@ -0,0 +1,22 @@
package org.jeecg.modules.product.zyproductprocess.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.product.zyproductprocess.entity.ZyProductProcess;
import java.util.List;
/**
* @Description: 产品工序
* @Author: jeecg-boot
* @Date: 2022-12-14
* @Version: V1.0
*/
public interface IZyProductProcessService extends IService<ZyProductProcess> {
void up(String id);
void down(String id);
List<String> find(String s);
}

@ -0,0 +1,39 @@
package org.jeecg.modules.product.zyproductprocess.service.impl;
import org.jeecg.modules.product.zyproductprocess.entity.ZyProductProcess;
import org.jeecg.modules.product.zyproductprocess.mapper.ZyProductProcessMapper;
import org.jeecg.modules.product.zyproductprocess.service.IZyProductProcessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
/**
* @Description: 产品工序
* @Author: jeecg-boot
* @Date: 2022-12-14
* @Version: V1.0
*/
@Service
public class ZyProductProcessServiceImpl extends ServiceImpl<ZyProductProcessMapper, ZyProductProcess> implements IZyProductProcessService {
@Autowired
ZyProductProcessMapper zyProductProcessMapper;
@Override
public void up(String id) {
zyProductProcessMapper.up(id);
}
@Override
public void down(String id) {
zyProductProcessMapper.down(id);
}
@Override
public List<String> find(String s) {
return zyProductProcessMapper.find(s);
}
}
Loading…
Cancel
Save