linwenxin před 1 rokem
rodič
revize
87051b126a

+ 2 - 1
src/views/auxiliaryFittings/purchasingManagement/components/inStorage.vue

@@ -40,7 +40,8 @@ export default {
   data() {
     return {
       formData: {
-        items: []
+        items: [],
+        imageUrl:[]
       },
     }
   },

+ 2 - 1
src/views/auxiliaryFittings/purchasingManagement/components/retStorage.vue

@@ -40,7 +40,8 @@ export default {
   data() {
     return {
       formData: {
-        items: []
+        items: [],
+        imageUrl:[]
       },
     }
   },

+ 67 - 38
src/views/auxiliaryFittings/purchasingManagement/mixins/form_tpl.js

@@ -1,4 +1,4 @@
-
+import ImageUpload from '@/components/file-upload'
 export default {
   data() {
     return {
@@ -28,7 +28,6 @@ export default {
       formDialogType: 0, // 0:新增, 1:编辑, 2:查看, 3:审核
       formDialogTitles: ['新增', '编辑', '查看', '审核'],
       pageType: this?.$route?.name,
-      crowStudentFollowLogList: []
     }
   },
   computed: {
@@ -65,7 +64,7 @@ export default {
             return [{
               columnAttributes: {
                 label: '大类名称',
-                prop: 'avatar',
+                prop: 'parentCategoryId',
               },
               render: (h, { row, column, index }) => {
                 return (
@@ -85,7 +84,7 @@ export default {
             return [{
               columnAttributes: {
                 label: '小类名称',
-                prop: 'avatar',
+                prop: 'goodsCategoryId',
               },
               render: (h, { row, column, index }) => {
                 return (
@@ -145,7 +144,7 @@ export default {
             return [{
               columnAttributes: {
                 label: '单位',
-                prop: 'avatar',
+                prop: 'purchaseId',
               }
             }]
           }
@@ -156,7 +155,7 @@ export default {
             return [{
               columnAttributes: {
                 label: '数量',
-                prop: 'avatar',
+                prop: 'recQty',
               },
               render: (h, { row, column, index }) => {
                 return (
@@ -175,7 +174,7 @@ export default {
             return [{
               columnAttributes: {
                 label: '退货数量',
-                prop: 'avatar',
+                prop: 'retQty',
               },
               render: (h, { row, column, index }) => {
                 return (
@@ -194,7 +193,7 @@ export default {
             return [{
               columnAttributes: {
                 label: '退款金额',
-                prop: 'avatar',
+                prop: 'retValue',
               },
               render: (h, { row, column, index }) => {
                 return (
@@ -213,7 +212,7 @@ export default {
             return [{
               columnAttributes: {
                 label: '商品代码',
-                prop: 'avatar',
+                prop: '',
               }
             }]
           }
@@ -224,7 +223,7 @@ export default {
             return [{
               columnAttributes: {
                 label: '规格型号',
-                prop: 'avatar',
+                prop: 'goodsSpecification',
               }
             }]
           }
@@ -235,7 +234,7 @@ export default {
             return [{
               columnAttributes: {
                 label: '配件编码',
-                prop: 'avatar',
+                prop: '',
               }
             }]
           }
@@ -246,7 +245,7 @@ export default {
             return [{
               columnAttributes: {
                 label: '适用品牌',
-                prop: 'avatar',
+                prop: '',
               }
             }]
           }
@@ -257,7 +256,7 @@ export default {
             return [{
               columnAttributes: {
                 label: '适用产品大类',
-                prop: 'avatar',
+                prop: '',
               }
             }]
           }
@@ -268,7 +267,7 @@ export default {
             return [{
               columnAttributes: {
                 label: '采购数量',
-                prop: 'avatar',
+                prop: '',
               }
             }]
           }
@@ -279,7 +278,7 @@ export default {
             return [{
               columnAttributes: {
                 label: '采购价格',
-                prop: 'avatar',
+                prop: '',
               }
             }]
           }
@@ -290,7 +289,7 @@ export default {
             return [{
               columnAttributes: {
                 label: '采购金额',
-                prop: 'avatar',
+                prop: '',
               }
             }]
           }
@@ -301,7 +300,7 @@ export default {
             return [{
               columnAttributes: {
                 label: '库存数量',
-                prop: 'avatar',
+                prop: '',
               }
             }]
           }
@@ -358,54 +357,63 @@ export default {
                     {({ SAVE: "保存", OK: "通过", FAIL: "失败" })[this.formData.flag]}
                   </el-descriptions-item>
                   <el-descriptions-item label="单据编号">
-                    11111
+                    {(!!~['auxiliaryMaterialsStorage', 'partsStorage'].indexOf(this.pageType) ? this.formData.purchaseId : this.formData.purchaseRetId) || ''}
                   </el-descriptions-item>
                   <el-descriptions-item label="所属商户" contentStyle={{ width: '42%' }}>
-                    {this.formData.companyWechatId}
+                    {this.formData.companyWechatName}
                   </el-descriptions-item>
                 </el-descriptions>
                 <el-descriptions border title="" column={2} colon={false} labelStyle={{ width: '8%' }} contentStyle={{ width: '42%' }} style="margin-top:-1px">
                   <el-descriptions-item label="网点名称">
-                    {this.formData.websitId}
+                    {this.formData.websitName}
                   </el-descriptions-item>
                   <el-descriptions-item label="供应商名称">
-                    {this.formData.venderId}
+                    {this.formData.venderName}
                   </el-descriptions-item>
                 </el-descriptions>
                 {
                   !!~['returnAuxiliaryMaterials', 'partsReturn'].indexOf(this.pageType) ?
                     <el-descriptions border title="" column={4} colon={false} labelStyle={{ width: '8%' }} contentStyle={{ width: '17%' }} style="margin-top:-1px">
                       <el-descriptions-item label="采购入库单号" contentStyle={{ width: '42%' }}>
-                        11111
+                        {this.formData.purchaseId}
                       </el-descriptions-item>
                       <el-descriptions-item label="退货数量">
-                        11111
+                        {this.formData.purchaseId}
                       </el-descriptions-item>
                       <el-descriptions-item label="退款金额">
-                        11111
+                        {this.formData.purchaseId}
                       </el-descriptions-item>
                     </el-descriptions> : null
                 }
                 <el-descriptions border title="" column={4} colon={false} labelStyle={{ width: '8%' }} contentStyle={{ width: '17%' }} style="margin-top:-1px">
                   <el-descriptions-item label="制单人">
-                    11111
+                    {this.formData.createBy}
                   </el-descriptions-item>
                   <el-descriptions-item label="制单时间">
-                    11111
+                    {this.formData.createTime}
                   </el-descriptions-item>
                   <el-descriptions-item label="审核人">
-                    11111
+                    {this.formData.confirmBy}
                   </el-descriptions-item>
                   <el-descriptions-item label="审核时间">
-                    11111
+                    {this.formData.confirmTime}
                   </el-descriptions-item>
                 </el-descriptions>
                 <el-descriptions border title="" column={4} colon={false} labelStyle={{ width: '8%' }} contentStyle={{ width: '17%' }} style="margin-top:-1px">
                   <el-descriptions-item label="附件">
-                    11111
+                    <ImageUpload fileList={this.formData.imageUrl} uid="imgSrc666_materials_drawing_images" limit={1} isEdit={this.formDialogType < 2} />
                   </el-descriptions-item>
                   <el-descriptions-item label="备注" contentStyle={{ width: '67%' }}>
-                    11111
+                    <el-input
+                      type="textarea"
+                      placeholder="请输入内容"
+                      value={this.formData.remark}
+                      onInput={(val) => { this.formData.remark = val }}
+                      maxlength="200"
+                      show-word-limit
+                      autosize={{ minRows: 6, maxRows: 8 }}
+                    >
+                    </el-input>
                   </el-descriptions-item>
                 </el-descriptions>
               </div>
@@ -430,21 +438,42 @@ export default {
               <div>
                 {!!~[0, 1].indexOf(this.formDialogType) ? <div style="margin-bottom:8px">
                   <el-button onClick={() => {
-                    // this.formData.items.push()
-                    if (this.pageType == "auxiliaryMaterialsStorage") {
-                    } else if (this.pageType == "returnAuxiliaryMaterials") {
-                    } else if (this.pageType == "partsStorage") {
-                    } else if (this.pageType == "partsReturn") {
-                    }
+                    this.formData.items.push({
+                      "brand": "",
+                      "companyWechatId": "",
+                      "cost": "",
+                      "costValue": "",
+                      "goodsCategoryId": "",
+                      "goodsCategoryName": "",
+                      "goodsId": "",
+                      "goodsName": "",
+                      "goodsSpecification": "",
+                      "goodsStockUnit": "",
+                      "goodsType": "",
+                      "note": "",
+                      "parentCategoryId": "",
+                      "parentCategoryName": "",
+                      "productCategory": "",
+                      "purchaseId": "",
+                      "recQty": "",
+                      "retQty": "",
+                      "stockQty": "",
+                      "websitId": "",
+                      "websitName": ""
+                    })
+                    // if (this.pageType == "auxiliaryMaterialsStorage") {
+                    // } else if (this.pageType == "returnAuxiliaryMaterials") {
+                    // } else if (this.pageType == "partsStorage") {
+                    // } else if (this.pageType == "partsReturn") {
+                    // }
                   }}>添加</el-button>
                 </div> : null}
                 <zj-table
                   columns={this.columns}
-                  tableData={this.crowStudentFollowLogList}
+                  tableData={this.formData.items}
                   tableAttributes={{
                     size: 'mini',
                     border: true,
-                    height: '100%'
                   }} />
               </div>
             )