喻忠伟 2 years ago
commit fdbfefcd11
  1. 2
      ant-design-vue-jeecg/src/views/device/ZyDeviceListRef.vue
  2. 27
      ant-design-vue-jeecg/src/views/goodsaccessories/GoodsAccessoriesList.vue
  3. 249
      ant-design-vue-jeecg/src/views/goodsaccessories/modules/GoodsAccessoriesForm.vue
  4. 31
      ant-design-vue-jeecg/src/views/goodsaccessories/modules/GoodsAccessoriesModal.vue
  5. 27
      ant-design-vue-jeecg/src/views/goodsfabric/GoodsFabricList.vue
  6. 299
      ant-design-vue-jeecg/src/views/goodsfabric/modules/GoodsFabricForm.vue
  7. 31
      ant-design-vue-jeecg/src/views/goodsfabric/modules/GoodsFabricModal.vue
  8. 38
      ant-design-vue-jeecg/src/views/product/productModule/ProductModuleList.vue
  9. 305
      ant-design-vue-jeecg/src/views/product/productSample/ProductSampleList.vue
  10. 125
      ant-design-vue-jeecg/src/views/product/productSample/modules/ZyClothSampleDetail.vue
  11. 229
      ant-design-vue-jeecg/src/views/product/productSample/modules/ZyClothSampleForm.vue
  12. 60
      ant-design-vue-jeecg/src/views/product/productSample/modules/ZyClothSampleModal.vue
  13. 84
      ant-design-vue-jeecg/src/views/product/productSample/modules/ZyClothSampleModal__Style#Drawer.vue
  14. 2
      ant-design-vue-jeecg/src/views/team/StationMachineList.vue
  15. 4
      ant-design-vue-jeecg/src/views/team/StationToolList.vue
  16. 19
      ant-design-vue-jeecg/src/views/zyorders/ZyOrdersList.vue
  17. 25
      ant-design-vue-jeecg/src/views/zystylemodel/ZyStyleModelList.vue
  18. 15
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/goodsaccessories/controller/GoodsAccessoriesController.java
  19. 15
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/goodsfabric/controller/GoodsFabricController.java
  20. 30
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/controller/ZyOrdersController.java
  21. 7
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/controller/StationMachineController.java
  22. 15
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/controller/StationToolController.java
  23. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/entity/StationMachine.java
  24. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/entity/StationTool.java
  25. 6
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/entity/ZyStyleModel.java

@ -5,7 +5,7 @@
<a-form layout="inline" @keyup.enter.native="searchQuery"> <a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :sm="5"> <a-col :sm="5">
<a-form-model-item label="设备编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="id"> <a-form-model-item label="设备编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="code">
<a-input v-model="queryParam.code" placeholder="请输入设备编号"></a-input> <a-input v-model="queryParam.code" placeholder="请输入设备编号"></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>

@ -81,28 +81,18 @@
</template> </template>
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a> <!-- <a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a-dropdown> <a @click="handleDetail(record)">详情</a>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a> <a-divider type="vertical" />-->
<a-menu slot="overlay"> <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a-menu-item> <a>删除</a>
<a @click="handleDetail(record)">详情</a> </a-popconfirm>
</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> </span>
</a-table> </a-table>
</div> </div>
<goods-accessories-modal ref="modalForm" @ok="modalFormOk"></goods-accessories-modal> <goods-accessories-modal ref="modalForm" @ok="modalFormOk" @valueChange="valueChange"></goods-accessories-modal>
</a-card> </a-card>
</template> </template>
@ -197,6 +187,9 @@
} }
}); });
}, },
valueChange(value) {
if (value) this.loadData()
},
initDictConfig(){ initDictConfig(){
}, },
getSuperFieldList(){ getSuperFieldList(){

@ -1,115 +1,188 @@
<template> <template>
<a-spin :spinning="confirmLoading"> <a-card :bordered="false">
<j-form-container :disabled="formDisabled"> <!-- 查询区域 -->
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> <div class="table-page-search-wrapper">
<a-row> <a-form layout="inline" @keyup.enter.native="searchQuery">
<a-col :span="24"> <a-row :gutter="24">
<a-form-model-item label="商品" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="goodsId"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<j-dict-select-tag type="list" v-model="model.goodsId" :dictCode="goods" placeholder="请选择商品" /> <a-form-item label="辅料编号">
</a-form-model-item> <a-input placeholder="请输入辅料编号" v-model="queryParam.nums"></a-input>
</a-form-item>
</a-col> </a-col>
<a-col :span="24">
<a-form-model-item label="辅料" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="accessoriesId"> <a-col :xl="10" :lg="7" :md="8" :sm="24">
<j-dict-select-tag type="list" v-model="model.accessoriesId" dictCode="zy_accessories,contents,id" placeholder="请选择辅料" /> <a-form-item label="辅料名称">
</a-form-model-item> <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-col>
</a-row> </a-row>
</a-form-model> </a-form>
</j-form-container> </div>
</a-spin> <!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<!-- <div class="table-operator">-->
<!-- </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>
</a-table>
</div>
</a-card>
</template> </template>
<script> <script>
import { httpAction, getAction } from '@/api/manage' import '@/assets/less/TableExpand.less'
import { validateDuplicateValue } from '@/utils/util' import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
export default { export default {
name: 'GoodsAccessoriesForm', name: 'GoodsAccessoriesForm',
mixins: [JeecgListMixin, mixinDevice],
components: { components: {
}, },
props: { data() {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return { return {
goods:"zy_goods,goods_name,id,id="+this.$route.query.goodsid, description: 'zy_accessories管理页面',
model:{ //
}, columns: [
labelCol: { {
xs: { span: 24 }, title: '#',
sm: { span: 5 }, dataIndex: '',
}, key: 'rowIndex',
wrapperCol: { width: 60,
xs: { span: 24 }, align: "center",
sm: { span: 16 }, customRender: function (t, r, index) {
}, return parseInt(index) + 1;
confirmLoading: false, }
validatorRules: { },
goodsId: [ {
{ required: true, message: '请选择商品!'}, title: '类型',
], align: "center",
accessoriesId: [ dataIndex: 'typeId_dictText'
{ required: true, message: '请选择辅料!'}, },
], {
}, title: '编号',
align: "center",
dataIndex: 'nums'
},
{
title: '名称',
align: "center",
dataIndex: 'contents',
// width:10,
// colspan:2
},
{
title: '图片',
align: "center",
dataIndex: 'picture'
},
{
title: '材质',
align: "center",
dataIndex: 'material'
},
{
title: '规格',
align: "center",
dataIndex: 'specs'
},
],
url: { url: {
add: "/goodsaccessories/goodsAccessories/add", list: "/accessories/zyAccessories/list",
edit: "/goodsaccessories/goodsAccessories/edit", delete: "/accessories/zyAccessories/delete",
queryById: "/goodsaccessories/goodsAccessories/queryById" deleteBatch: "/accessories/zyAccessories/deleteBatch",
} exportXlsUrl: "/accessories/zyAccessories/exportXls",
importExcelUrl: "accessories/zyAccessories/importExcel",
},
dictOptions: {},
superFieldList: [],
} }
}, },
computed: { computed: {
formDisabled(){ importExcelUrl: function () {
return this.disabled return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
}, },
}, },
created () { created() {
//model this.getSuperFieldList();
this.modelDefault = JSON.parse(JSON.stringify(this.model));
}, },
methods: { methods: {
add () { onSelectChange1(selectedRowKeys, selectionRows) {
this.edit(this.modelDefault); 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)
}, },
edit (record) { add() {
this.model = Object.assign({}, record);
this.visible = true;
}, },
submitForm () { initDictConfig() {
const that = this; },
// getSuperFieldList() {
this.$refs.form.validate(valid => { let fieldList = [];
if (valid) { fieldList.push({type: 'string', value: 'typeId', text: '类型id'})
that.confirmLoading = true; fieldList.push({type: 'string', value: 'nums', text: '编号'})
let httpurl = ''; fieldList.push({type: 'string', value: 'contents', text: '名称'})
let method = ''; fieldList.push({type: 'string', value: 'picture', text: '图片'})
if(!this.model.id){ fieldList.push({type: 'string', value: 'material', text: '材质'})
httpurl+=this.url.add; fieldList.push({type: 'string', value: 'specs', text: '规格'})
method = 'post'; fieldList.push({type: 'int', value: 'store', text: '库存量'})
}else{ fieldList.push({type: 'string', value: 'supplierInfo', text: '供货商信息'})
httpurl+=this.url.edit; this.superFieldList = fieldList
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;
})
}
})
}, },
} }
} }

@ -8,13 +8,14 @@
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }" :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel" @cancel="handleCancel"
cancelText="关闭"> cancelText="关闭">
<goods-accessories-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></goods-accessories-form> <goods-accessories-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" @onChangeRowKey="chuancan"></goods-accessories-form>
</j-modal> </j-modal>
</template> </template>
<script> <script>
import GoodsAccessoriesForm from './GoodsAccessoriesForm' import GoodsAccessoriesForm from './GoodsAccessoriesForm'
import {postAction} from "../../../api/manage";
export default { export default {
name: 'GoodsAccessoriesModal', name: 'GoodsAccessoriesModal',
components: { components: {
@ -22,14 +23,24 @@
}, },
data () { data () {
return { return {
model: {
goodsId:'',
accessoriesId:''
},
url: {
add: "/goodsaccessories/goodsAccessories/add",
edit: "/goodsaccessories/goodsAccessories/edit",
queryById: "/goodsaccessories/goodsAccessories/queryById"
},
title:'', title:'',
width:800, width:1500,
visible: false, visible: false,
disableSubmit: false disableSubmit: false
} }
}, },
methods: { methods: {
add () { add () {
this.model.goodsId = this.$route.query.goodsid;
this.visible=true this.visible=true
this.$nextTick(()=>{ this.$nextTick(()=>{
this.$refs.realForm.add(); this.$refs.realForm.add();
@ -46,7 +57,16 @@
this.visible = false; this.visible = false;
}, },
handleOk () { handleOk () {
this.$refs.realForm.submitForm(); 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(){ submitCallback(){
this.$emit('ok'); this.$emit('ok');
@ -54,7 +74,10 @@
}, },
handleCancel () { handleCancel () {
this.close() this.close()
} },
chuancan(res) {
this.model.accessoriesId = res;
},
} }
} }
</script> </script>

@ -81,28 +81,18 @@
</template> </template>
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a> <!-- <a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a-dropdown> <a @click="handleDetail(record)">详情</a>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a> <a-divider type="vertical" />-->
<a-menu slot="overlay"> <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a-menu-item> <a>删除</a>
<a @click="handleDetail(record)">详情</a> </a-popconfirm>
</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> </span>
</a-table> </a-table>
</div> </div>
<goods-fabric-modal ref="modalForm" @ok="modalFormOk"></goods-fabric-modal> <goods-fabric-modal ref="modalForm" @ok="modalFormOk" @valueChange="valueChange"></goods-fabric-modal>
</a-card> </a-card>
</template> </template>
@ -199,6 +189,9 @@
}, },
initDictConfig(){ initDictConfig(){
}, },
valueChange(value) {
if (value) this.loadData()
},
getSuperFieldList(){ getSuperFieldList(){
let fieldList=[]; let fieldList=[];
fieldList.push({type:'string',value:'goodsId',text:'商品',dictCode:'zy_goods,goods_name,id'}) fieldList.push({type:'string',value:'goodsId',text:'商品',dictCode:'zy_goods,goods_name,id'})

@ -1,116 +1,243 @@
<template> <template>
<a-spin :spinning="confirmLoading"> <a-card :bordered="false">
<j-form-container :disabled="formDisabled"> <!-- 查询区域 -->
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> <div class="table-page-search-wrapper">
<a-row> <a-form layout="inline" @keyup.enter.native="searchQuery">
<a-col :span="24"> <a-row :gutter="24">
<a-form-model-item label="商品" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="goodsId"> <!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<j-dict-select-tag type="list" v-model="model.goodsId" :dictCode="goods" placeholder="请选择商品" /> <!-- <a-form-item label="花样">-->
</a-form-model-item> <!-- <j-search-select-tag placeholder="请选择花样" v-model="queryParam.pattern" dict="pattern"/>-->
<!-- </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.typeId"></a-input>
</a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-model-item label="面料" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fabricId"> <a-form-item label="编号">
<j-dict-select-tag type="list" v-model="model.fabricId" dictCode="zy_fabric,name,id" placeholder="请选择面料" /> <a-input placeholder="编号" v-model="queryParam.fabricNumber"></a-input>
</a-form-model-item> </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.name"></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.color"></a-input>
</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.pattern" dict="pattern"/>
</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.material" dict="material"/>
</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-col>
</a-row> </a-row>
</a-form-model> </a-form>
</j-form-container> </div>
</a-spin> <!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
</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="imgeSlot" slot-scope="text">
<img :src="text" height="" 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>
</a-table>
</div>
</a-card>
</template> </template>
<script> <script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { httpAction, getAction } from '@/api/manage' import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util' import { validateDuplicateValue } from '@/utils/util'
export default { export default {
name: 'GoodsFabricForm', name: 'GoodsFabricForm',
mixins:[JeecgListMixin, mixinDevice],
components: { components: {
}, },
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () { data () {
return { return {
goods:"zy_goods,goods_name,id,id="+this.$route.query.goodsid, description: '面料表管理页面',
model:{ //
}, columns: [
labelCol: { {
xs: { span: 24 }, title: '#',
sm: { span: 5 }, dataIndex: '',
}, key:'rowIndex',
wrapperCol: { width:60,
xs: { span: 24 }, align:"center",
sm: { span: 16 }, customRender:function (t,r,index) {
}, return parseInt(index)+1;
confirmLoading: false, }
validatorRules: { },
goodsId: [ {
{ required: true, message: '请选择商品!'}, title:'类型',
], align:"center",
fabricId: [ dataIndex: 'typeId_dictText'
{ required: true, message: '请选择面料!'}, },
], {
}, title:'编号',
align:"center",
dataIndex: 'fabricNumber'
},
{
title:'名称',
align:"center",
dataIndex: 'name'
},
{
title:'颜色',
align:"center",
dataIndex: 'color'
},
{
title:'花样',
align:"center",
dataIndex: 'pattern_dictText'
},
{
title:'材质',
align:"center",
dataIndex: 'material_dictText'
},
{
title:'厚度',
align:"center",
dataIndex: 'ply_dictText'
},
{
title:'单价',
align:"center",
dataIndex: 'money'
},
{
title:'零售价',
align:"center",
dataIndex: 'retailPrice'
},
],
url: { url: {
add: "/goodsfabric/goodsFabric/add", list: "/fabric/zyFabric/list",
edit: "/goodsfabric/goodsFabric/edit", delete: "/fabric/zyFabric/delete",
queryById: "/goodsfabric/goodsFabric/queryById" deleteBatch: "/fabric/zyFabric/deleteBatch",
} exportXlsUrl: "/fabric/zyFabric/exportXls",
importExcelUrl: "/fabric/zyFabric/importExcel",
},
dictOptions:{},
superFieldList:[],
} }
}, },
computed: { computed: {
formDisabled(){ importExcelUrl: function(){
return this.disabled return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
}, },
}, },
created () { created() {
//model this.getSuperFieldList();
this.modelDefault = JSON.parse(JSON.stringify(this.model));
}, },
methods: { methods: {
add () { initDictConfig(){
this.edit(this.modelDefault);
}, },
edit (record) { onSelectChange1(selectedRowKeys, selectionRows) {
this.model = Object.assign({}, record); this.selectedRowKeys = selectedRowKeys;
this.visible = true; this.selectionRows = selectionRows;
let ids = "";
for (var a = 0; a < this.selectedRowKeys.length; a++) {
ids += this.selectedRowKeys[a] + ",";
}
this.$emit('onChangeRowKey',ids)
}, },
submitForm () { add () {
const that = this; },
// getSuperFieldList(){
this.$refs.form.validate(valid => { let fieldList=[];
if (valid) { fieldList.push({type:'string',value:'color',text:'颜色',dictCode:''})
that.confirmLoading = true; fieldList.push({type:'sel_search',value:'pattern',text:'花样',dictTable:'', dictText:'', dictCode:'pattern'})
let httpurl = ''; fieldList.push({type:'sel_search',value:'material',text:'材质',dictTable:'', dictText:'', dictCode:'material'})
let method = ''; fieldList.push({type:'sel_search',value:'ply',text:'厚度',dictTable:'ply', dictText:'', dictCode:''})
if(!this.model.id){ fieldList.push({type:'int',value:'money',text:'单价',dictCode:''})
httpurl+=this.url.add; fieldList.push({type:'string',value:'imageUrl',text:'图片地址',dictCode:''})
method = 'post'; fieldList.push({type:'popup',value:'typeId',text:'面料类型id', popup:{code:'zy_fabric_type',field:'id',orgFields:'id',destFields:'content'}})
}else{ fieldList.push({type:'sel_search',value:'brandId',text:'材料品牌id',dictTable:'brand', dictText:'', dictCode:''})
httpurl+=this.url.edit; fieldList.push({type:'string',value:'fabricNumber',text:'材料编号',dictCode:''})
method = 'put'; fieldList.push({type:'int',value:'unit',text:'1、为m。2:kg,等',dictCode:'unit1,,'})
} fieldList.push({type:'int',value:'retailPrice',text:'零售价',dictCode:''})
httpAction(httpurl,this.model,method).then((res)=>{ fieldList.push({type:'sel_search',value:'density',text:'密度',dictTable:'density', dictText:'', dictCode:''})
if(res.success){ fieldList.push({type:'string',value:'clothW',text:'幅宽',dictCode:'clothW,,'})
that.$message.success(res.message); fieldList.push({type:'string',value:'location',text:'所在地区',dictCode:''})
that.$emit('ok'); fieldList.push({type:'int',value:'status',text:'状态 o 为下架 1为上架 ',dictCode:'fabric_status,,'})
}else{ fieldList.push({type:'int',value:'fabricGrade',text:'等级',dictCode:'fabric_grade,,'})
that.$message.warning(res.message); fieldList.push({type:'string',value:'qRcode',text:'二维码',dictCode:''})
} fieldList.push({type:'string',value:'name',text:'名称',dictCode:''})
}).finally(() => { fieldList.push({type:'sel_depart',value:'supplierInfo',text:'供货商信息'})
that.confirmLoading = false; fieldList.push({type:'string',value:'createTime',text:'创建时间',dictCode:''})
}) this.superFieldList = fieldList
}
})
}, },
} }
} }
</script> </script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -8,13 +8,14 @@
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }" :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel" @cancel="handleCancel"
cancelText="关闭"> cancelText="关闭">
<goods-fabric-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></goods-fabric-form> <goods-fabric-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" @onChangeRowKey="chuancan"></goods-fabric-form>
</j-modal> </j-modal>
</template> </template>
<script> <script>
import GoodsFabricForm from './GoodsFabricForm' import GoodsFabricForm from './GoodsFabricForm'
import {postAction} from "../../../api/manage";
export default { export default {
name: 'GoodsFabricModal', name: 'GoodsFabricModal',
components: { components: {
@ -22,14 +23,24 @@
}, },
data () { data () {
return { return {
model:{
goodsId:'',
fabricId:''
},
url: {
add: "/goodsfabric/goodsFabric/add",
edit: "/goodsfabric/goodsFabric/edit",
queryById: "/goodsfabric/goodsFabric/queryById"
},
title:'', title:'',
width:800, width:1500,
visible: false, visible: false,
disableSubmit: false disableSubmit: false
} }
}, },
methods: { methods: {
add () { add () {
this.model.goodsId = this.$route.query.goodsid;
this.visible=true this.visible=true
this.$nextTick(()=>{ this.$nextTick(()=>{
this.$refs.realForm.add(); this.$refs.realForm.add();
@ -46,7 +57,16 @@
this.visible = false; this.visible = false;
}, },
handleOk () { handleOk () {
this.$refs.realForm.submitForm(); 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(){ submitCallback(){
this.$emit('ok'); this.$emit('ok');
@ -54,7 +74,10 @@
}, },
handleCancel () { handleCancel () {
this.close() this.close()
} },
chuancan(res){
this.model.fabricId=res;
},
} }
} }
</script> </script>

@ -17,13 +17,13 @@
<a-button type="primary" icon="import">导入</a-button> <a-button type="primary" icon="import">导入</a-button>
</a-upload> </a-upload>
<!-- 高级查询区域 --> <!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
<a-dropdown v-if="selectedRowKeys.length > 0"> <!-- <a-dropdown v-if="selectedRowKeys.length > 0">-->
<a-menu slot="overlay"> <!-- <a-menu slot="overlay">-->
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> <!-- <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>-->
</a-menu> <!-- </a-menu>-->
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> <!-- <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>-->
</a-dropdown> <!-- </a-dropdown>-->
</div> </div>
<!-- table区域-begin --> <!-- table区域-begin -->
@ -69,21 +69,12 @@
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a> <a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a-dropdown> <a @click="handleDetail(record)">详情</a>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a> <a-divider type="vertical" />
<a-menu slot="overlay"> <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a-menu-item> <a>删除</a>
<a @click="handleDetail(record)">详情</a> </a-popconfirm>
</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> </span>
</a-table> </a-table>
@ -141,6 +132,11 @@
align:"center", align:"center",
dataIndex: 'place' dataIndex: 'place'
}, },
{
title: '创建时间',
align: "center",
dataIndex: 'createTime'
},
{ {
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',

@ -0,0 +1,305 @@
<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="queryParam.nums"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="服装款式">
<j-dict-select-tag v-model="queryParam.styleId"
placeholder="请选择服装款式"
dict-code="zy_cloths_style,style_names,nums">
</j-dict-select-tag>
<!-- <a-form-item label="款式">-->
<!-- <a-input placeholder="请输入款式" v-model="queryParam.styleId"></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>
<!-- <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>
<span v-else style="font-size: 12px;font-style: italic;">
<img :src="getImgView(text)" height="25px" alt=""
style="max-width:80px;font-size: 12px;font-style: italic;"/>
<a-divider type="vertical"/>
<a-button
:ghost="true"
type="primary"
size="small"
@click="lookFile(text)">
在线查看
</a-button>
</span>
</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">-->
<!-- <a @click="jumpPage(record)">模块样板</a>-->
<!-- </span>-->
<span slot="action" slot-scope="text, record">
<!-- <a @click="handleEdit(record)">编辑</a>-->
<!-- <a-divider type="vertical"/>-->
<!-- <a @click="fuzhi(record)">复制</a>-->
<!-- <a-divider type="vertical" />-->
<!-- <a @click="handleDetail(record.id)">详情</a>-->
<!-- <a @click="handleDetail(record)">详情</a>-->
<a-divider type="vertical"/>
<!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
<!-- <a>删除</a>-->
<!-- </a-popconfirm>-->
</span>
</a-table>
</div>
<ZyClothSampleDetail ref="ZyClothSampleDetail"></ZyClothSampleDetail>
<zy-cloth-sample-modal ref="modalForm" @ok="modalFormOk" v-bind="superFieldList"></zy-cloth-sample-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import ZyClothSampleModal from './modules/ZyClothSampleModal'
import ZyClothSampleDetail from '@views/product/productSample/modules/ZyClothSampleDetail'
export default {
name: "ProductSampleList", //
mixins: [JeecgListMixin, mixinDevice],
components: {
ZyClothSampleModal,
ZyClothSampleDetail
},
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: 'nums'
},
{
title: '服装款式',
align: "center",
dataIndex: 'styleId_dictText',
},
{
title: '款式型号',
align: "center",
dataIndex: 'stylemodelId_dictText',
//dictCode: 'modenumber',
},
// {
// title: '',
// align: "center",
// dataIndex: 'modelSample_dictText'
// },
// {
// title: '',
// dataIndex: 'action1',
// align: "center",
// fixed: "right",
// width: 110,
// scopedSlots: {customRender: 'action1'}
// },
{
title: '企业',
align: "center",
dataIndex: 'userId_dictText'
},
{
title: '创建时间',
align: "center",
dataIndex: 'createTime'
},
/*{
title: '图片',
align: "center",
dataIndex: 'url',
scopedSlots: {customRender: 'imgSlot'}
},*/
// {
// title: '',
// dataIndex: 'action1',
// align: "center",
// fixed: "right",
// width: 110,
// scopedSlots: {customRender: 'action1'}
// },
// {
// title: '',
// dataIndex: 'action',
// align: "center",
// fixed: "right",
// width: 147,
// scopedSlots: {customRender: 'action'}
// }
],
url: {
list: "/zyclothsample/zyClothSample/list",
edit: "/zyclothsample/zyClothSample/edit",
delete: "/zyclothsample/zyClothSample/delete",
deleteBatch: "/zyclothsample/zyClothSample/deleteBatch",
exportXlsUrl: "/zyclothsample/zyClothSample/exportXls",
importExcelUrl: "zyclothsample/zyClothSample/importExcel",
},
dictOptions: {},
superFieldList: [],
}
},
created() {
this.getSuperFieldList();
}
,
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig() {
},
jumpPage(record) {
this.$router.push({
path: '/src/views/sample/ZyModuleSampleList',
query: { //
'id': record.id,
}
});
},
lookFile(fileUrl) {
let file = window._CONFIG['domianURL'] + "/sys/common/static/" + fileUrl
let Base64 = require('js-base64').Base64;
let url = window._CONFIG['onlinePreviewDomainURL'] + '/onlinePreview?url=' + encodeURIComponent(Base64.encode(file))
window.open(url);
}
,
getSuperFieldList() {
let fieldList = [];
fieldList.push({type: 'string', value: 'nums', text: '编号', dictCode:''})
fieldList.push({type: 'string', value: 'styleId', text: '款式', dictCode:''})
fieldList.push({type: 'string', value: 'stylemodelId', text: '型号', dictCode: 'modenumber'})
fieldList.push({type: 'string', value: 'modelSample', text: '模块样板', dictCode: ''})
fieldList.push({type: 'string', value: 'userId', text: '用户名', dictCode: ''})
fieldList.push({type: 'string', value: 'createTime', text: '创建时间', dictCode: ''})
this.superFieldList = fieldList
}
,
openDetail(id) {
this.$refs.ZyClothSampleDetail.showModal(id)
// this.$children[0].showModal(id)
}
,
// handleDetail(id){
// this.$refs.ZyClothSampleDetail.showModal(id)
// }
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,125 @@
<template>
<div>
<a-modal
title="成衣样板-详情"
:visible="visible"
:confirm-loading="confirmLoading"
:width='1000'
@ok="handleOk"
@cancel="handleCancel"
style="display:flex;"
>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="url">-->
<!-- <j-image-upload isMultiple v-model="model.url" ></j-image-upload>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<a-descriptions bordered size="small" class="coin">
<a-descriptions-item label="编号" :span="2">
{{model.nums}}
</a-descriptions-item>
<a-descriptions-item label="客户" >
{{model.userId}}
</a-descriptions-item>
<a-descriptions-item label="成衣名称">
{{model.clothName}}
</a-descriptions-item>
<a-descriptions-item label="描述" >
{{model.descr}}
</a-descriptions-item>
<a-descriptions-item label="客户类型">
{{model.type}}
</a-descriptions-item>
<a-descriptions-item label="图片">
<j-image-upload isMultiple v-model="model.url" ></j-image-upload>
</a-descriptions-item>
</a-descriptions>
</a-form-model>
</j-form-container>
</a-spin>
</a-modal>
</div>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'ZyClothSampleDetail',
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: {
},
visible: false,
url: {
add: "/zyclothsample/zyClothSample/add",
edit: "/zyclothsample/zyClothSample/edit",
queryById: "/zyclothsample/zyClothSample/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
showModal(id) {
// console.log(this.selectId)
this.visible = true;
this.$http.get('/zyclothsample/zyClothSample/queryById?id='+id).then(
res=>{
this.model = res.result
console.log(this.data)
}
)
},
handleOk(e) {
this.ModalText = 'The modal will be closed after two seconds';
this.confirmLoading = true;
console.log(this.data)
setTimeout(() => {
this.visible = false;
this.confirmLoading = false;
}, 1);
},
handleCancel(e) {
console.log('Clicked cancel button');
this.visible = false;
},
}
}
</script>

@ -0,0 +1,229 @@
<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="enterpriseId">
<j-select-depart v-model="model.userId" @change="kuanshi" />
</a-form-model-item>
</a-col>
<!--关联服装款式表 zy_cloths_style 关联列名称 传值id
根据企业选择款式有的企业有选项有的没有
-->
<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="dict" @change="xiugai"></j-dict-select-tag>
</a-form-model-item>
<!--编码也是唯一的和id一样 -->
</a-col>
<a-col :span="24">
<a-form-model-item label="款式型号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="stylemodelId">
<!-- <a-input v-model="model.stylemodelId" placeholder="请输入款式型号" @change="(vaule) => handletypeSelect(value)"></a-input>-->
<!-- <j-dict-select-tag v-model="model.stylemodelId" placeholder="请输入款式型号"-->
<!-- dict-code="zy_style_model,model_number,model_number"></j-dict-select-tag>-->
<j-dict-select-tag v-model="model.stylemodelId" placeholder="请选择款式型号"
dictCode="modenumber" @change="gaibian"></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 || this.nums" placeholder="请输入编号"></a-input>-->
<a-input v-model="model.nums" placeholder="请输入编号" disabled></a-input>
</a-form-model-item>
</a-col>
<!--<j-dict-select-tag v-model="model.modelSample" placeholder="请选择模块样板"-->
<!-- dict-code="zy_module_sample, module_name, id"></j-dict-select-tag>-->
<!-- <j-search-select-tag v-model="model.modelSample" dict="zy_module_sample" dictText="module_name", dictCode="id" />-->
<!-- </a-form-model-item>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="用户名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">-->
<!-- &lt;!&ndash; <a-input v-model="model.userId" placeholder="请输入用户名"></a-input>&ndash;&gt;-->
<!-- <j-dict-select-tag v-model="model.userId" placeholder="请输入用户名"-->
<!-- dict-code="sys_user,username,username"></j-dict-select-tag>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<a-col :span="24">
<a-form-model-item label="描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="descr">
<a-textarea v-model="model.descr" placeholder="请输入描述"></a-textarea>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="url">
<j-image-upload isMultiple v-model="model.url"></j-image-upload>
</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: 'ZyClothSampleForm',
components: {},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
},
superFieldList: [], // table
},
data() {
return {
nums: '',
selectedKey: '', // id
typeid: '', // ,
serialNumber: '', //
model: {
nums:'',
},
dict:"zy_cloths_style,style_names,nums",
labelCol: {
xs: {span: 24},
sm: {span: 5},
},
wrapperCol: {
xs: {span: 24},
sm: {span: 16},
},
confirmLoading: false,
/*效验规则*/
validatorRules: {
// nums: [
// //{pattern: /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{4}$/, message: '4wei'},
// { required:true, message: ''},
// { pattern: /^[0-9A-Za-z]{0,20}$/, message: ''},
// //{pattern: /^(?=.*([0-9a-zA-Z]){5}).[A-Za-z0-9]+$/, message: ''},
// ],
styleId: [
{required: true, message: '款式不能为空'},
],
stylemodelId: [
{required: true, message: '款式型号不能为空'},
],
userId: [
{required: true, message: '用户名不能为空'},// required:false
//{ pattern: /^\d{6,16}$/, message: '616!'}
],
descr: [
{pattern: /^[0-9A-Za-z\u4e00-\u9fa5]{0,200}$/, message: '文本长度过长'},
]
},
url: {
add: "/zyclothsample/zyClothSample/add",
edit: "/zyclothsample/zyClothSample/edit",
queryById: "/zyclothsample/zyClothSample/queryById",
sort:"/zyclothsample/zyClothSample/sort"
}
}
},
computed: {
formDisabled() {
return this.disabled;
}
},
created() {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
mounted() {
// -
const str = `${this.selectedKey}${this.typeid}${''}`;
// const str = undefined;
str ? this.nums = str : this.nums = this.nums;
console.log(this.props, 'superFieldList')
},
methods: {
add() {
this.edit(this.modelDefault);
},
//
kuanshi(){
this.dict="zy_cloths_style,style_names,nums,enterprise_id="+"'"+this.model.userId+"'";
this.model.styleId=null
},
xiugai(){
if(this.model.stylemodelId!=null&&this.model.userId!=null){
this.gaibian()
}
},
gaibian(){
var n=3;
console.log(this.model)
getAction(this.url.sort,this.model).then((res)=>{
console.log(res)
if(this.model.id!=null){
var num=parseInt(res.result,10)
}else{
var num=parseInt(res.result,10)+1
}
num=num.toString()
while(num.length<n){
num="0"+num
}
this.model.nums=this.model.styleId+this.model.stylemodelId+num;
console.log( this.model.nums)
})},
// select
handleSelect(selectedKeys) {
this.selectedKey = selectedKeys;
},
// change
handletypeSelect(selectedKeys) {
this.type = selectedKeys;
},
edit(record) {
this.model = Object.assign({}, record);
this.dict="zy_cloths_style,style_names,nums,enterprise_id="+"'"+this.model.userId+"'";
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="关闭">
<zy-cloth-sample-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></zy-cloth-sample-form>
</j-modal>
</template>
<script>
import ZyClothSampleForm from './ZyClothSampleForm'
export default {
name: 'ZyClothSampleModal',
components: {
ZyClothSampleForm
},
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">
<zy-cloth-sample-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></zy-cloth-sample-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 ZyClothSampleForm from './ZyClothSampleForm'
export default {
name: 'ZyClothSampleModal',
components: {
ZyClothSampleForm
},
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>

@ -149,7 +149,7 @@ export default {
{ {
title: '设备编号', title: '设备编号',
align: "center", align: "center",
dataIndex: 'machineId' dataIndex: 'code'
}, },
{ {
title: '设备名称', title: '设备名称',

@ -145,9 +145,9 @@ export default {
dataIndex: 'stationName', dataIndex: 'stationName',
}, },
{ {
title: '工具编', title: '工具编',
align: "center", align: "center",
dataIndex: 'toolsId' dataIndex: 'nums'
}, },
{ {
title: '工具名称', title: '工具名称',

@ -139,6 +139,8 @@
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="chaidan(record)">拆单</a> <a @click="chaidan(record)">拆单</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a @click="shengchan(record)">生产</a>
<a-divider type="vertical" />
<a @click="handleEdit(record)">编辑</a> <a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a @click="handleDetail(record)">详情</a> <a @click="handleDetail(record)">详情</a>
@ -374,6 +376,7 @@
exportXlsUrl: "/zyorders/zyOrders/exportXls", exportXlsUrl: "/zyorders/zyOrders/exportXls",
importExcelUrl: "zyorders/zyOrders/importExcel", importExcelUrl: "zyorders/zyOrders/importExcel",
chaidan:"/zyorders/zyOrders/chaidan", chaidan:"/zyorders/zyOrders/chaidan",
shengchan:"zyorders/zyOrders/shengchan",
}, },
dictOptions:{}, dictOptions:{},
@ -405,6 +408,22 @@
this.$message.warning("该订单为子单,不可进行拆单!"); this.$message.warning("该订单为子单,不可进行拆单!");
} }
}, },
shengchan(record){
console.log(record)
if(record.goodsQuantity===1&&record.deliveryStatus===1){
getAction(this.url.shengchan,{id:record.id}).then((res) => {
if (res.success) {
this.$message.success("生产成功!");
this.loadData();
}else{
this.$message.error(res.message);
}
})
}else{
this.$message.warning("该订单不可生产!");
}
},
getPcaText(code){ getPcaText(code){
return this.pcaData.getText(code); return this.pcaData.getText(code);
}, },

@ -118,7 +118,7 @@ export default {
columns: [ columns: [
{ {
title: '服装款式', title: '服装款式',
width: '150px', width: '110px',
fixed: 'left', fixed: 'left',
key: 'styleId', key: 'styleId',
type: JVXETypes.select, type: JVXETypes.select,
@ -132,17 +132,17 @@ export default {
{ {
title: '是否默认尺码', title: '是否默认尺码',
align: "center", align: "center",
width: '50px', width: '130px',
key: 'isdefault', key: 'isdefault',
type: JVXETypes.select, type: JVXETypes.select,
dictCode: 'isdefault', dictCode: 'isdefault',
defaultValue: 0, defaultValue: 0,
}, },
{key: 'modelNumber', title: '型号编码', dictCode: 'modenumber', width: '120px', type: JVXETypes.select}, {key: 'modelNumber', title: '型号编码', dictCode: 'modenumber', width: '100px', type: JVXETypes.select},
{key: 'size', title: '码数', width: '90px', dictCode: 'size', type: JVXETypes.select}, {key: 'size', title: '码数', width: '85px', dictCode: 'size', type: JVXETypes.select},
{key: 'anumbers', title: '型', width: '80px', dictCode: 'hsize', type: JVXETypes.select}, {key: 'anumbers', title: '型', width: '85px', dictCode: 'hsize', type: JVXETypes.select},
{key: 'bnumbers', title: '号', width: '80px', dictCode: 'xsize', type: JVXETypes.select}, {key: 'bnumbers', title: '号', width: '85px', dictCode: 'xsize', type: JVXETypes.select},
{key: 'collarLarge', title: '领大', width: '80px', type: JVXETypes.input}, {key: 'collarLarge', title: '领大', width: '70px', type: JVXETypes.input},
{key: 'bust', title: '胸围', width: '80px', type: JVXETypes.input}, {key: 'bust', title: '胸围', width: '80px', type: JVXETypes.input},
{key: 'sleeveLength', title: '袖长', width: '80px', type: JVXETypes.input}, {key: 'sleeveLength', title: '袖长', width: '80px', type: JVXETypes.input},
{key: 'shslLength', title: '连肩袖长', width: '100px', type: JVXETypes.input}, {key: 'shslLength', title: '连肩袖长', width: '100px', type: JVXETypes.input},
@ -151,14 +151,14 @@ export default {
{key: 'cuff', title: '袖口', width: '80px', type: JVXETypes.input}, {key: 'cuff', title: '袖口', width: '80px', type: JVXETypes.input},
{key: 'waistline', title: '腰围', width: '80px', type: JVXETypes.input}, {key: 'waistline', title: '腰围', width: '80px', type: JVXETypes.input},
{key: 'hem', title: '下摆', width: '80px', type: JVXETypes.input}, {key: 'hem', title: '下摆', width: '80px', type: JVXETypes.input},
{key: 'createTime', title: '创建时间', width: '100px', type: JVXETypes.datetime}, {key: 'createTime', title: '创建时间', width: '60px', type: JVXETypes.datetime},
{ {
title: '操作', title: '操作',
key: 'action', key: 'action',
type: JVXETypes.slot, type: JVXETypes.slot,
fixed: 'right', fixed: 'right',
minWidth: '80px', minWidth: '100px',
align: 'center', align: 'center',
slotName: 'action', slotName: 'action',
} }
@ -203,16 +203,19 @@ export default {
let method = 'post'; let method = 'post';
//httpUrl += this.url.add; //httpUrl += this.url.add;
//method = 'post'; //method = 'post';
let that = this;
httpAction(httpUrl, event.row, method).then((res) => { httpAction(httpUrl, event.row, method).then((res) => {
if (res.success) { if (res.success) {
this.$message.success(res.message); that.reCalculatePage(1);
that.$message.success(res.message);
this.$emit('ok'); this.$emit('ok');
that.loadData();
} else { } else {
this.$message.warning(res.message); this.$message.warning(res.message);
} }
}) })
}, },
// //
handleValueChange(event) { handleValueChange(event) {
//this.submitForm(event) //this.submitForm(event)

@ -82,8 +82,19 @@ public class GoodsAccessoriesController extends JeecgController<GoodsAccessories
@AutoLog(value = "商品辅料表-添加") @AutoLog(value = "商品辅料表-添加")
@ApiOperation(value="商品辅料表-添加", notes="商品辅料表-添加") @ApiOperation(value="商品辅料表-添加", notes="商品辅料表-添加")
@PostMapping(value = "/add") @PostMapping(value = "/add")
public Result<?> add(@RequestBody GoodsAccessories goodsAccessories) { public Result<?> add(@RequestBody GoodsAccessories goodsAccessories,HttpServletRequest req) {
goodsAccessoriesService.save(goodsAccessories); String[] split = goodsAccessories.getAccessoriesId().split(",");
QueryWrapper<GoodsAccessories> queryWrapper = QueryGenerator.initQueryWrapper(goodsAccessories, req.getParameterMap());
queryWrapper.eq("goods_id",goodsAccessories.getGoodsId());
for (String s : split) {
goodsAccessories.setAccessoriesId(s);
goodsAccessories.setId(null);
queryWrapper.eq("accessories_id", goodsAccessories.getAccessoriesId());
int a = goodsAccessoriesService.count(queryWrapper);
if (a >= 1)
return Result.error("存在已添加过的数据!");
goodsAccessoriesService.save(goodsAccessories);
}
return Result.OK("添加成功!"); return Result.OK("添加成功!");
} }

@ -82,8 +82,19 @@ public class GoodsFabricController extends JeecgController<GoodsFabric, IGoodsFa
@AutoLog(value = "商品面料表-添加") @AutoLog(value = "商品面料表-添加")
@ApiOperation(value="商品面料表-添加", notes="商品面料表-添加") @ApiOperation(value="商品面料表-添加", notes="商品面料表-添加")
@PostMapping(value = "/add") @PostMapping(value = "/add")
public Result<?> add(@RequestBody GoodsFabric goodsFabric) { public Result<?> add(@RequestBody GoodsFabric goodsFabric,HttpServletRequest req) {
goodsFabricService.save(goodsFabric); String[] split = goodsFabric.getFabricId().split(",");
QueryWrapper<GoodsFabric> queryWrapper = QueryGenerator.initQueryWrapper(goodsFabric, req.getParameterMap());
queryWrapper.eq("goods_id",goodsFabric.getGoodsId());
for (String s : split) {
goodsFabric.setFabricId(s);
goodsFabric.setId(null);
queryWrapper.eq("fabric_id", goodsFabric.getFabricId());
int a = goodsFabricService.count(queryWrapper);
if (a >= 1)
return Result.error("存在已添加过的数据!");
goodsFabricService.save(goodsFabric);
}
return Result.OK("添加成功!"); return Result.OK("添加成功!");
} }

@ -133,21 +133,39 @@ public class ZyOrdersController extends JeecgController<ZyOrders, IZyOrdersServi
} }
/** /**
* 通过id查询 * 生产
* *
* @param id * @param id
* @return * @return
*/ */
@AutoLog(value = "订单基本信息管理-通过id查询") @AutoLog(value = "生产")
@ApiOperation(value="订单基本信息管理-通过id查询", notes="订单基本信息管理-通过id查询") @ApiOperation(value="生产", notes="生产")
@GetMapping(value = "/queryById") @GetMapping(value = "/shengchan")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) { public Result<?> shengchan(@RequestParam(name="id",required=true) String id) {
ZyOrders zyOrders = zyOrdersService.getById(id); ZyOrders zyOrders = zyOrdersService.getById(id);
if(zyOrders==null) { if(zyOrders==null) {
return Result.error("未找到对应数据"); return Result.error("未找到对应数据");
} }
return Result.OK(zyOrders); zyOrders.setDeliveryStatus(2);
zyOrdersService.updateById(zyOrders);
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) {
ZyOrders zyOrders = zyOrdersService.getById(id);
if(zyOrders==null) {
return Result.error("未找到对应数据");
}
return Result.OK(zyOrders);
}
/** /**
* 生成订单编号 * 生成订单编号
* *

@ -66,6 +66,13 @@ public class StationMachineController extends JeecgController<StationMachine, IS
QueryWrapper<StationMachine> queryWrapper = QueryGenerator.initQueryWrapper(stationMachine, req.getParameterMap()); QueryWrapper<StationMachine> queryWrapper = QueryGenerator.initQueryWrapper(stationMachine, req.getParameterMap());
Page<StationMachine> page = new Page<StationMachine>(pageNo, pageSize); Page<StationMachine> page = new Page<StationMachine>(pageNo, pageSize);
IPage<StationMachine> pageList = stationMachineService.page(page, queryWrapper); IPage<StationMachine> pageList = stationMachineService.page(page, queryWrapper);
List<StationMachine> records = pageList.getRecords();
if (!ObjectUtils.isEmpty(records)) {
records.forEach(e -> {
ZyDevice zyDevice = iZyDeviceService.getById(e.getMachineId());
e.setCode(StringUtils.isNotBlank(zyDevice.getCode()) ? zyDevice.getCode() : "");
});
}
return Result.OK(pageList); return Result.OK(pageList);
} }

@ -15,7 +15,9 @@ import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.demo.tool.entity.ZyTool; import org.jeecg.modules.demo.tool.entity.ZyTool;
import org.jeecg.modules.demo.tool.service.IZyToolService; import org.jeecg.modules.demo.tool.service.IZyToolService;
import org.jeecg.modules.device.entity.ZyDevice;
import org.jeecg.modules.device.service.IZyDeviceService; import org.jeecg.modules.device.service.IZyDeviceService;
import org.jeecg.modules.team.entity.StationMachine;
import org.jeecg.modules.team.entity.StationTool; import org.jeecg.modules.team.entity.StationTool;
import org.jeecg.modules.team.service.IStationToolService; import org.jeecg.modules.team.service.IStationToolService;
import org.jeecg.modules.team.vo.StationToolVo; import org.jeecg.modules.team.vo.StationToolVo;
@ -69,6 +71,13 @@ public class StationToolController extends JeecgController<StationTool, IStation
QueryWrapper<StationTool> queryWrapper = QueryGenerator.initQueryWrapper(stationTool, req.getParameterMap()); QueryWrapper<StationTool> queryWrapper = QueryGenerator.initQueryWrapper(stationTool, req.getParameterMap());
Page<StationTool> page = new Page<StationTool>(pageNo, pageSize); Page<StationTool> page = new Page<StationTool>(pageNo, pageSize);
IPage<StationTool> pageList = stationToolService.page(page, queryWrapper); IPage<StationTool> pageList = stationToolService.page(page, queryWrapper);
List<StationTool> records = pageList.getRecords();
if (!ObjectUtils.isEmpty(records)) {
records.forEach(e -> {
ZyTool zyTool = iZyToolService.getById(e.getToolsId());
e.setNums(StringUtils.isNotBlank(zyTool.getNums()) ? zyTool.getNums() : "");
});
}
return Result.OK(pageList); return Result.OK(pageList);
} }
@ -77,14 +86,14 @@ public class StationToolController extends JeecgController<StationTool, IStation
public Result<?> list2(StationTool stationTool, public Result<?> list2(StationTool stationTool,
// @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, // @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
// @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, // @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) { HttpServletRequest req) {
// QueryWrapper<StationTool> queryWrapper = QueryGenerator.initQueryWrapper(stationTool, req.getParameterMap()); // QueryWrapper<StationTool> queryWrapper = QueryGenerator.initQueryWrapper(stationTool, req.getParameterMap());
// Page<StationTool> page = new Page<StationTool>(pageNo, pageSize); // Page<StationTool> page = new Page<StationTool>(pageNo, pageSize);
// IPage<StationTool> pageList = stationToolService.page(page, queryWrapper); // IPage<StationTool> pageList = stationToolService.page(page, queryWrapper);
List<StationToolVo> voList = new LinkedList<>(); List<StationToolVo> voList = new LinkedList<>();
List<StationTool> toolList = stationToolService.list(new LambdaQueryWrapper<StationTool>().eq(StationTool::getStationId, stationTool.getStationId())); List<StationTool> toolList = stationToolService.list(new LambdaQueryWrapper<StationTool>().eq(StationTool::getStationId, stationTool.getStationId()));
if(!ObjectUtils.isEmpty(toolList)){ if (!ObjectUtils.isEmpty(toolList)) {
toolList.forEach(en->{ toolList.forEach(en -> {
StationToolVo stationVo = new StationToolVo(); StationToolVo stationVo = new StationToolVo();
stationVo.setId(en.getToolsId()); stationVo.setId(en.getToolsId());
stationVo.setValue(en.getToolsId()); stationVo.setValue(en.getToolsId());

@ -1,6 +1,7 @@
package org.jeecg.modules.team.entity; package org.jeecg.modules.team.entity;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
@ -47,6 +48,10 @@ public class StationMachine {
@ApiModelProperty(value = "设备id,uuid,FK,设备表") @ApiModelProperty(value = "设备id,uuid,FK,设备表")
@Dict(dictTable = "zy_device", dicText = "name", dicCode = "id") @Dict(dictTable = "zy_device", dicText = "name", dicCode = "id")
private String machineId; private String machineId;
@TableField(exist = false)
@ApiModelProperty(value = "设备编码")
private String code;
/** /**
* 创建日期 * 创建日期
*/ */

@ -1,6 +1,7 @@
package org.jeecg.modules.team.entity; package org.jeecg.modules.team.entity;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
@ -47,6 +48,10 @@ public class StationTool {
@ApiModelProperty(value = "工具id,uuid,FK,工具表") @ApiModelProperty(value = "工具id,uuid,FK,工具表")
@Dict(dictTable = "zy_tool", dicText = "name", dicCode = "id") @Dict(dictTable = "zy_tool", dicText = "name", dicCode = "id")
private String toolsId; private String toolsId;
@TableField(exist = false)
@ApiModelProperty(value = "工具编码")
private String nums;
/** /**
* 创建日期 * 创建日期
*/ */

@ -112,5 +112,11 @@ public class ZyStyleModel implements Serializable {
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "创建时间")
private java.util.Date createTime; private java.util.Date createTime;
/**更新时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新时间")
private java.util.Date updateTime;
} }

Loading…
Cancel
Save