浏览代码

配方干物质新增-是否剩料字段

duanxiaoduan 1 年之前
父节点
当前提交
c8b4c30f4f
共有 1 个文件被更改,包括 9 次插入2 次删除
  1. 9 2
      src/views/shedProduction/formulaDryMatter/index.vue

+ 9 - 2
src/views/shedProduction/formulaDryMatter/index.vue

@@ -179,6 +179,13 @@
               </el-form-item>
             </el-col>
           </el-row>
+          <el-row>
+            <el-col :span="12">
+              <el-form-item label="是否剩料:" prop="excess">
+                <el-switch v-model="create.temp.excess"  active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" />
+              </el-form-item>
+            </el-col>
+          </el-row>
         </el-form>
         <div slot="footer" class="dialog-footer">
           <el-button class="cancelClose" @click="create.dialogFormVisible = false;getList()">关闭</el-button>
@@ -262,7 +269,7 @@ export default {
       create: {
         dialogFormVisible: false,
         dialogStatus: '',
-        temp: { pastureid: Cookies.get('pastureid'), operatetime: parseTime(new Date(), '{y}-{m}-{d}'), emp: Cookies.get('employename'), barid: '', barname: '', freshweight: '', dryweight: '', thoweight: '', actweight: '', times: '' },
+        temp: { pastureid: Cookies.get('pastureid'), operatetime: parseTime(new Date(), '{y}-{m}-{d}'), emp: Cookies.get('employename'), barid: '', barname: '', freshweight: '', dryweight: '', thoweight: '', actweight: '', times: '',excess:1 },
         rules: {
           barid: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }],
           times: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }],
@@ -448,7 +455,7 @@ export default {
 
     // 新增
     resetTemp() {
-      this.create.temp = { pastureid: Cookies.get('pastureid'), operatetime: parseTime(new Date(), '{y}-{m}-{d}'), emp: Cookies.get('employename'), barid: '', barname: '', freshweight: '', dryweight: '', thoweight: '', actweight: '', times: '' }
+      this.create.temp = { pastureid: Cookies.get('pastureid'), operatetime: parseTime(new Date(), '{y}-{m}-{d}'), emp: Cookies.get('employename'), barid: '', barname: '', freshweight: '', dryweight: '', thoweight: '', actweight: '', times: '',excess:1 }
     },
     blurEmp(item) {
       this.create.temp.emp = item.target.value