2023-2-22用量

zhc4dev
lenovo 2 years ago
parent 9c83e02237
commit 20223679b8
  1. 35
      ant-design-vue-jeecg/src/views/process/modules/ZyProcessAccessoriesList.vue
  2. 37
      ant-design-vue-jeecg/src/views/process/modules/ZyProcessFabricList.vue
  3. 9
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/entity/ZyProcessAccessories.java
  4. 9
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/entity/ZyProcessFabric.java

@ -79,6 +79,8 @@
</template>
<span slot="action" slot-scope="text, record">
<a @click="yongliang(record.id)">设置用量</a>
<a-divider type="vertical" />
<a @click="handleDetail(record.accessoriesId)">详情</a>
<a-divider type="vertical" />
@ -106,6 +108,7 @@
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ZyProcessAccessoriesModal from './ZyProcessAccessoriesModal'
import ZyAccessoriesFormDetail from '@/views/erp/accessories/modules/ZyAccessoriesFormDetail'
import {httpAction} from "@api/manage";
export default {
name: 'ZyProcessAccessoriesList',
mixins:[JeecgListMixin, mixinDevice],
@ -158,6 +161,11 @@
align:"center",
dataIndex: 'accessoriesId_dictText'
},
{
title:'用量',
align:"center",
dataIndex: 'amount'
},
{
title: '操作',
dataIndex: 'action',
@ -173,7 +181,7 @@
deleteBatch: "/pro/zyProcessAccessories/deleteBatch",
exportXlsUrl: "/pro/zyProcessAccessories/exportXls",
importExcelUrl: "pro/zyProcessAccessories/importExcel",
edit:"pro/zyProcessAccessories/edit"
},
dictOptions:{},
superFieldList:[],
@ -196,6 +204,31 @@
this.visible = true;
},
yongliang(id){
var a=window.prompt("请设置用量:")
var guize=/^(([1-9]{1}\d*)|(0{1}))(\.\d{1})?$/
if(a!=null)
{
if(guize.test(a)){
var model={};
model.id=id;
model.amount=a;
httpAction(this.url.edit,model,'put').then((res)=>{
if(res.success){
this.$message.success(res.message);
this.loadData();
}else{
this.$message.warning(res.message);
}
})
}else{
this.$message.warning("请输入保留一位小数");
return
}
}
else
return
},
valueChange(value){
if (value) this.loadData()
},

@ -84,7 +84,9 @@
</template>
<span slot="action" slot-scope="text, record">
<!-- <a @click="handleEdit1(record,code)">编辑</a>-->
<a @click="yongliang(record.id)">设置用量</a>
<a-divider type="vertical" />
<a @click="handleDetail(record.fabricId,record.fabricId_dictText)">详情</a>
<a-divider type="vertical" />
@ -113,6 +115,7 @@
import ZyProcessFabricModal from './ZyProcessFabricModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import ZyFabricFormDetailModel from '@/views/erp/fabric/modules/ZyFabricFormDetailModel'
import {httpAction} from "@api/manage";
export default {
name: 'ZyProcessFabricList',
@ -166,6 +169,11 @@
align:"center",
dataIndex: 'fabricId_dictText'
},
{
title:'用量',
align:"center",
dataIndex: 'amount'
},
{
title: '操作',
dataIndex: 'action',
@ -181,7 +189,7 @@
deleteBatch: "/pro/zyProcessFabric/deleteBatch",
exportXlsUrl: "/pro/zyProcessFabric/exportXls",
importExcelUrl: "pro/zyProcessFabric/importExcel",
edit:"pro/zyProcessFabric/edit"
},
dictOptions:{},
superFieldList:[],
@ -196,6 +204,31 @@
},
},
methods: {
yongliang(id){
var a=window.prompt("请设置用量:")
var guize=/^(([1-9]{1}\d*)|(0{1}))(\.\d{1})?$/
if(a!=null)
{
if(guize.test(a)){
var model={};
model.id=id;
model.amount=a;
httpAction(this.url.edit,model,'put').then((res)=>{
if(res.success){
this.$message.success(res.message);
this.loadData();
}else{
this.$message.warning(res.message);
}
})
}else{
this.$message.warning("请输入保留一位小数");
return
}
}
else
return
},
edit (record) {
this.id = record;
this.queryParam.processId=this.id;

@ -5,6 +5,7 @@ import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@ -65,7 +66,11 @@ public class ZyProcessAccessories implements Serializable {
@ApiModelProperty(value = "面料表id")
private String accessoriesId;
// private String processCode;
// private String nums;
@ApiModelProperty(value = "用量")
private String amount;
@TableField(exist = false)
private String processCode;
@TableField(exist = false)
private String nums;
}

@ -1,6 +1,7 @@
package org.jeecg.modules.demo.pro.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
@ -49,8 +50,12 @@ public class ZyProcessFabric implements Serializable {
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "创建时间")
private Date createTime;
@ApiModelProperty(value = "用量")
private String amount;
@TableField(exist = false)
private String processCode;
@TableField(exist = false)
private String fabricNumber;
// private String processCode;
// private String fabricNumber;
}

Loading…
Cancel
Save