Merge branch 'develop' of https://e.coding.net/ctcdevteam/hberp/hberp into develop
This commit is contained in:
commit
9be4c480e7
|
@ -160,7 +160,7 @@
|
|||
</el-form-item>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="编号">
|
||||
<el-input v-model="number" placeholder="编号"/>
|
||||
<el-input v-model="number" @input="checkValue" placeholder="编号"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
|
@ -306,6 +306,9 @@
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
checkValue() {
|
||||
this.number = this.number.replace(/[^0-9a-zA-Z]/g, '');
|
||||
},
|
||||
filterBlock(rule, index, field_key) {
|
||||
let that = this;
|
||||
if (rule !== '' && rule !== null && rule !== undefined) {
|
||||
|
|
|
@ -46,11 +46,12 @@
|
|||
return {
|
||||
options: {},
|
||||
cdata: {
|
||||
xData: ["冷加工", "热弯", "化学钢化"],
|
||||
xData: ["冷加工", "热弯","物理钢化", "化学钢化"],
|
||||
seriesData: [
|
||||
{value: 25, name: "冷加工"},
|
||||
{value: 20, name: "热弯"},
|
||||
{value: 30, name: "化学钢化"}
|
||||
{value: 20, name: "冷加工"},
|
||||
{value: 25, name: "热弯"},
|
||||
{value: 30, name: "物理钢化"},
|
||||
{value: 35, name: "化学钢化"}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -346,7 +346,7 @@
|
|||
label="批次"
|
||||
:prop="'details.' + index + '.batch'"
|
||||
>
|
||||
<el-input v-model="item.batch" placeholder="批次号"></el-input>
|
||||
<el-input v-model="item.batch" @input="checkValueItem(index)" minlength="6" placeholder="请输入数字或字母且最小六位数"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -379,7 +379,7 @@
|
|||
<i class="el-icon-remove-outline" style="font-size: 20px"></i>
|
||||
</el-button>
|
||||
</div>
|
||||
<el-input style="width: 300px;" clearable v-model="itemDetails" placeholder="物料编号,回车确定编号" @keyup.enter.native="detailEnter(itemDetails,index)"></el-input>
|
||||
<el-input style="width: 300px;" @input="checkValue" clearable v-model="itemDetails" placeholder="物料编号,回车确定编号" @keyup.enter.native="detailEnter(itemDetails,index)"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- 删除按钮 -->
|
||||
|
@ -465,7 +465,7 @@
|
|||
material: "", // 物料
|
||||
count: "", //数量
|
||||
batch: "", //批次
|
||||
expiration_date: "", //
|
||||
expiration_date: null, //
|
||||
details:[],
|
||||
},
|
||||
],
|
||||
|
@ -481,6 +481,13 @@
|
|||
export default {
|
||||
components: {Pagination},
|
||||
data() {
|
||||
const validateBatch = (rule, value, callback) => {
|
||||
if (value.length < 6) {
|
||||
callback(new Error("请输入不小于六位!"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
return {
|
||||
inventory: defaulteinventory,
|
||||
outfifo: defaulteoutfifo,
|
||||
|
@ -513,6 +520,7 @@
|
|||
dialogVisibles: false,
|
||||
rule1: {
|
||||
name: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
batch: [{required: true, message: "请输入不小于六位", trigger: "blur", validator: validateBatch},],
|
||||
},
|
||||
};
|
||||
},
|
||||
|
@ -526,6 +534,12 @@
|
|||
this.getpuorderList();
|
||||
},
|
||||
methods: {
|
||||
checkValue() {
|
||||
this.itemDetails = this.itemDetails.replace(/[^0-9a-zA-Z]/g, '');
|
||||
},
|
||||
checkValueItem(index) {
|
||||
this.inventory.details[index].batch = this.inventory.details[index].batch.replace(/[^0-9a-zA-Z]/g, '');
|
||||
},
|
||||
detailEnter(item,index){
|
||||
this.inventory.details[index].details.push({number:item});
|
||||
this.itemDetails = '';
|
||||
|
@ -639,7 +653,7 @@
|
|||
material: "", // 物料
|
||||
count: "", //数量
|
||||
batch: "", //批次
|
||||
expiration_date: "", //
|
||||
expiration_date: null, //
|
||||
details:[],
|
||||
},
|
||||
];
|
||||
|
@ -711,9 +725,12 @@
|
|||
},
|
||||
|
||||
async confirm(form) {
|
||||
console.log(this.inventory);
|
||||
let isbatch = false;
|
||||
let details = [];
|
||||
this.inventory.details.forEach(item=>{
|
||||
if(item.batch.length<6){
|
||||
isbatch = true;
|
||||
}
|
||||
let obj = new Object();
|
||||
if(item.details.length>0){
|
||||
obj = item;
|
||||
|
@ -726,6 +743,9 @@
|
|||
}
|
||||
details.push(obj);
|
||||
});
|
||||
if(isbatch){
|
||||
this.$message.warning("批次号不能少于六位数");
|
||||
}else{
|
||||
this.inventory.details = details;
|
||||
createInother(this.inventory).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
|
@ -734,6 +754,7 @@
|
|||
this.$message.success("成功");
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
handleDelete(scope) {
|
||||
this.$confirm("确认删除?", "警告", {
|
||||
|
|
|
@ -238,7 +238,7 @@
|
|||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务编号" prop="number">
|
||||
<el-input v-model="orderplan.number" placeholder="任务编号"/>
|
||||
<el-input v-model="orderplan.number" @input="checkValue" placeholder="任务编号"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="text-align: right">
|
||||
|
@ -336,7 +336,9 @@
|
|||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
|
||||
checkValue() {
|
||||
this.orderplan.number = this.orderplan.number.replace(/[^0-9a-zA-Z]/g, '');
|
||||
},
|
||||
//订单列表
|
||||
getorderList() {
|
||||
this.listLoading = true;
|
||||
|
|
|
@ -75,6 +75,7 @@
|
|||
修改日期
|
||||
</el-link>
|
||||
<el-link
|
||||
v-if="scope.row.state===10"
|
||||
type="primary"
|
||||
@click="handleissuedclick(scope)"
|
||||
>
|
||||
|
|
Loading…
Reference in New Issue