2022-12-26问题

zhc4dev
lenovo 2 years ago
parent d7a60a011e
commit 27f05bdade
  1. 28
      ant-design-vue-jeecg/src/views/erp/accessories/ZyAccessoriesList.vue
  2. 13
      ant-design-vue-jeecg/src/views/erp/accessories/ZyAccessoriesTypeList.vue
  3. 14
      ant-design-vue-jeecg/src/views/erp/accessories/modules/ZyAccessoriesForm.vue
  4. 8
      ant-design-vue-jeecg/src/views/erp/fabric/ZyFabricList.vue
  5. 24
      ant-design-vue-jeecg/src/views/erp/fabric/modules/ZyFabricForm.vue
  6. 5
      ant-design-vue-jeecg/src/views/erp/fabric/modules/ZyFabricFormDetailModel.vue
  7. 15
      ant-design-vue-jeecg/src/views/process/ZyProcessList.vue
  8. 25
      ant-design-vue-jeecg/src/views/process/modules/ZyProcessForm.vue
  9. 2
      ant-design-vue-jeecg/src/views/process/modules/ZyProcessModal1.vue
  10. 2
      ant-design-vue-jeecg/src/views/process/modules/ZyProcessModal2.vue
  11. 2
      ant-design-vue-jeecg/src/views/process/modules/ZyProcessModal3.vue
  12. 2
      ant-design-vue-jeecg/src/views/process/modules/ZyProcessModal4.vue
  13. 2
      ant-design-vue-jeecg/src/views/process/modules/ZyProcessModal5.vue
  14. 14
      ant-design-vue-jeecg/src/views/zyclothsample/modules/ZyClothSampleForm.vue
  15. 2
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/controller/ZyFabricController.java
  16. 4
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/entity/ZyFabric.java
  17. 2
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/mapper/ZyFabricMapper.java
  18. 5
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyProcessController.java
  19. 1
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyProcess.java

@ -84,22 +84,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 class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record.id)">详情</a> <a @click="handleDetail(record.id)">详情</a>
</a-menu-item>
<a-menu-item> <a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a> <a>删除</a>
</a-popconfirm> </a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span> </span>
</a-table> </a-table>
@ -154,11 +150,11 @@
align:"center", align:"center",
dataIndex: 'contents' dataIndex: 'contents'
}, },
{ // {
title:'图片', // title:'',
align:"center", // align:"center",
dataIndex: 'picture' // dataIndex: 'picture'
}, // },
{ {
title:'材质', title:'材质',
align:"center", align:"center",

@ -87,19 +87,14 @@
<a @click="handleEdit(record)">编辑</a> <a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" /> <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 @click="handleDetail(record)">详情</a>
</a-menu-item> <a-divider type="vertical" />
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a> <a>删除</a>
</a-popconfirm> </a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span> </span>
</a-table> </a-table>

@ -33,20 +33,20 @@
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="11"> <!-- <a-col :span="11">-->
<a-form-model-item label="库存量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="store"> <!-- <a-form-model-item label="库存量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="store">-->
<a-input-number v-model="model.store" placeholder="请输入库存量" style="width: 100%" /> <!-- <a-input-number v-model="model.store" placeholder="请输入库存量" style="width: 100%" />-->
</a-form-model-item> <!-- </a-form-model-item>-->
</a-col> <!-- </a-col>-->
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specs"> <a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specs">
<a-input v-model="model.specs" placeholder="请输入规格" ></a-input> <a-input v-model="model.specs" placeholder="请输入规格" ></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="11"> <a-col :span="11">
<a-form-model-item label="供商信息" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="supplierInfo"> <a-form-model-item label="供商信息" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="supplierInfo">
<j-select-depart v-model="model.supplierInfo" placeholder="请输入供商信息" /> <j-select-depart v-model="model.supplierInfo" placeholder="请输入供商信息" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">

@ -122,10 +122,10 @@
<a @click="handleEdit(record)">编辑</a> <a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a @click="fuzhi(record)">复制</a> <a @click="fuzhi1(record)">复制</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a @click="handleDetail(record.id)">详情</a> <a @click="handleDetail(record.id,record.supplierInfo_dictText)">详情</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
@ -332,8 +332,8 @@ import ZyFabricFormDetailModel from './modules/ZyFabricFormDetailModel'
fieldList.push({type:'string',value:'createTime',text:'创建时间',dictCode:''}) fieldList.push({type:'string',value:'createTime',text:'创建时间',dictCode:''})
this.superFieldList = fieldList this.superFieldList = fieldList
}, },
handleDetail(id){ handleDetail(id,name){
this.$refs.ZyFabricFormDetailModel.showModal(id) this.$refs.ZyFabricFormDetailModel.showModal(id,name)
// this.$children[0].showModal(id) // this.$children[0].showModal(id)
} }
} }

@ -44,7 +44,7 @@
</a-col> </a-col>
<a-col :span="11"> <a-col :span="11">
<a-form-model-item label="单价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="money"> <a-form-model-item label="单价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="money">
<a-input-number v-model="model.money" placeholder="请输入单价" :precision="2" :min="0" style="width: 100%" /> <a-input v-model="model.money" placeholder="请输入单价" :precision="2" :min="0" style="width: 100%" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
@ -55,7 +55,7 @@
</a-col> </a-col>
<a-col :span="11"> <a-col :span="11">
<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-input v-model="model.retailPrice" placeholder="请输入零售价" style="width: 100%" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
@ -91,8 +91,8 @@
<!-- </a-form-model-item>--> <!-- </a-form-model-item>-->
<!-- </a-col>--> <!-- </a-col>-->
<a-col :span="11"> <a-col :span="11">
<a-form-model-item label="供商" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="supplierInfo"> <a-form-model-item label="供商" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="supplierInfo">
<j-select-depart v-model="model.supplierInfo" multi /> <j-select-depart v-model="model.supplierInfo" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
@ -317,11 +317,11 @@
], ],
money: [ money: [
{ required: true, message: '请输入单价!'}, { required: true, message: '请输入单价!'},
{pattern: /^\d+$/,message:'请输入正数'} {pattern: /^\d*\.?\d+$/,message:'请输入正数'}
], ],
retailPrice: [ retailPrice: [
{ required: true, message: '请输入零售价!'}, { required: true, message: '请输入零售价!'},
{pattern: /^\d+$/,message:'请输入正数'} {pattern: /^\d*\.?\d+$/,message:'请输入正数'}
], ],
// money: [ // money: [
// { required: false}, // { required: false},
@ -374,6 +374,18 @@
}, },
edit (record) { edit (record) {
this.model = Object.assign({}, record); this.model = Object.assign({}, record);
if(this.model.codes==1){
getAction(this.url.sort,this.model).then((res)=>{
console.log(res)
var num=parseInt(res.result,10)+1
num=num.toString()
while(num.length<10){
num="0"+num
}
this.model.fabricNumber="ML"+this.model.typeId+this.model.material+num;
console.log(this.model.typeId)
})
}
this.visible = true; this.visible = true;
}, },
submitForm () { submitForm () {

@ -217,15 +217,18 @@
this.modelDefault = JSON.parse(JSON.stringify(this.model)); this.modelDefault = JSON.parse(JSON.stringify(this.model));
}, },
methods: { methods: {
showModal(id) { showModal(id,name) {
this.visible = true; this.visible = true;
this.$http.get('/fabric/zyFabric/queryById?id='+id).then( this.$http.get('/fabric/zyFabric/queryById?id='+id).then(
res=>{ res=>{
this.model = res.result this.model = res.result
this.model.supplierInfo=name
console.log(this.model) console.log(this.model)
} }
) )
}, },
handleOk() { handleOk() {
this.ModalText = 'The modal will be closed after two seconds'; this.ModalText = 'The modal will be closed after two seconds';

@ -109,15 +109,18 @@
<a @click="fuzhi(record)">复制</a> <a @click="fuzhi(record)">复制</a>
<a-divider type="vertical"/> <a-divider type="vertical"/>
<a @click="dongzuo(record.id)">动作</a> <a @click="dongzuo(record.id,record.processName)">动作</a>
<a-divider type="vertical"/> <a-divider type="vertical"/>
<a @click="shebei(record.id)">设备</a> <a @click="fuliao(record.id,record.processName)">面料</a>
<a-divider type="vertical"/> <a-divider type="vertical"/>
<a @click="fuliao(record.id)"></a> <a @click="mianliao(record.id,record.processName)"></a>
<a-divider type="vertical"/> <a-divider type="vertical"/>
<a @click="gongju(record.id)">工具</a> <a @click="shebei(record.id,record.processName)">设备</a>
<a-divider type="vertical"/> <a-divider type="vertical"/>
<a @click="mianliao(record.id)">辅料</a> <a @click="gongju(record.id,record.processName)">工具</a>
<a-divider type="vertical"/> <a-divider type="vertical"/>
<a-dropdown> <a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down"/></a> <a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
@ -235,7 +238,7 @@ export default {
{ {
title: '工序等级', title: '工序等级',
align: "center", align: "center",
dataIndex: 'grade' dataIndex: 'grade_dictText'
}, },
// { // {
// title:'', // title:'',

@ -42,7 +42,7 @@
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="工序时间(秒)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processTime"> <a-form-model-item label="工序时间(秒)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processTime">
<a-input v-model="model.processTime" placeholder="请输入工序时间" ></a-input> <a-input-number v-model="model.processTime" placeholder="请输入工序时间" ></a-input-number>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="11"> <a-col :span="11">
@ -52,7 +52,8 @@
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="工序等级(键值对)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="grade"> <a-form-model-item label="工序等级(键值对)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="grade">
<a-input v-model="model.grade" placeholder="请输入工序等级" ></a-input> <j-dict-select-tag placeholder="请输入工序等级" dictCode="fabric_grade"
v-model="model.grade"></j-dict-select-tag>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<!-- <a-col :span="24">--> <!-- <a-col :span="24">-->
@ -77,7 +78,7 @@
<!-- </a-col>--> <!-- </a-col>-->
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="手工宽放(毫米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="manualWide"> <a-form-model-item label="手工宽放(毫米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="manualWide">
<a-input v-model="model.manualWide" placeholder="请输入手工宽放" ></a-input> <a-input-number v-model="model.manualWide" placeholder="请输入手工宽放" ></a-input-number>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="11"> <a-col :span="11">
@ -92,7 +93,7 @@
</a-col> </a-col>
<a-col :span="11"> <a-col :span="11">
<a-form-model-item label="机器宽放(毫米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="machineWide"> <a-form-model-item label="机器宽放(毫米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="machineWide">
<a-input v-model="model.machineWide" placeholder="请输入机器宽放" ></a-input> <a-input-number v-model="model.machineWide" placeholder="请输入机器宽放" ></a-input-number>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
@ -107,7 +108,7 @@
<!-- </a-col>--> <!-- </a-col>-->
<a-col :span="11"> <a-col :span="11">
<a-form-model-item label="绑包宽放(毫米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bundleWide"> <a-form-model-item label="绑包宽放(毫米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bundleWide">
<a-input v-model="model.bundleWide" placeholder="请输入绑包宽放" ></a-input> <a-input-number v-model="model.bundleWide" placeholder="请输入绑包宽放" ></a-input-number>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
@ -301,6 +302,20 @@
}, },
edit (record) { edit (record) {
this.model = Object.assign({}, record); this.model = Object.assign({}, record);
this.model.typeName=this.model.styleId_dictText
if(this.model.codes==1){
var n=6;
getAction(this.url.sort,{id:this.model.styleId}).then((res)=>{
// console.log(res.result)
var num=parseInt(res.result,10)+1
num=num.toString()
while(num.length<n){
num="0"+num
}
this.model.processCode=this.model.styleId+num;
// console.log(this.model.processCode)
})
}
this.visible = true; this.visible = true;
}, },
submitForm () { submitForm () {

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

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

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

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

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

@ -13,7 +13,7 @@
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="款式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleId"> <a-form-model-item label="款式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleId">
<j-dict-select-tag v-model="model.styleId" placeholder="请输入款式" <j-dict-select-tag v-model="model.styleId" placeholder="请输入款式"
:dict-code="dict"></j-dict-select-tag> :dict-code="dict" @change="xiugai"></j-dict-select-tag>
</a-form-model-item> </a-form-model-item>
<!-- 编码也是唯一的和id一样 --> <!-- 编码也是唯一的和id一样 -->
</a-col> </a-col>
@ -153,13 +153,24 @@ export default {
// //
kuanshi(){ kuanshi(){
this.dict="zy_cloths_style,style_names,nums,enterprise_id="+"'"+this.model.userId+"'"; 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(){ gaibian(){
var n=3; var n=3;
console.log(this.model) console.log(this.model)
getAction(this.url.sort,this.model).then((res)=>{ getAction(this.url.sort,this.model).then((res)=>{
console.log(res) console.log(res)
if(this.model.id!=null){
var num=parseInt(res.result,10)
}else{
var num=parseInt(res.result,10)+1 var num=parseInt(res.result,10)+1
}
num=num.toString() num=num.toString()
while(num.length<n){ while(num.length<n){
num="0"+num num="0"+num
@ -177,6 +188,7 @@ export default {
}, },
edit(record) { edit(record) {
this.model = Object.assign({}, record); this.model = Object.assign({}, record);
this.dict="zy_cloths_style,style_names,nums,enterprise_id="+"'"+this.model.userId+"'";
this.visible = true; this.visible = true;
} }
, ,

@ -89,7 +89,7 @@ public class ZyFabricController extends JeecgController<ZyFabric, IZyFabricServi
if(zyFabric.getName()!=null&&!zyFabric.getName().equals("")){ if(zyFabric.getName()!=null&&!zyFabric.getName().equals("")){
queryWrapper.like("name",zyFabric.getName()); queryWrapper.like("name",zyFabric.getName());
} }
queryWrapper.orderByDesc("create_time");
// QueryWrapper queryWrapper = new QueryWrapper(); // QueryWrapper queryWrapper = new QueryWrapper();
Page<ZyFabric> page = new Page<>(pageNo, pageSize); Page<ZyFabric> page = new Page<>(pageNo, pageSize);
IPage<ZyFabric> pageList = zyFabricService.page(page, queryWrapper); IPage<ZyFabric> pageList = zyFabricService.page(page, queryWrapper);

@ -60,7 +60,7 @@ public class ZyFabric implements Serializable {
/**单价*/ /**单价*/
@Excel(name = "单价", width = 15) @Excel(name = "单价", width = 15)
@ApiModelProperty(value = "单价") @ApiModelProperty(value = "单价")
private java.lang.Integer money; private BigDecimal money;
/**图片地址*/ /**图片地址*/
// @Excel(name = "图片地址", width = 15) // @Excel(name = "图片地址", width = 15)
@ApiModelProperty(value = "图片地址") @ApiModelProperty(value = "图片地址")
@ -95,7 +95,7 @@ public class ZyFabric implements Serializable {
/**零售价*/ /**零售价*/
@Excel(name = "零售价", width = 15) @Excel(name = "零售价", width = 15)
@ApiModelProperty(value = "零售价") @ApiModelProperty(value = "零售价")
private java.lang.Integer retailPrice; private BigDecimal retailPrice;
/**密度*/ /**密度*/
@Excel(name = "密度", width = 15, dictTable = "", dicText = "", dicCode = "density") @Excel(name = "密度", width = 15, dictTable = "", dicText = "", dicCode = "density")
@Dict(dictTable = "", dicText = "", dicCode = "density") @Dict(dictTable = "", dicText = "", dicCode = "density")

@ -52,7 +52,7 @@ public interface ZyFabricMapper extends BaseMapper<ZyFabric> {
//查出所有的工具统计信息:编号,库存和所在仓库 //查出所有的工具统计信息:编号,库存和所在仓库
public List<StaticVo> findAllStaticTool(); public List<StaticVo> findAllStaticTool();
@Select("select id from zy_fabric_type where content like #{s}") @Select("select nums from zy_fabric_type where content like #{s}")
List<String> findAllid(String s); List<String> findAllid(String s);
@Select("select fabric_number from zy_fabric where type_id=#{typeId} and material=#{material} order by fabric_number desc limit 0,1") @Select("select fabric_number from zy_fabric where type_id=#{typeId} and material=#{material} order by fabric_number desc limit 0,1")

@ -111,11 +111,6 @@ public class ZyProcessController extends JeecgController<ZyProcess, IZyProcessSe
@ApiOperation(value = "zy_process-编辑", notes = "zy_process-编辑") @ApiOperation(value = "zy_process-编辑", notes = "zy_process-编辑")
@PutMapping(value = "/edit") @PutMapping(value = "/edit")
public Result<?> edit(@RequestBody ZyProcess zyProcess) { public Result<?> edit(@RequestBody ZyProcess zyProcess) {
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("process_name", zyProcess.getProcessName());
int a = zyProcessService.count(queryWrapper);
if (a != 0)
return Result.error("编辑失败,该工序名称已存在!!!");
zyProcessService.updateById(zyProcess); zyProcessService.updateById(zyProcess);
return Result.OK("编辑成功!"); return Result.OK("编辑成功!");
} }

@ -85,6 +85,7 @@ public class ZyProcess implements Serializable {
*/ */
@Excel(name = "工序等级", width = 15) @Excel(name = "工序等级", width = 15)
@ApiModelProperty(value = "工序等级") @ApiModelProperty(value = "工序等级")
@Dict(dicCode = "fabric_grade")
private java.lang.String grade; private java.lang.String grade;
// /**面料代码*/ // /**面料代码*/
// @Excel(name = "面料代码", width = 15) // @Excel(name = "面料代码", width = 15)

Loading…
Cancel
Save