Merge branch 'develop' of https://e.coding.net/ctcdevteam/hberp/hberp into develop
This commit is contained in:
commit
cc741a47a0
|
@ -13,7 +13,7 @@
|
||||||
stripe
|
stripe
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
height="100"
|
height="100"
|
||||||
v-el-height-adaptive-table="{ bottomOffset: 42 }"
|
v-el-height-adaptive-table="{bottomOffset: 42}"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55"> </el-table-column>
|
<el-table-column type="selection" width="55"> </el-table-column>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
|
@ -257,7 +257,7 @@ export default {
|
||||||
_this.mtmId.push(item.material_.id);
|
_this.mtmId.push(item.material_.id);
|
||||||
_this.materialshow.push(item);
|
_this.materialshow.push(item);
|
||||||
});
|
});
|
||||||
this.ordershow = _this.materialshow[0].to_order_.number;
|
this.ordershow = _this.materialshow[0].order_.number;
|
||||||
this.customershow=_this.materialshow[0].order_.customer_.name;
|
this.customershow=_this.materialshow[0].order_.customer_.name;
|
||||||
this.contractshow=_this.materialshow[0].order_.contract_.name;
|
this.contractshow=_this.materialshow[0].order_.contract_.name;
|
||||||
getOrderList({ page: 0, material: _this.mtmId[0], tag:'not_done' }).then(
|
getOrderList({ page: 0, material: _this.mtmId[0], tag:'not_done' }).then(
|
||||||
|
|
|
@ -578,7 +578,7 @@
|
||||||
:headers="upHeaders"
|
:headers="upHeaders"
|
||||||
:file-list="fileList"
|
:file-list="fileList"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
accept=".doc,.docx,.xls,.xlsx,.ppt,.pptx"
|
accept=".doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf"
|
||||||
>
|
>
|
||||||
<el-button size="small" type="primary">上传文件</el-button>
|
<el-button size="small" type="primary">上传文件</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
|
|
|
@ -63,9 +63,17 @@
|
||||||
:visible.sync="drawer"
|
:visible.sync="drawer"
|
||||||
direction="rtl"
|
direction="rtl"
|
||||||
size="70%">
|
size="70%">
|
||||||
<div class="word-wrap">
|
<el-tabs v-model="activeName" @tab-click="handleClick" >
|
||||||
<div id="wordView" v-html="wordText" />
|
<el-tab-pane
|
||||||
</div>
|
:key="item.file_.id"
|
||||||
|
v-for="item in techdocList"
|
||||||
|
:label="item.file_.name"
|
||||||
|
:name="item.file_.path"
|
||||||
|
:closable="item.close"
|
||||||
|
></el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
<div class="word-wrap" id = "file"> </div>
|
||||||
|
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-row gutter="2">
|
<el-row gutter="2">
|
||||||
|
@ -743,7 +751,7 @@ export default {
|
||||||
tprogressData: [],
|
tprogressData: [],
|
||||||
tool:"",
|
tool:"",
|
||||||
wordText: "",
|
wordText: "",
|
||||||
|
pdf:"",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
|
@ -765,12 +773,15 @@ export default {
|
||||||
checkPermission,
|
checkPermission,
|
||||||
|
|
||||||
//作业指导书
|
//作业指导书
|
||||||
|
//选项卡切换
|
||||||
getWordText() {
|
handleClick(tab) {
|
||||||
this.drawer=true;
|
|
||||||
const xhr = new XMLHttpRequest();
|
var str = tab.label.substr(tab.label.length-1,1);
|
||||||
|
if(str=='x')
|
||||||
|
{
|
||||||
|
const xhr = new XMLHttpRequest();
|
||||||
|
|
||||||
xhr.open("get", this.techdocList, true);
|
xhr.open("get",tab.name, true);
|
||||||
|
|
||||||
xhr.responseType = "arraybuffer";
|
xhr.responseType = "arraybuffer";
|
||||||
|
|
||||||
|
@ -787,12 +798,30 @@ export default {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
xhr.send();
|
xhr.send();
|
||||||
|
var filediv = document.getElementById('file');
|
||||||
|
filediv.innerHTML=' <div id="wordView" v-html='+this.wordText+' />';
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (str=='f')
|
||||||
|
{
|
||||||
|
this.pdf=tab.name;
|
||||||
|
var filediv = document.getElementById('file');
|
||||||
|
filediv.innerHTML=' <iframe width=420 height=330 frameborder=0 scrolling=auto src='+tab.name+'></iframe>';
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getWordText() {
|
||||||
|
this.drawer=true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
readbook(){
|
readbook(){
|
||||||
|
|
||||||
gettechdocList({operation:this.id,page:0}).then((response) => {
|
gettechdocList({operation:this.id,page:0,enabled:true}).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.techdocList= response.data[0].file_.file;
|
this.techdocList= response.data;
|
||||||
console.log( this.techdocList);
|
console.log( this.techdocList);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -125,6 +125,7 @@ class FaceLogin(CreateAPIView):
|
||||||
user, msg = HRMService.face_compare_from_base64(base64_data)
|
user, msg = HRMService.face_compare_from_base64(base64_data)
|
||||||
if user:
|
if user:
|
||||||
refresh = RefreshToken.for_user(user)
|
refresh = RefreshToken.for_user(user)
|
||||||
|
# 可设为在岗
|
||||||
return Response({
|
return Response({
|
||||||
'refresh': str(refresh),
|
'refresh': str(refresh),
|
||||||
'access': str(refresh.access_token),
|
'access': str(refresh.access_token),
|
||||||
|
|
|
@ -12,16 +12,6 @@ class Migration(migrations.Migration):
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
migrations.AddField(
|
|
||||||
model_name='wproduct',
|
|
||||||
name='material_check',
|
|
||||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='wp_material_check', to='mtm.material', verbose_name='按物料状态检查'),
|
|
||||||
),
|
|
||||||
migrations.AddField(
|
|
||||||
model_name='wproductflow',
|
|
||||||
name='material_check',
|
|
||||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='wpf_material_check', to='mtm.material', verbose_name='按物料状态检查'),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='wproduct',
|
model_name='wproduct',
|
||||||
name='child',
|
name='child',
|
||||||
|
|
|
@ -91,9 +91,6 @@ class WProduct(CommonAModel):
|
||||||
material = models.ForeignKey(
|
material = models.ForeignKey(
|
||||||
Material, verbose_name='所属物料状态', on_delete=models.CASCADE,
|
Material, verbose_name='所属物料状态', on_delete=models.CASCADE,
|
||||||
related_name='wp_material')
|
related_name='wp_material')
|
||||||
material_check = models.ForeignKey(
|
|
||||||
Material, verbose_name='按物料状态检查', on_delete=models.CASCADE,
|
|
||||||
null=True, blank=True, related_name='wp_material_check')
|
|
||||||
pre_step = models.ForeignKey(Step, verbose_name='已执行到', help_text='已执行完的步骤', null=True, blank=True,
|
pre_step = models.ForeignKey(Step, verbose_name='已执行到', help_text='已执行完的步骤', null=True, blank=True,
|
||||||
on_delete=models.CASCADE, related_name='wp_pre_step')
|
on_delete=models.CASCADE, related_name='wp_pre_step')
|
||||||
step = models.ForeignKey(Step, verbose_name='所在步骤', on_delete=models.CASCADE, null=True, blank=True,
|
step = models.ForeignKey(Step, verbose_name='所在步骤', on_delete=models.CASCADE, null=True, blank=True,
|
||||||
|
@ -170,9 +167,6 @@ class WproductFlow(CommonAModel):
|
||||||
number = models.CharField('物品编号', null=True, blank=True, max_length=50)
|
number = models.CharField('物品编号', null=True, blank=True, max_length=50)
|
||||||
material = models.ForeignKey(
|
material = models.ForeignKey(
|
||||||
Material, verbose_name='所属物料状态', on_delete=models.CASCADE, related_name='wpf_material')
|
Material, verbose_name='所属物料状态', on_delete=models.CASCADE, related_name='wpf_material')
|
||||||
material_check = models.ForeignKey(
|
|
||||||
Material, verbose_name='按物料状态检查', on_delete=models.CASCADE,
|
|
||||||
null=True, blank=True, related_name='wpf_material_check')
|
|
||||||
pre_step = models.ForeignKey(Step, verbose_name='已执行到', help_text='已执行完的步骤', null=True, blank=True,
|
pre_step = models.ForeignKey(Step, verbose_name='已执行到', help_text='已执行完的步骤', null=True, blank=True,
|
||||||
on_delete=models.CASCADE, related_name='wpf_pre_step')
|
on_delete=models.CASCADE, related_name='wpf_pre_step')
|
||||||
step = models.ForeignKey(Step, verbose_name='所在步骤', on_delete=models.CASCADE, null=True, blank=True,
|
step = models.ForeignKey(Step, verbose_name='所在步骤', on_delete=models.CASCADE, null=True, blank=True,
|
||||||
|
|
|
@ -684,10 +684,10 @@ class OperationViewSet(ListModelMixin, RetrieveModelMixin, CreateModelMixin, Upd
|
||||||
newstep, needTest = WpmService.get_next_step(wsp, step)
|
newstep, needTest = WpmService.get_next_step(wsp, step)
|
||||||
wp.step = newstep
|
wp.step = newstep
|
||||||
wp.pre_step = step
|
wp.pre_step = step
|
||||||
|
wp.material = wsp.product
|
||||||
|
|
||||||
if step == newstep:
|
if step == newstep:
|
||||||
wp.act_state = WProduct.WPR_ACT_STATE_TOTEST
|
wp.act_state = WProduct.WPR_ACT_STATE_TOTEST
|
||||||
wp.material = wsp.product
|
|
||||||
if wp.test:# 如果有正在进行的工序中检验
|
if wp.test:# 如果有正在进行的工序中检验
|
||||||
wp.test.is_midtesting = False
|
wp.test.is_midtesting = False
|
||||||
wp.test.is_submited = False
|
wp.test.is_submited = False
|
||||||
|
@ -696,7 +696,6 @@ class OperationViewSet(ListModelMixin, RetrieveModelMixin, CreateModelMixin, Upd
|
||||||
wp.act_state = WProduct.WPR_ACT_STATE_DOWAIT
|
wp.act_state = WProduct.WPR_ACT_STATE_DOWAIT
|
||||||
if needTest:
|
if needTest:
|
||||||
wp.act_state = WProduct.WPR_ACT_STATE_TOTEST
|
wp.act_state = WProduct.WPR_ACT_STATE_TOTEST
|
||||||
wp.material_check = wsp.product
|
|
||||||
|
|
||||||
wp.operation = None
|
wp.operation = None
|
||||||
wp.update_by = request.user
|
wp.update_by = request.user
|
||||||
|
|
|
@ -63,6 +63,8 @@ INSTALLED_APPS = [
|
||||||
'apps.develop'
|
'apps.develop'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
X_FRAME_OPTIONS = 'SAMEORIGIN'
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
'django.middleware.security.SecurityMiddleware',
|
'django.middleware.security.SecurityMiddleware',
|
||||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||||
|
|
Loading…
Reference in New Issue