| 
					
				 | 
			
			
				@@ -2,72 +2,96 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   <div class="product-template"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <el-dialog 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       :title="!isModify ? '新增':'修改'" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      width="50%" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      width="70%" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       :close-on-click-modal="false" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       :visible.sync="visible"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="auto"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <el-row class="my-row"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          <el-form-item label="物料名称" prop="productName"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <el-input v-model="dataForm.productName" :disabled="bizType === 3" placeholder="物料名称"></el-input> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        </el-row> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <el-row class="my-row"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          <el-form-item label="规格" prop="productSpecifications"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <el-input v-model="dataForm.productSpecifications" :disabled="bizType === 3" placeholder="规格"></el-input> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        </el-row> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <el-row class="my-row"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          <el-form-item label="数量" prop="cnt"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <el-input-number v-model="dataForm.cnt" :disabled="bizType === 3" ></el-input-number> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        </el-row> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <el-row class="my-row" v-if="bizType === 2"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          <el-form-item label="生产编号" prop="productNumber"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <el-input v-model="dataForm.productNumber" placeholder="任务单编号" :disabled="bizType === 3" ></el-input> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        </el-row> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <el-row class="my-row" v-if="bizType === 2"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          <el-form-item label="批次号" prop="batchNumber"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <el-input v-model="dataForm.batchNumber" placeholder="批次号" :disabled="bizType === 3" ></el-input> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-col :span="8"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <el-form-item label="物料名称" prop="productName"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <el-input v-model="dataForm.productName" :disabled="bizType === 3" placeholder="物料名称"></el-input> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </el-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-col :span="8"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <el-form-item label="规格" prop="productSpecifications"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <el-input v-model="dataForm.productSpecifications" :disabled="bizType === 3" placeholder="规格"></el-input> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </el-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-col :span="8"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <el-form-item label="数量" prop="cnt"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <el-input-number v-model="dataForm.cnt" :disabled="bizType === 3" ></el-input-number> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </el-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </el-row> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <el-row class="my-row" v-if="bizType === 2"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          <el-form-item label="生产要求" prop="produceRequire"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <el-input v-model="dataForm.produceRequire" placeholder="生产要求" :disabled="bizType === 3" ></el-input> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-col :span="8"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <el-form-item label="生产编号" prop="productNumber"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <el-input v-model="dataForm.productNumber" placeholder="任务单编号" :disabled="bizType === 3" ></el-input> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </el-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-col :span="8"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <el-form-item label="批次号" prop="batchNumber"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <el-input v-model="dataForm.batchNumber" placeholder="批次号" :disabled="bizType === 3" ></el-input> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </el-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-col :span="8"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <el-form-item label="生产要求" prop="produceRequire"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <el-input v-model="dataForm.produceRequire" placeholder="生产要求" :disabled="bizType === 3" ></el-input> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </el-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </el-row> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <el-row class="my-row"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          <el-form-item label="含税单价" prop="price"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <el-input-number v-model="dataForm.price" :step="1" :min="0" :precision="1" :disabled="bizType === 3" ></el-input-number> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        </el-row> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <el-row class="my-row"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          <el-form-item label="含税总价" prop="amount"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <span>{{ (dataForm.cnt * dataForm.price).toFixed(1) }}</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        </el-row> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <el-row class="my-row"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          <el-form-item label="税率" prop="rate"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <el-input-number style="width: 160px" v-model="dataForm.rate" :step="1" :precision="1" :disabled="bizType === 3" /> % 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-col :span="8"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <el-form-item label="含税单价" prop="price"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <el-input-number v-model="dataForm.price" :step="1" :min="0" :precision="1" :disabled="bizType === 3" ></el-input-number> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </el-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-col :span="8"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <el-form-item label="税率" prop="rate"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <el-input-number style="width: 160px" v-model="dataForm.rate" :step="1" :precision="1" :disabled="bizType === 3" /> % 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </el-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-col :span="8"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <el-form-item label="含税总价" prop="amount"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <span>{{ (dataForm.cnt * dataForm.price).toFixed(1) }}</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </el-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </el-row> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <el-row class="my-row"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <el-form-item label="备注" prop="notes"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <el-input type="textarea" v-model="dataForm.notes" placeholder="备注"></el-input> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </el-row> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <el-row class="my-row" v-if="bizType === 3"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          <el-form-item prop="productId" label="物料关联"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <product-component v-model="dataForm.productId" :product-id="dataForm.productId" @productSelected="prodSelected"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <el-row class="my-row"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-col :span="8"  v-if="bizType === 3"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <el-form-item prop="productId" label="物料关联"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <product-component v-model="dataForm.productId" :product-id="dataForm.productId" @productSelected="prodSelected"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </el-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-col :span="8"  v-if="bizType !== 1 && bizType !== 2"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <el-form-item label="首件鉴定"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <el-radio-group v-model="dataForm.appraisal"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <el-radio :label="'1'">否</el-radio> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <el-radio :label="'2'">是</el-radio> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              </el-radio-group> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </el-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-col :span="8"  v-if="bizType !== 1 && bizType !== 2"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <el-form-item label="试制检查"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <el-radio-group v-model="dataForm.inspect"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <el-radio :label="'1'">否</el-radio> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <el-radio :label="'2'">是</el-radio> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              </el-radio-group> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </el-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </el-row> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <el-row class="my-row" v-if="bizType !== 1 && bizType !== 2"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          <el-form-item label="首件鉴定"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <el-radio-group v-model="dataForm.appraisal"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              <el-radio :label="'1'">否</el-radio> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              <el-radio :label="'2'">是</el-radio> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            </el-radio-group> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          </el-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <el-row class="my-row" v-if="Number(dataForm.inspect) === 2"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-col :span="8"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <upload-component :display-star="false" :title="'试制前准备状态检查报告'" :accept="'*'" :file-obj-list="fileList1" @uploadSuccess="uploadSuccess1"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </el-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-col :span="8"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <upload-component :display-star="false" :title="'试制前准备状态自查表'" :accept="'*'" :file-obj-list="fileList2" @uploadSuccess="uploadSuccess2"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </el-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </el-row> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </el-form> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <span slot="footer"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -80,10 +104,11 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <script> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   import ProductComponent from '@/views/modules/common/product-component' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  import UploadComponent from '@/views/modules/common/upload-component' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     name: 'template-add-or-update', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    components: {ProductComponent}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    components: {UploadComponent, ProductComponent}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     data () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       return { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         visible: false, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -91,6 +116,8 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         bizType: 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         dataForm: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        fileList1: [], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        fileList2: [], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         dataRule: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           productName: [{ required: true, message: '物料名称不能为空', trigger: 'blur' }], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           productSpecifications: [{ required: true, message: '规格不能为空', trigger: 'blur' }], 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -120,6 +147,27 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       dataFormSubmit () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.$refs['dataForm'].validate((valid) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           if (valid) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            // 处理附件 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            let fList1 = this.fileList1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (fList1.length > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              this.dataForm.attachListInspection = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              for (let i = 0; i < fList1.length; i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                this.dataForm.attachListInspection.push({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  fileName: fList1[i].name, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  url: fList1[i].url 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            let fList2 = this.fileList2 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (fList2.length > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              this.dataForm.attachListExamine = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              for (let i = 0; i < fList2.length; i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                this.dataForm.attachListExamine.push({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  fileName: fList2[i].name, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  url: fList2[i].url 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             this.visible = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             this.$emit('addItem', this.dataForm) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -128,6 +176,14 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       prodSelected (item) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.dataForm.productId = item.value 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.dataForm.relatedProduct = item.label 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      // 试制前准备状态自查表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      uploadSuccess1 (fileList) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.fileList1 = fileList 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      // 试制前准备状态检查报告 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      uploadSuccess2 (fileList) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.fileList2 = fileList 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 |