Browse Source

Merge branch 'hw' of http://121.41.102.225:8099/Nidong/jiufang

Andy 3 years ago
parent
commit
85af7a0884

+ 9 - 0
src/routerMap/index.js

@@ -763,6 +763,15 @@ const routerMap = [{
             require(['@/views/BidSystem/ProductDeOrder/list'], resolve),
     },
     {
+        path: '/cms/BidSystem/ProductDeOrder/infodetail',
+        name: 'BidSystemProductDeOrderInfoDetail', // 报价系统→生产拆单->详情/新增
+        meta: {
+            index: 3
+        },
+        component: (resolve) =>
+            require(['@/views/BidSystem/ProductDeOrder/infoDetail'], resolve),
+    },
+    {
         path: '/cms/BidSystem/ProductDeOrder/detail',
         name: 'BidSystemProductDeOrderDetail', // 报价系统→生产拆单→拆单
         meta: {

+ 5 - 1
src/views/BidSystem/DeepeningOrder/changeDetail.vue

@@ -755,6 +755,9 @@ export default {
          }
       },
     add_line() {
+        if(this.affirm){
+             this.$Message.warning('更改请确认!')
+           }else{
       let arr = {
         long: "",
         high: "",
@@ -762,7 +765,7 @@ export default {
         change_state: false,
         status:1,
         copy_state:true,
-        check_state: true,
+        check_state: false,
         explode_status: '',
         house: '',
         house_id: "",
@@ -792,6 +795,7 @@ export default {
         _rowKey: '',
       };
       this.tableData.unshift(arr);
+           }
     },
     handleTypeTitleChange(e) {},
     changeIpt(e, row) {

+ 35 - 1
src/views/BidSystem/DeepeningOrder/changeRecordDetail.vue

@@ -136,6 +136,12 @@
             </div>
           </div>
         </template>
+         <template slot="status" slot-scope="{ row }">
+                    <span>{{row.status === 0 ? '变更':row.status === 1? '新增':'删除'}}</span>
+        </template>
+         <template slot="set" slot-scope="{ row }">
+              <a @click="orderDisposal" v-show="row.status === 1" style="color:#fff">下拆单</a>
+        </template>
       </Table>
       <div class="List_form_content">
         <div>
@@ -145,6 +151,7 @@
           <template slot="urlSet" slot-scope="{ index }">
             <div
               class="items"
+               v-show="tableData[index].img.length !== 0 ? true : false"
             >
               <img
                 @click="looks(ListData[index].img)"
@@ -156,6 +163,9 @@
               />
             </div>
           </template>
+           <template slot="status" slot-scope="{ row }">
+                    <span>{{row.status === 0 ? '变更':row.status === 1? '新增':'删除'}}</span>
+        </template>
         </Table>
       </div>
     </Card>
@@ -261,6 +271,20 @@ export default {
           key: "high",
           align: "center",
          minWidth: 100
+        },
+        {
+          title:'变更类型',
+          key:'status',
+          align:'center',
+          minWidth:100,
+          slot:'status'
+        },
+        {
+          title:'操作',
+          key:'set',
+          align:'center',
+          minWidth:100,
+          slot:'set'
         }
       ],
       tableData: [],
@@ -295,7 +319,14 @@ export default {
         { title: "型号", key: "model", align: "center", minWidth: 100 },
         { title: "长", key: "long", align: "center", minWidth: 100 },
         { title: "宽", key: "wide", align: "center", minWidth: 100 },
-        { title: "高", key: "high", align: "center", minWidth: 100 }
+        { title: "高", key: "high", align: "center", minWidth: 100 },
+         {
+          title:'变更类型',
+          key:'status',
+          align:'center',
+          minWidth:100,
+          slot:'status'
+        }
       ],
       ListData: [],
       page_index: 1,
@@ -330,6 +361,9 @@ export default {
     );
   },
   methods: {
+    orderDisposal(){
+
+    },
     looks(arr) {
       // const array = [{ img_url: img }];
       const array = arr.map((v) => {

+ 827 - 0
src/views/BidSystem/ProductDeOrder/infoDetail.vue

@@ -0,0 +1,827 @@
+<template>
+  <div class="changeDetail">
+    <Toptitle :title="type == 3 ? '生产拆单详情' : '生产拆单新增'">
+      <slot name="titleButton">
+        <Button type="primary" style="margin-right: 10px" v-if="type == 6"
+          >开启拆单</Button
+        >
+        <Button type="primary" style="margin-right: 10px" v-if="type == 3"
+          >批量下生产</Button
+        >
+        <Button
+          @click="goback()"
+          type="primary"
+          ghost
+          style="margin-right: 10px"
+          >返回</Button
+        >
+        <Button
+          type="primary"
+          style="margin-right: 10px"
+          v-if="type == 6"
+          @click="save"
+          >保存</Button
+        >
+      </slot>
+    </Toptitle>
+    <div class="content">
+      <div class="form">
+        <Form class="form_content" :label-width="100">
+          <FormItem label="项目编号:">
+            <Input v-if="type == 6" v-model="saveData.order_no" placeholder="请输入项目编码"/>
+            <span style="width: 120px" v-else>{{ formData.order_no }}</span>
+          </FormItem>
+          <FormItem label="项目名称:">
+            <Input v-if="type == 6" v-model="saveData.residential_name" placeholder="请输入项目名称"/>
+            <span v-else>{{ formData.residential_name }}</span>
+          </FormItem>
+          <FormItem label="项目简称:">
+            <Input v-if="type == 6" v-model="saveData.abbreviation" placeholder="请输入项目简称"/>
+            <span v-else>{{ formData.abbreviation }}</span>
+          </FormItem>
+          <FormItem label="客户名称:">
+            <Select
+              filterable
+              clearable
+              v-model="saveData.custom_title"
+              v-if="type == 6"
+            >
+              <Option
+                v-for="(item, index) in custom_title_list"
+                :key="index"
+                :label="item.title"
+                :value="item.id"
+              ></Option>
+            </Select>
+            <span v-else>{{ formData.custom_title }}</span>
+          </FormItem>
+          <FormItem label="紧急程度:">
+            <Select
+              clearable
+              v-model="saveData.warning_state"
+              v-if="type == 6"
+            >
+              <Option
+                v-for="(item, index) in warning_state_list"
+                :key="index"
+                :label="item.title"
+                :value="item.id"
+              ></Option>
+            </Select>
+            <span v-else>{{ formData.warning_state }}</span>
+          </FormItem>
+          <FormItem label="项目定金:">
+            <Input v-if="type == 6" v-model="saveData.front_money" placeholder="请输入项目定金"/>
+            <span v-else>{{ formData.front_money }}</span>
+          </FormItem>
+          <FormItem label="详细地址:">
+            <Input v-if="type == 6" v-model="saveData.address" placeholder="请输入详细地址"/>
+            <span v-else>{{ formData.address }}</span>
+          </FormItem>
+          <FormItem label="手机号:">
+            <Input v-if="type == 6" v-model="saveData.mobile" placeholder="请输入手机号"/>
+            <span v-else>{{ formData.mobile }}</span>
+          </FormItem>
+          <FormItem label="开始日期:">
+            <DatePicker
+              type="date"
+              v-model="saveData.start_time"
+              placeholder="年/月/日"
+              style="width: 150px"
+              v-if="type == 6"
+            ></DatePicker>
+            <span v-else>{{ formData.start_time }}</span>
+          </FormItem>
+          <FormItem label="交付日期:">
+            <DatePicker
+              type="date"
+              v-model="saveData.end_time"
+              placeholder="年/月/日"
+              style="width: 150px"
+              v-if="type == 6"
+            ></DatePicker>
+            <span v-else>{{ formData.end_time }}</span>
+          </FormItem>
+          <FormItem label="业务员:">
+            <Select
+              filterable
+              clearable
+              v-model="saveData.nickname"
+              v-if="type == 6"
+            >
+              <Option
+                v-for="(item, index) in nickname_list"
+                :key="index"
+                :label="item.nickname"
+                :value="item.id"
+              ></Option>
+            </Select>
+            <span v-else>{{ formData.nickname }}</span>
+          </FormItem>
+          <FormItem label="备注:">
+            <Input v-if="type == 6" v-model="saveData.remark" type="textarea" placeholder="请输入备注"/>
+            <span v-else>{{ formData.remark }}</span>
+          </FormItem>
+        </Form>
+      </div>
+      <Card style="width: 100%" class="card">
+        <div class="form_middle">
+          <Form class="form_middle_content" :label-width="100">
+            <FormItem label="区域编码:">
+              <Select
+                filterable
+                multiple
+                v-model="searchData.area_code"
+                size="small"
+                style="width: 120px"
+              >
+                <Option
+                  v-for="(item, index) in area_code"
+                  :key="index"
+                  :label="item.area_code"
+                  :value="item.area_code"
+                ></Option>
+              </Select>
+            </FormItem>
+            <FormItem label="区域名称:">
+              <Select
+                filterable
+                multiple
+                v-model="searchData.area_title"
+                size="small"
+                style="width: 120px"
+              >
+                <Option
+                  v-for="(item, index) in area_title"
+                  :key="index"
+                  :label="item.area_title"
+                  :value="item.area_title"
+                ></Option>
+              </Select>
+            </FormItem>
+            <FormItem label="户型:">
+              <Select
+                filterable
+                multiple
+                v-model="searchData.house_type"
+                size="small"
+                style="width: 120px"
+              >
+                <Option
+                  v-for="(item, index) in house_type"
+                  :key="index"
+                  :label="item.house_type"
+                  :value="item.house_type"
+                ></Option>
+              </Select>
+            </FormItem>
+            <FormItem label="楼栋:">
+              <Select
+                filterable
+                multiple
+                v-model="searchData.house"
+                size="small"
+                style="width: 120px"
+              >
+                <Option
+                  v-for="(item, index) in house"
+                  :key="index"
+                  :label="item.house"
+                  :value="item.house"
+                ></Option>
+              </Select>
+            </FormItem>
+            <FormItem label="单元:">
+              <Select
+                filterable
+                multiple
+                v-model="searchData.unit"
+                size="small"
+                style="width: 120px"
+              >
+                <Option
+                  v-for="(item, index) in unit"
+                  :key="index"
+                  :label="item.unit"
+                  :value="item.unit"
+                ></Option>
+              </Select>
+            </FormItem>
+            <FormItem label="楼层:">
+              <Select
+                filterable
+                multiple
+                v-model="searchData.layer"
+                size="small"
+                style="width: 120px"
+              >
+                <Option
+                  v-for="(item, index) in layer"
+                  :key="index"
+                  :label="item.layer"
+                  :value="item.layer"
+                ></Option>
+              </Select>
+            </FormItem>
+            <FormItem label="房号:">
+              <Select
+                filterable
+                multiple
+                v-model="searchData.number"
+                size="small"
+                style="width: 120px"
+              >
+                <Option
+                  v-for="(item, index) in number"
+                  :key="index"
+                  :label="item.number"
+                  :value="item.number"
+                ></Option>
+              </Select>
+            </FormItem>
+            <FormItem label="位置:">
+              <Select
+                filterable
+                multiple
+                v-model="searchData.position"
+                size="small"
+                style="width: 120px"
+              >
+                <Option
+                  v-for="(item, index) in position"
+                  :key="index"
+                  :label="item.position"
+                  :value="item.position"
+                ></Option>
+              </Select>
+            </FormItem>
+            <FormItem label="产品分类:">
+              <Select
+                filterable
+                multiple
+                v-model="searchData.product_type"
+                size="small"
+                style="width: 120px"
+              >
+                <Option
+                  v-for="(item, index) in product_type"
+                  :key="index"
+                  :label="item.product_type"
+                  :value="item.product_type"
+                ></Option>
+              </Select>
+            </FormItem>
+            <FormItem label="图号:">
+              <Select
+                filterable
+                multiple
+                v-model="searchData.url_number"
+                size="small"
+                style="width: 120px"
+              >
+                <Option
+                  v-for="(item, index) in url_number"
+                  :key="index"
+                  :label="item.url_number"
+                  :value="item.url_number"
+                ></Option>
+              </Select>
+            </FormItem>
+            <FormItem label="产品名称:">
+              <Select
+                filterable
+                multiple
+                v-model="searchData.product_title"
+                size="small"
+                style="width: 120px"
+              >
+                <Option
+                  v-for="(item, index) in product_title"
+                  :key="index"
+                  :label="item.product_title"
+                  :value="item.product_title"
+                ></Option>
+              </Select>
+            </FormItem>
+            <FormItem label="材质:">
+              <Select
+                filterable
+                clearable
+                v-model="searchData.material"
+                size="small"
+                style="width: 120px"
+              >
+                <Option
+                  v-for="(item, index) in material"
+                  :key="index"
+                  :label="item"
+                  :value="item"
+                ></Option>
+              </Select>
+            </FormItem>
+            <FormItem label="颜色:">
+              <Select
+                filterable
+                clearable
+                v-model="searchData.color"
+                size="small"
+                style="width: 120px"
+              >
+                <Option
+                  v-for="(item, index) in color"
+                  :key="index"
+                  :label="item"
+                  :value="item"
+                ></Option>
+              </Select>
+            </FormItem>
+            <FormItem label="工艺:">
+              <Select
+                filterable
+                clearable
+                v-model="searchData.work"
+                size="small"
+                style="width: 120px"
+              >
+                <Option
+                  v-for="(item, index) in work"
+                  :key="index"
+                  :label="item"
+                  :value="item"
+                ></Option>
+              </Select>
+            </FormItem>
+            <FormItem label="左右式:">
+              <Select
+                filterable
+                multiple
+                v-model="searchData.fashion"
+                size="small"
+                style="width: 120px"
+              >
+                <Option
+                  v-for="(item, index) in fashion"
+                  :key="index"
+                  :label="
+                    item.fashion === 0
+                      ? '无'
+                      : item.fashion === 1
+                      ? '左式'
+                      : '右式'
+                  "
+                  :value="item.fashion"
+                ></Option>
+              </Select>
+            </FormItem>
+            <FormItem label="拆单状态:">
+              <Select
+                filterable
+                clearable
+                v-model="searchData.state"
+                size="small"
+                style="width: 120px"
+              >
+                <Option
+                  v-for="(item, index) in state"
+                  :key="index"
+                  :label="item.state === 0 ? '未拆单' : '已拆单'"
+                  :value="item.state"
+                ></Option>
+              </Select>
+            </FormItem>
+            <FormItem>
+              <Button
+                @click="search"
+                style="margin-right: 10px"
+                type="primary"
+                ghost
+                >搜索</Button
+              >
+            </FormItem>
+          </Form>
+        </div>
+        <Tabs type="card" @on-click="getData">
+          <TabPane
+            v-for="tab in tabs"
+            :key="tab"
+            :label="tab == 1 ? '汇总' : '明细'"
+            style="margin: 0 auto"
+          >
+            <div v-show="tab === 1">
+              <Table :columns="totalColumns" :data="totalData" border> </Table>
+              <Page
+                :page-size-opts="[10, 20, 30, 40, 100, 1000]"
+                @on-page-size-change="changeTotalSize"
+                @on-change="changeTotalPage"
+                :current="page_index"
+                show-total
+                :total="total"
+                show-sizer
+                :page-size="page_size"
+                style="text-align: center; margin-top: 10px"
+              />
+            </div>
+            <div v-show="tab === 2">
+              <Table :columns="detailColumns" :data="detailData" border>
+              </Table>
+              <Page
+                :page-size-opts="[10, 20, 30, 40, 100, 1000]"
+                @on-page-size-change="changeDetailSize"
+                @on-change="changeDetailPage"
+                :current="page_index"
+                show-total
+                :total="total"
+                show-sizer
+                :page-size="page_size"
+                style="text-align: center; margin-top: 10px"
+              />
+            </div>
+          </TabPane>
+          <div  slot="extra" class="upload">
+          <Button
+            @click="handleTabsAdd"
+            size="small"
+            style="margin-right: 10px"
+            type="primary"
+            ghost
+            v-if="type == 6"
+            >新增</Button
+          >
+           <Upload
+           :headers="headers"
+          :show-upload-list="false"
+          :on-error="uploadError"
+          :on-success="uploadSuccess"
+          :action="$store.state.ip + '/api/explode_save_import_new'" 
+          v-if="type == 6"
+          style="margin-right: 10px"
+        >
+          <Button
+            size="small"
+            type="primary"
+            ghost
+            >导入</Button
+          >
+           </Upload>
+           </div>
+        </Tabs>
+      </Card>
+    </div>
+  </div>
+</template>
+<script>
+export default {
+  data() {
+    return {
+        ruleValidate: {
+                    name: [
+                        { required: true, message: 'The name cannot be empty', trigger: 'blur' }
+                    ]},
+      totalColumns: [
+        { type: "selection", align: "center", width: 60 },
+        { title: "序号", align: "center", type: "index", minWidth: 200 },
+        {
+          title: "产品分类",
+          align: "center",
+          key: "product_type",
+          minWidth: 200,
+        },
+        {
+          title: "产品名称",
+          align: "center",
+          key: "product_title",
+          minWidth: 200,
+        },
+        { title: "图号", align: "center", key: "url_number", minWidth: 200 },
+        { title: "型号", align: "center", key: "model", minWidth: 200 },
+        { title: "数量", align: "center", key: "num", minWidth: 200 },
+        { title: "长", align: "center", key: "long", minWidth: 200 },
+        { title: "宽", align: "center", key: "wide", minWidth: 200 },
+        { title: "高", align: "center", key: "high", minWidth: 200 },
+        { title: "材质", align: "center", key: "material", minWidth: 200 },
+        { title: "颜色", align: "center", key: "color", minWidth: 200 },
+        { title: "工艺", align: "center", key: "work", minWidth: 200 },
+        { title: "图纸", align: "center", key: "url", minWidth: 200 },
+        { title: "左右式", align: "center", key: "fashion", minWidth: 200 },
+        { title: "备注", align: "center", key: "remark", minWidth: 200 },
+        { title: "拆单状态", align: "center", key: "state", minWidth: 200 },
+        { title: "操作", align: "center", minWidth: 200 },
+      ],
+      totalData: [],
+      headers: { Authorization: localStorage.getItem("token") },
+      detailColumns: [
+        { type: "selection", align: "center", width: 60 },
+        { title: "序号", align: "center", type: "index", minWidth: 200 },
+        { title: "区域编码", align: "center", key: "area_code", minWidth: 200 },
+        {
+          title: "区域名称",
+          align: "center",
+          key: "area_title",
+          minWidth: 200,
+        },
+        { title: "户型", align: "center", key: "house_type", minWidth: 200 },
+        { title: "楼栋", align: "center", key: "house", minWidth: 200 },
+        { title: "单元", align: "center", key: "unit", minWidth: 200 },
+        { title: "楼层", align: "center", key: "layer", minWidth: 200 },
+        { title: "房号", align: "center", key: "number", minWidth: 200 },
+        { title: "位置", align: "center", key: "position", minWidth: 200 },
+        {
+          title: "产品分类",
+          align: "center",
+          key: "product_type",
+          minWidth: 200,
+        },
+        {
+          title: "产品名称",
+          align: "center",
+          key: "product_title",
+          minWidth: 200,
+        },
+        { title: "图号", align: "center", key: "url_number", minWidth: 200 },
+        { title: "型号", align: "center", key: "model", minWidth: 200 },
+        { title: "数量", align: "center", key: "num", minWidth: 200 },
+        { title: "长", align: "center", key: "long", minWidth: 200 },
+        { title: "宽", align: "center", key: "wide", minWidth: 200 },
+        { title: "高", align: "center", key: "high", minWidth: 200 },
+        { title: "材质", align: "center", key: "material", minWidth: 200 },
+        { title: "颜色", align: "center", key: "color", minWidth: 200 },
+        { title: "工艺", align: "center", key: "work", minWidth: 200 },
+        { title: "图纸", align: "center", key: "url", minWidth: 200 },
+        { title: "左右式", align: "center", key: "fashion", minWidth: 200 },
+        { title: "备注", align: "center", key: "remark", minWidth: 200 },
+        { title: "拆单状态", align: "center", key: "state", minWidth: 200 },
+        { title: "操作", align: "center", minWidth: 200 },
+      ],
+      detailData: [],
+      saveData: {
+        abbreviation: "",
+        address: "",
+        custom_title: "",
+        end_time: "",
+        front_money: "",
+        mobile: "",
+        nickname: "",
+        order_no: "",
+        remark: "",
+        residential_name: "",
+        start_time: "",
+        warning_state: "",
+      },
+      formData:{},
+      custom_title_list:[],
+      warning_state_list:[],
+      nickname_list:[],
+      searchData: {
+        area_code: [],
+        area_title: [],
+        house_type: [],
+        product_type: [],
+        fashion: [],
+        house: [],
+        unit: [],
+        layer: [],
+        number: [],
+        position: [],
+        url_number: [],
+        product_title: [],
+        material: "",
+        color: "",
+        work: "",
+        state: "",
+      },
+      area_code: [],
+      area_title: [],
+      house_type: [],
+      house: [],
+      unit: [],
+      layer: [],
+      number: [],
+      position: [],
+      url_number: [],
+      product_title: [],
+      product_type: [],
+      fashion: [],
+      material: [],
+      color: [],
+      work: [],
+      state: [],
+      search_state: false,
+      copy_form: [],
+      type: this.$route.query.type,
+      formData: {},
+      tabs: 2,
+      total: 0,
+      page_index: 1,
+      page_size: 10,
+      save_state:false,
+    };
+  },
+  created() {
+    if (this.$route.query.type == 3) {
+      this.axios
+        .get("/api/order_area_orders", {
+          params: { order_no: this.$route.query.order_no },
+        })
+        .then((res) => {
+          this.formData = res.msg;
+        });
+      this.getData();
+    }else{
+        this.axios.get('/api/custom_list').then(res=>{ this.custom_title_list = res.data.data});
+        this.axios.get('/api/warning_list').then(res=>{ this.warning_state_list = res.data.data });
+        this.axios.get('/api/employee_list').then(res=>{ this.nickname_list = res.data });
+    }
+  },
+  methods: {
+    changeTotalSize(e) {
+      this.page_size = e;
+      this.getData();
+    },
+    changeTotalPage(e) {
+      this.page_index = e;
+      this.getTotalData();
+    },
+    changeDetailSize(e) {
+      this.page_size = e;
+      this.getData(1);
+    },
+    changeDetailPage(e) {
+      this.page_index = e;
+      this.getData(1);
+    },
+    getData(type) {
+      if (type === 1) {
+        if (this.search_state) {
+          this.page_index = 1;
+          this.page_size = 10;
+          this.axios
+            .post("/api/order_area_details", {
+              order_no: this.$route.query.order_no,
+              page_index: this.page_index,
+              page_size: this.page_size,
+              ...this.searchData,
+            })
+            .then((res) => {
+              console.log(res);
+              this.detailData = res.msg.data;
+              this.total = res.msg.total;
+            });
+        } else {
+          this.page_index = 1;
+          this.page_size = 10;
+          this.axios
+            .post("/api/order_area_details", {
+              order_no: this.$route.query.order_no,
+              page_index: this.page_index,
+              page_size: this.page_size,
+            })
+            .then((res) => {
+              console.log(res);
+              this.detailData = res.msg.data;
+              this.total = res.msg.total;
+            });
+        }
+      } else if (type === 0) {
+        //             this.page_index= 1;
+        //        this.page_size = 10;
+        //   this.axios
+        //     .post("/api/order_area_details",
+        //        {
+        //         ...this.$route.query,
+        //         ...{ page_index: this.page_index, page_size: this.page_size },
+        //         ...this.searchData
+        //       },
+        //     )
+        //     .then((res) => {
+        //         this.totalData = res.msg.data;
+        //            this.total = res.msg.total;
+        //     })
+      } else {
+        this.page_index = 1;
+        this.page_size = 10;
+        this.axios
+          .post("/api/order_area_details", {
+            ...this.$route.query,
+            ...{ page_index: this.page_index, page_size: this.page_size },
+            ...this.searchData,
+          })
+          .then((res) => {
+              console.log(res.msg.house_type,this.house_type)
+            this.totalData = res.msg.data;
+            this.total = res.msg.total;
+            this.area_code = res.msg.area_code;
+            this.area_title = res.msg.area_title;
+            this.color = res.msg.color;
+            this.fashion = res.msg.fashion;
+            this.house = res.msg.house;
+            this.house_type = res.msg.house_type;
+            this.layer = res.msg.layer;
+            this.material = res.msg.material;
+            this.number = res.msg.number;
+            this.position = res.msg.position;
+            this.product_title = res.msg.product_title;
+            this.product_type = res.msg.product_type;
+            this.state = res.msg.state;
+            this.unit = res.msg.unit;
+            this.url_number = res.msg.url_number;
+            this.work = res.msg.work;
+            this.copy_form = this.searchData;
+          });
+      }
+    },
+     uploadError(err) {
+      this.$Message.error(err.msg || "上传失败");
+    },
+    uploadSuccess(res) {
+        if(this.save_state == true){
+      if (res.code == 200) {
+        this.$Message.success(res.msg || "上传成功");
+      } else {
+        this.$Message.warning(res.msg || "上传失败");
+      }
+      this.page_index = 1;
+        this.page_size = 10;
+        this.axios
+          .post("/api/order_area_details", {
+            ...this.$route.query,
+            ...{ page_index: this.page_index, page_size: this.page_size },
+            order_no:this.saveData.order_no
+          })
+          .then((res) => {
+              console.log(res)
+            this.totalData = res.msg.data;
+            this.total = res.msg.total;
+            this.area_code = res.msg.area_code;
+            this.area_title = res.msg.area_title;
+            this.color = res.msg.color;
+            this.fashion = res.msg.fashion;
+            this.house = res.msg.house;
+            this.house_type = res.msg.house_type;
+            this.layer = res.msg.layer;
+            this.material = res.msg.material;
+            this.number = res.msg.number;
+            this.position = res.msg.position;
+            this.product_title = res.msg.product_title;
+            this.product_type = res.msg.product_type;
+            this.state = res.msg.state;
+            this.unit = res.msg.unit;
+            this.url_number = res.msg.url_number;
+            this.work = res.msg.work;
+            this.copy_form = this.searchData;
+          });
+        }else{
+            this.$message.error('请先保存!')
+        }
+    },
+    save() {
+        if(!this.saveData.order_no&&!this.saveData.residential_name&&!this.saveData.abbreviation&&!this.saveData.custom_title&&!this.saveData.warning_state){
+            this.$message.error('请填写必要信息!');
+        }else{ 
+            this.axios.post('/api/order_area_save',{...this.saveData}).then(res=>{
+           this.$message.success(res.msg)
+           this.save_state = true;
+      })
+
+        }
+     
+    },
+    goback() {
+      this.$router.go(-1);
+    },
+    handleTabsAdd() {
+      this.tabs++;
+    },
+    search() {
+      this.search_state = true;
+      this.getData();
+    },
+  },
+};
+</script>
+<style scoped lang='scss'>
+.changeDetail {
+  .content {
+    overflow: auto;
+    height: 680px;
+    .form_content {
+      display: flex;
+      flex-wrap: wrap;
+    }
+    .card {
+      .form_middle {
+        .form_middle_content {
+          display: flex;
+          flex-wrap: wrap;
+        }
+      }
+    }
+  }
+}
+.ivu-form-item{
+    width: 250px;
+}
+.upload{
+    display: flex;
+    justify-content: space-around;
+}
+</style>

+ 16 - 1
src/views/BidSystem/ProductDeOrder/list.vue

@@ -36,6 +36,13 @@
           style="margin-right: 10px"
           >导出</Button
         >
+        <Button
+          @click="gopage()"
+          type="primary"
+          ghost
+          style="margin-right: 10px"
+          >新增</Button
+        >
       </div>
       <!-- <div slot='navButton'
            style="display:flex;">
@@ -292,6 +299,14 @@ export default {
   // 生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {},
   methods: {
+    gopage(){
+          this.$router.push({
+            path: "/cms/BidSystem/ProductDeOrder/infodetail",
+            query: {
+              type:6
+            },
+          });
+    },
     handleProcess() {
       this.process_control = true;
       this.axios({
@@ -357,7 +372,7 @@ export default {
           break;
         case 3:
           this.$router.push({
-            path: "/cms/measurementordermannage/edit",
+            path: "/cms/BidSystem/ProductDeOrder/infodetail",
             query: {
               type,
               order_no: row.order_no,

+ 4 - 2
src/views/MountOrder/details.vue

@@ -56,7 +56,8 @@ export default {
                 {title:'产品',name:'Select',serverName:'product',placeholder:'请选择产品',value:'',
                     option:[]
                 },
-                {title:'部件',name:'Input',serverName:'parts',placeholder:'部件',value:'',} ,
+                {title:'部件',name:'Select',serverName:'parts',placeholder:'部件',value:'',optionValue: 'id', optionName: 'title',
+                option:[]} ,
                 {title:'出库时间',name:'Input',start_server:'start_time',end_server:'end_time',start_value:'',end_value:'',isDate:true,serverName:'id2',start_placeholder:'开始日期',end_placeholder:'结束日期'}
             ],
             logList:[],
@@ -89,7 +90,7 @@ export default {
                     render:(h,params)=>h('span',{},this.func.replaceDate(params.row.end_time))
                 },
                 {title:'实际运输时间',align:'center',minWidth:200,key:'at_time',
-                    render:(h,params)=>h('span',{},this.func.replaceDate(params.row.at_time))
+                    render:(h,params)=>h('span',{},this.func.replaceDate(params.row.transport_time))
                 },
                 {title:'操作',align:'center',width:'150',fixed:'right',slot:'set'},
             ],
@@ -163,6 +164,7 @@ export default {
                 this.tableData = res.data.data;
                 this.logList = res.data.detail
                 this.total = res.data.total||0;
+                this.list[5].option = res.data.part_title;
             })
         },
         changePage(e){

+ 5 - 1
src/views/OrderMannage/BusinessOrderlist/edit.vue

@@ -3309,8 +3309,12 @@ export default {
           }
           break;
         case 3:
+            this.confirmDelete({
+        content: "确认删除么?",
+        then: () => {
           this.tableData.splice(index, 1);
-          this.handleCalcCount();
+          this.handleCalcCount();}
+            })
           break;
         case 4:
           obj = JSON.parse(JSON.stringify(row));

+ 4 - 1
src/views/ProductionOrderList/Deliverylist/checkUnusual.vue

@@ -14,7 +14,7 @@
               :total='total'>
       <div slot='titleButton'>
         <Button type="error"
-                @click="approved(0)"
+                @click="goback"
                 style="margin-right:10px;"
                 ghost>返回</Button>
         <Button type="success"
@@ -135,6 +135,9 @@ export default {
     }
   },
   methods: {
+    goback(){
+       this.$router.go(-1);
+    },
     init (row) {
       this.pageIndex = 1
       row.page_index = this.pageIndex;

+ 2 - 21
src/views/ProductionOrderList/InboundForm/details.vue

@@ -203,10 +203,10 @@ export default {
           option: [],
         },
         {
-          title: "状态",
+          title: "订单状态",
           name: "Select",
           serverName: "sub_state",
-          placeholder: "状态",
+          placeholder: "订单状态",
           value: "",
           option: [
             { label: "未指派", value: 0 },
@@ -359,13 +359,6 @@ export default {
       if (type == 2) {
         const result = [
           {
-            title: "部件",
-            name: "Input",
-            serverName: "parts",
-            value: "",
-            placeholder: "部件",
-          },
-          {
             title: "运输单号",
             name: "Input",
             serverName: "transport_no",
@@ -373,18 +366,6 @@ export default {
             placeholder: "运输单号",
           },
           {
-            title: "状态",
-            name: "Select",
-            serverName: "transport_no",
-            value: "",
-            option: [
-              { label: "未指派", value: 0 },
-              { label: "可以派工", value: 1 },
-              { label: "已派工", value: 2 },
-              { label: "已完成", value: 3 },
-            ],
-          },
-          {
             title: "确认出库状态",
             name: "Select",
             serverName: "in_out_value",

+ 0 - 35
src/views/ProductionOrderList/InboundForm/index.vue

@@ -185,41 +185,6 @@ export default {
           serverName: "residential_name",
         },
         {
-          title: "区域",
-          name: "Input",
-          placeholder: "请输入区域",
-          value: "",
-          serverName: "residential_name",
-        },
-        {
-          title: "楼层",
-          name: "Input",
-          placeholder: "请输入楼层",
-          value: "",
-          serverName: "residential_name",
-        },
-        {
-          title: "房间",
-          name: "Input",
-          placeholder: "请输入房间",
-          value: "",
-          serverName: "residential_name",
-        },
-        {
-          title: "图号",
-          name: "Input",
-          placeholder: "请输入图号",
-          value: "",
-          serverName: "residential_name",
-        },
-        {
-          title: "部件分类",
-          name: "Input",
-          placeholder: "请输入部件分类",
-          value: "",
-          serverName: "residential_name",
-        },
-        {
           title: "包装状态",
           name: "Select",
           placeholder: "请选择",

+ 21 - 38
src/views/ProductionOrderList/ProductionPlanlist/details.vue

@@ -140,16 +140,7 @@ export default {
           serverName: "url_number",
           placeholder: "请选择图号",
           option: [],
-        },
-         {
-          title: "是否完成",
-          name: "Select",
-          filterable: true,
-          value: "",
-          serverName: "sub_state",
-          placeholder: " ",
-          option: [{ label: '否', value: 0 },{ label: '是', value: 1 }],
-        },
+        }
       ],
       tableColums: [
         { type: "selection", align: "center", fixed: "left", width: "100" },
@@ -230,14 +221,6 @@ export default {
           minWidth: 200,
         },
         {
-          title: "是否完成",
-          align: "center",
-          key: "is_complete",
-          minWidth: 200,
-          render: (h, params) =>
-            h("span", {}, params.row.sub_state == 3 ? "已完成" : "未完成"),
-        },
-        {
           title: "测量尺寸",
           align: "center",
           minWidth: 200,
@@ -312,22 +295,6 @@ export default {
       this.axios("/api/order_detail_word", {
         params: { order_no: this.$route.query.order_no },
       }).then((res) => {
-        res.data.house.map((v) => {
-          v.value = v.house;
-          v.label = v.house;
-        });
-        res.data.unit.map((v) => {
-          v.value = v.unit;
-          v.label = v.unit;
-        });
-        res.data.layer.map((v) => {
-          v.value = v.layer;
-          v.label = v.layer;
-        });
-        res.data.number_detail.map((v) => {
-          v.value = v.number_detail;
-          v.label = v.number_detail;
-        });
         res.data.part.map((v) => {
           v.value = v.title;
           v.label = v.title;
@@ -345,10 +312,6 @@ export default {
           j.title = v.url_number;
           this.arrList.push(j)
         });
-        this.list[0].option = res.data.house;
-        this.list[1].option = res.data.unit;
-        this.list[2].option = res.data.layer;
-        this.list[3].option = res.data.number_detail;
         this.list[4].option = res.data.part;
         this.list[5].option = res.data.produce;
         this.list[6].option = res.data.product;
@@ -364,6 +327,26 @@ export default {
         this.logList = res.data.detail;
         this.tableData = res.data.list;
         this.total = res.data.total;
+          res.data.house.map((v) => {
+          v.value = v.house;
+          v.label = v.house;
+        });
+        res.data.unit.map((v) => {
+          v.value = v.unit;
+          v.label = v.unit;
+        });
+        res.data.layer.map((v) => {
+          v.value = v.layer;
+          v.label = v.layer;
+        });
+        res.data.number_detail.map((v) => {
+          v.value = v.number;
+          v.label = v.number;
+        });
+         this.list[0].option = res.data.house;
+        this.list[1].option = res.data.unit;
+        this.list[2].option = res.data.layer;
+        this.list[3].option = res.data.number_detail;
       });
     },
     postData() {},

+ 328 - 27
src/views/ProductionOrderList/ProductionPlanlist/list.vue

@@ -39,7 +39,7 @@
           type="primary"
           ghost
           icon="ios-cog"
-          >表头设置</Button
+          >设置</Button
         >
       </div>
       <template slot="basicTypeSet" slot-scope="{ row }">
@@ -106,6 +106,38 @@
         </div>
       </template>
     </FullPage>
+     <Modal
+      v-model="showModal"
+      title="设置"
+      @on-ok="handleModalOk"
+      @on-cancel="showModal = false"
+    >
+      <div class="modal_content">
+        <Tabs
+          value="name1"
+          style="max-height: 700px; overflow: hidden; overflow-y: auto"
+        >
+          <TabPane label="表单设置" name="name1">
+            <Table
+              :columns="formModalColumns"
+              border
+              draggable
+              @on-drag-drop="(a, b) => onDragDrop(a, b, formModalTableData, 1)"
+              :data="formModalTableData"
+            ></Table>
+          </TabPane>
+          <TabPane label="表头设置" name="name2">
+            <Table
+              :columns="tableModalColumns"
+              border
+              draggable
+              @on-drag-drop="(a, b) => onDragDrop(a, b, tableModalTableData, 2)"
+              :data="tableModalTableData"
+            ></Table>
+          </TabPane>
+        </Tabs>
+      </div>
+    </Modal>
   </div>
 </template>
 
@@ -114,6 +146,237 @@ import { mapState } from "vuex";
 export default {
   data() {
     return {
+        tableModalColumns: [
+        {
+          title: "是否展示",
+          align: "center",
+          key: "is_show",
+          minWidth: 60,
+          render: (h, params) => {
+            const { index } = params;
+            const currentRow = JSON.parse(
+              JSON.stringify(this.tableModalTableData[index])
+            );
+            return h("Checkbox", {
+              props: {
+                value: currentRow.is_show,
+              },
+              on: {
+                "on-change": (e) => {
+                  currentRow.is_show = e;
+                  this.tableModalTableData.splice(index, 1, currentRow);
+                },
+              },
+            });
+          },
+        },
+        {
+          title: "字段名",
+          align: "center",
+          key: "value",
+          minWidth: 100,
+        },
+        {
+          title: "展示名称",
+          align: "center",
+          key: "title",
+          minWidth: 100,
+          render: (h, params) => {
+            const { index } = params;
+            const currentRow = JSON.parse(
+              JSON.stringify(this.tableModalTableData[index])
+            );
+            return h("Input", {
+              props: {
+                value: currentRow.title,
+                type: "text",
+                disabled: currentRow.title == "全选" ? true : false,
+              },
+              on: {
+                "on-change": (e) => {
+                  currentRow.title = e.target.value;
+                  this.tableModalTableData.splice(index, 1, currentRow);
+                },
+              },
+            });
+          },
+        },
+      ],
+        tableModalTableData: [
+        { is_show: true, key: "selection", value: "全选", title: "全选" },
+        {
+          is_show: true,
+          key: "order_no",
+          value: "订单编号",
+          title: "订单编号",
+        },
+        {
+          is_show: true,
+          key: "residential_name",
+          value: "项目名称",
+          title: "项目名称",
+        },
+        { is_show: true, key: "nickname", value: "业务员", title: "业务员" },
+        {
+          is_show: true,
+          key: "client_name",
+          value: "客户姓名",
+          title: "客户姓名",
+        },
+        { is_show: true, key: "address", value: "客户地址", title: "客户地址" },
+        {
+          is_show: true,
+          key: "leading_name",
+          value: "负责人",
+          title: "负责人",
+        },
+        {
+          is_show: true,
+          key: "warning_state",
+          value: "紧急程度",
+          title: "紧急程度",
+        },
+        {
+          is_show: true,
+          key: "predict_price",
+          value: "产品总价",
+          title: "产品总价",
+        },
+        {
+          is_show: true,
+          key: "fax_price",
+          value: "折扣金额",
+          title: "折扣金额",
+        },
+        { is_show: true, key: "price", value: "订单金额", title: "订单金额" },
+        { is_show: true, key: "get_money", value: "已收款", title: "已收款" },
+        { is_show: true, key: "unget_money", value: "未收款", title: "未收款" },
+        { is_show: true, key: "remark", value: "备注", title: "备注" },
+        {
+          is_show: true,
+          key: "start_time",
+          value: "订单开始日期",
+          title: "订单开始日期",
+        },
+        {
+          is_show: true,
+          key: "end_time",
+          value: "订单交付日期",
+          title: "订单交付日期",
+        },
+        {
+          is_show: true,
+          key: "complete_rate",
+          value: "生产进度",
+          title: "生产进度",
+        },
+        { is_show: true, key: "state", value: "订单状态", title: "订单状态" },
+        { is_show: true, key: "crt_name", value: "制单人", title: "制单人" },
+        {
+          is_show: true,
+          key: "crt_time",
+          value: "订单创建时间",
+          title: "订单创建时间",
+        },
+        { is_show: true, key: "set", value: "操作", title: "操作" },
+      ],
+       formModalColumns: [
+        {
+          title: "是否展示",
+          align: "center",
+          key: "is_show",
+          minWidth: 60,
+          render: (h, params) => {
+            const { index } = params;
+            const currentRow = JSON.parse(
+              JSON.stringify(this.formModalTableData[index])
+            );
+            return h("Checkbox", {
+              props: {
+                value: currentRow.is_show,
+              },
+              on: {
+                "on-change": (e) => {
+                  currentRow.is_show = e;
+                  this.formModalTableData.splice(index, 1, currentRow);
+                },
+              },
+            });
+          },
+        },
+        {
+          title: "字段名",
+          align: "center",
+          key: "value",
+          minWidth: 100,
+        },
+        {
+          title: "展示名称",
+          align: "center",
+          key: "title",
+          minWidth: 100,
+          render: (h, params) => {
+            const { index } = params;
+            const currentRow = JSON.parse(
+              JSON.stringify(this.formModalTableData[index])
+            );
+            return h("Input", {
+              props: {
+                value: currentRow.title,
+                type: "text",
+              },
+              on: {
+                "on-change": (e) => {
+                  currentRow.title = e.target.value;
+                  this.formModalTableData.splice(index, 1, currentRow);
+                },
+              },
+            });
+          },
+        },
+      ],
+      formModalTableData: [
+        {
+          is_show: true,
+          key: "order_no",
+          value: "订单编号",
+          title: "订单编号",
+        },
+        {
+          is_show: true,
+          key: "residential_name",
+          value: "项目名称",
+          title: "项目名称",
+        },
+        {
+          is_show: true,
+          key: "client_name",
+          value: "客户姓名",
+          title: "客户姓名",
+        },
+        { is_show: true, key: "address", value: "客户地址", title: "客户地址" },
+        { is_show: true, key: "salesman", value: "业务员", title: "业务员" },
+        { is_show: true, key: "state", value: "订单状态", title: "订单状态" },
+        { is_show: true, key: "crt_id", value: "制单人", title: "制单人" },
+        {
+          is_show: true,
+          key: "leading_name",
+          value: "负责人",
+          title: "负责人",
+        },
+        {
+          is_show: true,
+          key: "warning_state",
+          value: "紧急程度",
+          title: "紧急程度",
+        },
+        {
+          is_show: true,
+          key: "",
+          value: "订单创建时间",
+          title: "订单创建时间",
+        },
+      ],
       tableColums: [
         {
           type: "selection",
@@ -143,11 +406,11 @@ export default {
             h(
               "span",
               {},
-              params.row.state == 0
+              params.row.state == 1
                 ? "未派工"
-                : params.row.state == 1
-                ? "已派工"
                 : params.row.state == 2
+                ? "派工中"
+                : params.row.state == 3
                 ? "完成"
                 : ""
             ),
@@ -208,7 +471,9 @@ export default {
         },
       ],
       tableData: [],
+      showModal:false,
       page_index: 1,
+      currencyPageId:null,
       page_size: 10,
       total: 0,
       proxyObj: {},
@@ -254,6 +519,7 @@ export default {
       .get("/api/employee_list")
       .then((res) => (this.userList = res.data));
     //this.axios.get('/api/employee_list').then(res => { this.employeeList = res.data })
+    this.currencyPageId = this.$store.state.navgationData[0].sub[0].sub[0].id;
   },
   computed: {
     ...mapState(["persimissionData"]),
@@ -336,15 +602,37 @@ export default {
           serverName: "state",
           value: "",
           option: [
-            { label: "未派工", value: 0 },
-            { label: "已派工", value: 1 },
-            { label: "完成", value: 2 },
+            { label: "未派工", value: 1 },
+            { label: "派工中", value: 2 },
+            { label: "完成", value: 3 },
           ],
         },
       ];
     },
   },
   methods: {
+    handleModalOk(){
+        this.formModalTableData.forEach((element, index) => {
+        element.sort = index;
+      });
+      this.tableModalTableData.forEach((element, index) => {
+        element.sort = index;
+      });
+      this.axios({
+        method: "post",
+        url: "/api/update/table",
+        data: {
+          id: this.currencyPageId,
+          result: {
+            formSet: this.formModalTableData,
+            tableSet: this.tableModalTableData,
+          },
+        },
+      }).then((res) => {
+        this.$Message.success(res.msg);
+        this.init(this.proxyObj);
+      });
+    },
     init(row) {
       const { order_no } = this.$route.query;
       if (order_no) {
@@ -433,6 +721,12 @@ export default {
         },
       });
     },
+     onDragDrop(a, b, table, type) {
+      if (type == 2 && (a == 0 || b == 0)) {
+        return this.$Message.warning("全选位置不可变");
+      }
+      table.splice(b, 0, ...table.splice(a, 1));
+    },
     handleDispatchType(row) {
       console.log("row :>> ", row);
       this.$router.push({
@@ -457,22 +751,24 @@ export default {
       this.selects = result;
     },
     setupTableHeader() {
-      this.tableheaders.length < 1
-        ? (this.tableheaders = this.tableColums.reduce(
-            (pre, cur) => pre.concat(cur.key),
-            []
-          ))
-        : "";
-      this.$setTableheader({
-        list: this.tableColums,
-        selects: this.tableheaders,
-        then: (result) => {
-          this.tableheaders = result;
-          this.axios
-            .post("/api/update/table", { id: this.$route.query.id, result })
-            .then((res) => {
-              if (res.code == 200) {
-                this.$Message.success(res.msg);
+       this.showModal = true;
+      return;
+      // this.tableheaders.length < 1
+      //   ? (this.tableheaders = this.tableColums.reduce(
+      //       (pre, cur) => pre.concat(cur.key),
+      //       []
+      //     ))
+      //   : "";
+      // this.$setTableheader({
+      //   list: this.tableColums,
+      //   selects: this.tableheaders,
+      //   then: (result) => {
+      //     this.tableheaders = result;
+      //     this.axios
+      //       .post("/api/update/table", { id: this.$route.query.id, result })
+      //       .then((res) => {
+      //         if (res.code == 200) {
+      //           this.$Message.success(res.msg);
                 // let data =[];
                 // for(let i = 0 ; i++ ; i<this.tableColums){
                 //   if(this.tableColums[i].title.indexOf(result)>=0){
@@ -480,10 +776,10 @@ export default {
                 //   }
                 // }
                 // this.computedTable = data
-              }
-            });
-        },
-      });
+       //       }
+      //      });
+     //   },
+    //  });
     },
   },
 };
@@ -495,4 +791,9 @@ export default {
   justify-content: center;
   margin-top: 40px;
 }
+.modal_content {
+  display: flex;
+  justify-content: center;
+  // width: 500px;
+}
 </style>

+ 18 - 14
src/views/ProductionOrderList/ProductionsOrder/Decorationlist.vue

@@ -853,14 +853,7 @@ export default {
           this.logList = res.data.detail;
           this.tableData = res.data.list;
           this.total = res.data.total;
-        }
-      );
-    },
-    getOptions() {
-      this.axios("/api/order_detail_word", {
-        params: { order_no: this.$route.query.order_no },
-      }).then((res) => {
-        res.data.house.map((v) => {
+           res.data.house.map((v) => {
           v.value = v.house;
           v.label = v.house;
         });
@@ -873,9 +866,20 @@ export default {
           v.label = v.layer;
         });
         res.data.number_detail.map((v) => {
-          v.value = v.number_detail;
-          v.label = v.number_detail;
+          v.value = v.number;
+          v.label = v.number;
         });
+           this.list[0].option = res.data.house;
+        this.list[1].option = res.data.unit;
+        this.list[2].option = res.data.layer;
+        this.list[3].option = res.data.number_detail;
+        }
+      );
+    },
+    getOptions() {
+      this.axios("/api/order_detail_word", {
+        params: { order_no: this.$route.query.order_no },
+      }).then((res) => {
         res.data.part.map((v) => {
           v.value = v.title;
           v.label = v.title;
@@ -906,10 +910,10 @@ export default {
           v.value = v.url_number;
           v.label = v.url_number;
         });
-        this.list[0].option = res.data.house;
-        this.list[1].option = res.data.unit;
-        this.list[2].option = res.data.layer;
-        this.list[3].option = res.data.number_detail;
+        // this.list[0].option = res.data.house;
+        // this.list[1].option = res.data.unit;
+        // this.list[2].option = res.data.layer;
+        // this.list[3].option = res.data.number_detail;
         this.list[4].option = res.data.part;
         this.list[5].option = res.data.product;
         this.list[9].option = res.data.url_number;