Merge branch 'develop' of https://e.coding.net/ctcdevteam/hberp/hberp into develop
This commit is contained in:
commit
0543a90f2b
|
@ -97,3 +97,11 @@ export function getprogressList(query) {
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//半成品折合
|
||||||
|
export function createConvert(data) {
|
||||||
|
return request({
|
||||||
|
url: '/pm/resource/convert/',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
<el-card >
|
<el-card >
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<span>物料配置</span>
|
<span>物料配置</span>
|
||||||
|
<el-button style="float: right; padding: 3px 0" @click="handlebcpcount" type="primary">半成品折合</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
:data="materialpzTable"
|
:data="materialpzTable"
|
||||||
|
@ -94,8 +94,13 @@
|
||||||
stripe
|
stripe
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
height="300"
|
height="300"
|
||||||
|
ref="multipleTables"
|
||||||
|
|
||||||
>
|
>
|
||||||
|
<el-table-column
|
||||||
|
type="selection"
|
||||||
|
width="55">
|
||||||
|
</el-table-column>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
|
|
||||||
<el-table-column label="物料名称">
|
<el-table-column label="物料名称">
|
||||||
|
@ -107,8 +112,16 @@
|
||||||
<el-table-column label="物料编号">
|
<el-table-column label="物料编号">
|
||||||
<template slot-scope="scope">{{ scope.row.number }}</template>
|
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="生产所需数量">
|
<el-table-column label="生产所需数量" width="150">
|
||||||
<template slot-scope="scope">{{ scope.row.count }}</template>
|
<template slot-scope="scope">
|
||||||
|
<div v-if="scope.row.type==2">
|
||||||
|
<el-form :model="scope.row">
|
||||||
|
<el-form-item size="mini">
|
||||||
|
<el-input-number v-model="scope.row.bcpcount" :min="0" :value="0"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<div v-else> {{ scope.row.count }}</div></template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="剩余量" >
|
<el-table-column label="剩余量" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
@ -202,7 +215,7 @@
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getordertoplan } from "@/api/sam";
|
import { getordertoplan } from "@/api/sam";
|
||||||
import { createProductionplan,getProductionplanList,createresource,createequip} from "@/api/pm";
|
import { createProductionplan,createConvert,createresource,createequip} from "@/api/pm";
|
||||||
import { getMaterialList } from "@/api/mtm";
|
import { getMaterialList } from "@/api/mtm";
|
||||||
import checkPermission from "@/utils/permission";
|
import checkPermission from "@/utils/permission";
|
||||||
|
|
||||||
|
@ -242,10 +255,12 @@ export default {
|
||||||
},
|
},
|
||||||
materialpzTable:"",
|
materialpzTable:"",
|
||||||
mutipID:[],
|
mutipID:[],
|
||||||
|
bcpID:[],
|
||||||
equipmentTable:[],
|
equipmentTable:[],
|
||||||
listLoading: true,
|
listLoading: true,
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
dialogType: "new",
|
dialogType: "new",
|
||||||
|
zhbcp:[],
|
||||||
rule1: {
|
rule1: {
|
||||||
number: [{ required: true, message: "请输入", trigger: "blur" }],
|
number: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||||
|
|
||||||
|
@ -299,6 +314,36 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//半成品折合物料
|
||||||
|
handlebcpcount(){
|
||||||
|
let _this=this
|
||||||
|
_this.bcpID=[]
|
||||||
|
this.$refs.multipleTables.selection.forEach((item) => {
|
||||||
|
_this.bcpID.push({
|
||||||
|
"id":item.id,
|
||||||
|
"count": item.bcpcount
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
_this.zhbcp=[],
|
||||||
|
createConvert(this.bcpID).then((res) => {
|
||||||
|
if (res.code >= 200) {
|
||||||
|
this.zhbcp= res.data
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
handleclick(scope){
|
handleclick(scope){
|
||||||
this.orderID = scope.row.id;
|
this.orderID = scope.row.id;
|
||||||
|
|
||||||
|
|
|
@ -247,7 +247,7 @@ export default {
|
||||||
|
|
||||||
|
|
||||||
this.listQuery.material__type = 1;
|
this.listQuery.material__type = 1;
|
||||||
this.listQuery.tag='ok';
|
this.listQuery.tag='notok';
|
||||||
getwproductList(this.listQuery).then((response) => {
|
getwproductList(this.listQuery).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.wproductList = response.data;
|
this.wproductList = response.data;
|
||||||
|
@ -284,6 +284,7 @@ export default {
|
||||||
this.listLoading = false;
|
this.listLoading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
:visible.sync="drawer"
|
:visible.sync="drawer"
|
||||||
direction="rtl"
|
direction="rtl"
|
||||||
size="70%">
|
size="70%">
|
||||||
<el-tabs v-model="activeName" @tab-click="handleClick" >
|
<el-tabs @tab-click="handleClick" >
|
||||||
<el-tab-pane
|
<el-tab-pane
|
||||||
:key="item.file_.id"
|
:key="item.file_.id"
|
||||||
v-for="item in techdocList"
|
v-for="item in techdocList"
|
||||||
|
@ -775,7 +775,7 @@ export default {
|
||||||
//作业指导书
|
//作业指导书
|
||||||
//选项卡切换
|
//选项卡切换
|
||||||
handleClick(tab) {
|
handleClick(tab) {
|
||||||
|
console.log(tab.name);
|
||||||
var str = tab.label.substr(tab.label.length-1,1);
|
var str = tab.label.substr(tab.label.length-1,1);
|
||||||
if(str=='x')
|
if(str=='x')
|
||||||
{
|
{
|
||||||
|
|
|
@ -126,6 +126,24 @@ class FaceLogin(CreateAPIView):
|
||||||
if user:
|
if user:
|
||||||
refresh = RefreshToken.for_user(user)
|
refresh = RefreshToken.for_user(user)
|
||||||
# 可设为在岗
|
# 可设为在岗
|
||||||
|
now = timezone.now()
|
||||||
|
now_local = timezone.localtime()
|
||||||
|
if 8<=now_local.hour<=17:
|
||||||
|
ins, created = ClockRecord.objects.get_or_create(
|
||||||
|
create_by = user, create_time__hour__range = [8,18],
|
||||||
|
create_time__year=now_local.year, create_time__month=now_local.month,
|
||||||
|
create_time__day=now_local.day,
|
||||||
|
defaults={
|
||||||
|
'type':ClockRecord.ClOCK_WORK1,
|
||||||
|
'create_by':user,
|
||||||
|
'create_time':now
|
||||||
|
})
|
||||||
|
# 设为在岗
|
||||||
|
if created:
|
||||||
|
user.is_atwork = True
|
||||||
|
user.last_check_time = now
|
||||||
|
user.save()
|
||||||
|
|
||||||
return Response({
|
return Response({
|
||||||
'refresh': str(refresh),
|
'refresh': str(refresh),
|
||||||
'access': str(refresh.access_token),
|
'access': str(refresh.access_token),
|
||||||
|
|
|
@ -232,7 +232,8 @@ class ResourceViewSet(GenericViewSet):
|
||||||
# 计算输入物料
|
# 计算输入物料
|
||||||
materials = SubprodctionMaterial.objects.filter(subproduction__product__id=i['id'],
|
materials = SubprodctionMaterial.objects.filter(subproduction__product__id=i['id'],
|
||||||
subproduction__is_deleted=False, is_deleted=False,
|
subproduction__is_deleted=False, is_deleted=False,
|
||||||
type= SubprodctionMaterial.SUB_MA_TYPE_IN).order_by('material__number')\
|
type= SubprodctionMaterial.SUB_MA_TYPE_IN).order_by(
|
||||||
|
'material__type', 'material__number')\
|
||||||
.values('material__id', 'material__name',
|
.values('material__id', 'material__name',
|
||||||
'material__number', 'material__type',
|
'material__number', 'material__type',
|
||||||
'count', 'material__count', 'material__count_safe')
|
'count', 'material__count', 'material__count_safe')
|
||||||
|
|
Loading…
Reference in New Issue