Merge branch 'develop' of https://e.coding.net/ctcdevteam/hberp/hberp into develop

This commit is contained in:
caoqianming 2021-09-22 10:58:20 +08:00
commit 76db3beadc
6 changed files with 41 additions and 12 deletions

View File

@ -31,6 +31,7 @@
"path-to-regexp": "^6.2.0",
"vue": "^2.6.14",
"vue-json-editor": "^1.4.3",
"vue-quill-editor": "^3.0.6",
"vue-router": "^3.5.2",
"vuex": "^3.6.2",
"webpack-dev-server": "^4.2.0",

View File

@ -386,12 +386,15 @@
>
<el-form-item label="文件名称" prop="name">
<el-input v-model="techdoc.name" placeholder="工序名称" />
<el-input v-model="techdoc.name" placeholder="文件名称" />
</el-form-item>
<el-form-item label="内容" prop="content">
<el-input type="textarea" :rows="6" v-model="techdoc.content" placeholder="内容" />
<el-form-item label="内容" prop="content" style="height:350px">
<quill-editor ref="text" v-model="techdoc.content" style="height:250px" :options="editorOption" />
</el-form-item>
<el-form-item label="文件" prop="template" v-if="dialogVisiblet">
<el-upload
ref="upload"
@ -424,7 +427,10 @@
import { getMaterialList,getMaterial,getInputmaterialList,createInputmaterial,updateInputmaterial
,deleteInputmaterial,getOutputmaterialList,createOutputmaterial,updateOutputmaterial,deleteOutputmaterial,
getUsedstepList,createUsedstep,deleteUsedstep,getStepList,gettechdocList,createtechdoc,updatetechdoc,deletetechdoc } from "@/api/mtm";
import { quillEditor } from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
import { upUrl, upHeaders } from "@/api/file";
import checkPermission from "@/utils/permission";
import { genTree } from "@/utils";
@ -443,12 +449,13 @@ const defaulttechdoc = {
};
export default {
components: { Pagination },
components: { Pagination ,quillEditor},
data() {
return {
materialoptions:[],
inputtableData:"",
editorOption: {} ,
techdoc: defaulttechdoc,
inputmaterial: defaultinputmaterial,
techdoctableData:"",
@ -517,9 +524,9 @@ export default {
//物料
getmaterialList() {
this.listLoading = true;
getMaterialList().then((response) => {
getMaterialList({pageoff:true}).then((response) => {
if (response.data) {
this.materialoptions = genTree(response.data.results);
this.materialoptions = genTree(response.data);
}
this.listLoading = false;
});
@ -546,6 +553,7 @@ export default {
{
this.process = id;
// alert(this.process)
this.getmaterialList();//物料列表
this.getInputmaterialLists();//输入物料
this.getOutputmaterialLists();//输出物料
@ -564,7 +572,6 @@ export default {
this.listQueryinput.process=this.process;
this.listQueryinput.product=this.product
//this.listQueryinput.page=0;
getInputmaterialList(this.listQueryinput).then((response) => {
if (response.data) {

View File

@ -112,7 +112,9 @@
<el-form-item label="合同金额" prop="amount">
<el-input v-model="contract.amount" placeholder="合同金额" />
</el-form-item>
<el-form-item label="开票金额" prop="invoice">
<el-input v-model="contract.invoice" placeholder="开票金额" />
</el-form-item>
<el-form-item label="签订日期" prop="sign_date">
<el-date-picker
v-model="contract.sign_date"

View File

@ -100,7 +100,7 @@ class InputMaterialViewSet(CreateUpdateModelAMixin, ModelViewSet):
perms_map = {'*':'*'}
queryset = InputMaterial.objects.select_related('material').all()
serializer_class = InputMaterialSerializer
filterset_fields = ['process', 'material']
filterset_fields = ['process', 'product']
ordering = ['sort', '-create_time']
def get_serializer_class(self):
@ -117,7 +117,7 @@ class OutputMaterialViewSet(CreateUpdateModelAMixin, ModelViewSet):
perms_map = {'*':'*'}
queryset = OutputMaterial.objects.select_related('material').all()
serializer_class = OutputMaterialSerializer
filterset_fields = ['process', 'material']
filterset_fields = ['process', 'product']
ordering = ['sort', '-create_time']
def get_serializer_class(self):

View File

@ -0,0 +1,18 @@
# Generated by Django 3.2.6 on 2021-09-22 01:42
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('sam', '0002_auto_20210913_0954'),
]
operations = [
migrations.AddField(
model_name='contract',
name='invoice',
field=models.IntegerField(default=0, verbose_name='开票金额'),
),
]

View File

@ -34,6 +34,7 @@ class Contract(CommonAModel):
name = models.CharField('合同名称', max_length=100)
number = models.CharField('合同编号', max_length=100, unique=True)
amount = models.IntegerField('合同金额', default=0)
invoice = models.IntegerField('开票金额', default=0)
customer = models.ForeignKey(Customer, verbose_name='关联客户', on_delete=models.CASCADE, related_name='contact_customer')
sign_date = models.DateField('签订日期')
description = models.CharField('描述', max_length=200, blank=True, null=True)