123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438 |
- <template>
- <div class="changeDetail">
- <Toptitle title="变更记录详情">
- <slot name="titleButton">
- <Button
- type="primary"
- style="margin-right: 10px"
- >打印变更联系单</Button
- >
- <Button
- @click="goback()"
- type="primary"
- ghost
- style="margin-right: 10px"
- >返回</Button
- >
- </slot>
- </Toptitle>
- <div>
- <div class="form">
- <div class="form_content">
- <div class="top_search">
- <div><span>区域编码:</span>{{ formData.area_num }}</div>
- <div><span>区域名称:</span>{{ formData.area_title }}</div>
- <div><span>产品名称:</span>{{ formData.product_title }}</div>
- <div><span>数量:</span>{{ formData.product_num }}</div>
- <div><span>规格:</span>{{ formData.measure }}</div>
- <div><span>工艺属性:</span>{{ formData.process_property }}</div>
- <div><span>图号:</span>{{ formData.url_number }}</div>
- <div style="display:flex;">
- <span style="width:50px">图纸:</span>
- <div>
- <span
- v-for="item in formData.img"
- :key="item"
- @click="checkImg(formData.img)"
- >
- <img :src="$store.state.ip + item" alt="" style=" max-width: 80px; max-height: 80px;"/>
- </span>
- </div>
- </div>
- <div>
- <span>左右式:</span
- >{{
- formData.fashion == 1
- ? "左式"
- : formData.fashion == 2
- ? "右式"
- : "无"
- }}
- </div>
- <!-- <div><span>价格:</span>{{ formData.price }}</div> -->
- <div><span>备注:</span>{{ formData.remark }}</div>
- </div>
- </div>
- <div class="form_middle">
- <Form class="form_middle_content" :label-width="100">
- <FormItem label="联系单编号:">
- <span>{{formData.contact_order_no}}</span>
- </FormItem>
- <FormItem label="原生产单编号:">
- <span
- style="width: auto"
- >{{this.$route.query.order_no}}</span>
- </FormItem>
- <FormItem label="接收部门:">
- <Select
- filterable
- clearable
- v-model="formData.get_depart_id"
- size="small"
- style="width: 120px"
- disabled
- >
- <Option
- v-for="(item,index) in depart_list"
- :key="index"
- :label="item.title"
- :value="item.id"
- ></Option>
- </Select>
- </FormItem>
- <FormItem label="发出部门:">
- <Select
- filterable
- clearable
- v-model="formData.send_depart_id"
- disabled
- size="small"
- style="width: 120px"
- >
- <Option
- v-for="(item, index) in depart_list"
- :key="index"
- :label="item.title"
- :value="item.id"
- ></Option>
- </Select>
- </FormItem>
- <FormItem label="更改性质:">
- <Input placeholder="请输入..." style="width: auto" v-model="formData.type_title" disabled></Input>
- </FormItem>
- <FormItem label="变更原因:">
- <Input
- type="textarea"
- placeholder="请输入..."
- style="width: auto"
- v-model="formData.reason"
- disabled
- ></Input>
- </FormItem>
- </Form>
- </div>
- </div>
- </div>
- <Card style="width: 100%">
- <div style="margin-left: 5px">
- <span style="font-size: 20px; font-weight: bold">变更后深化单内容</span>
- </div>
- <Table :columns="tableColumns" :data="tableData" border>
- <template slot="urlSet" slot-scope="{ index }">
- <div class="product-img">
- <div class="product-add">
- <div
- class="items"
- v-show="tableData[index].img.length !== 0 ? true : false"
- >
- <img
- @click="looks(tableData[index].img)"
- v-for="(el, idx) in tableData[index].img"
- :key="idx"
- :src="$store.state.ip + el"
- alt=""
- />
- </div>
- </div>
- </div>
- </template>
- </Table>
- <div class="List_form_content">
- <div>
- <span style="font-size: 20px; font-weight: bold">原深化单内容</span>
- </div>
- <Table :columns="ListColumns" :data="ListData" border>
- <template slot="urlSet" slot-scope="{ index }">
- <div
- class="items"
- >
- <img
- @click="looks(ListData[index].img)"
- v-for="(el, idx) in ListData[index].img"
- :key="idx"
- :src="$store.state.ip + el"
- alt=""
- style="max-width: 40px; max-height: 40px"
- />
- </div>
- </template>
- </Table>
- </div>
- </Card>
- </div>
- </template>
- <script>
- export default {
- data() {
- return {
- formData: {
- depart_end:'',
- depart_start:'',
- msg:'',
- contact_order_no:'',
- change_type:''
- },
- cascader_list: [],
- building_list: [],
- type: 1,
- tableColumns: [
- { title: "序号", align: "center", minWidth: 100, type: "index" },
- {
- title: "楼栋",
- key: "house",
- align: "center",
- minWidth: 100
- },
- {
- title: "楼单元",
- key: "unit",
- align: "center",
- minWidth: 100
- },
- {
- title: "楼层",
- key: "layer",
- align: "center",
- minWidth: 100
- },
- {
- title: "房间号",
- key: "number",
- align: "center",
- minWidth: 100
- },
- {
- title: "产品分类",
- key: "type_title",
- align: "center",
- minWidth: 100
- },
- {
- title: "产品",
- key: "title",
- align: "center",
- minWidth: 100
- },
- {
- title: "计量单位",
- key: "product_unit",
- align: "center",
- minWidth: 100
- },
- {
- title: "位置",
- key: "position",
- align: "center",
- minWidth: 100
- },
- {
- title: "图纸",
- key: "url",
- align: "center",
- minWidth: 100,
- slot: "urlSet"
- },
- {
- title: "图号",
- key: "url_number",
- align: "center",
- minWidth: 100
- },
- {
- 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
- }
- ],
- tableData: [],
- ListColumns: [
- { title: "序号", align: "center", minWidth: 100, type: "index" },
- { title: "楼栋", key: "house", align: "center", minWidth: 100 },
- { title: "楼单元", key: "unit", align: "center", minWidth: 100 },
- { title: "楼层", key: "layer", align: "center", minWidth: 100 },
- { title: "房价号", key: "number", align: "center", minWidth: 100 },
- {
- title: "产品分类",
- key: "type_title",
- align: "center",
- minWidth: 100,
- },
- { title: "产品", key: "title", align: "center", minWidth: 100 },
- {
- title: "计量单位",
- key: "product_unit",
- align: "center",
- minWidth: 100,
- },
- { title: "位置", key: "position", align: "center", minWidth: 100 },
- {
- title: "图纸",
- key: "url",
- align: "center",
- minWidth: 100,
- slot: "urlSet",
- },
- { title: "图号", key: "url_number", align: "center", minWidth: 100 },
- { 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 }
- ],
- ListData: [],
- page_index: 1,
- page_size: 10,
- depart_list:[],
- show:false
- };
- },
- created(){
- this.axios.get("/api/basics_product_index").then((res) => {
- this.cascader_list = res.data.data;
- });
- this.axios.get('/api/employee_depart_list').then(res=>{
- this.depart_list = res.data
- let arr = [];
- this.depart_list.forEach(item=>{
- if(item.sub.length == 0){
- arr.push(item)
- }
- else{
- item.sub.forEach(_item=>{
- arr.push(_item)
- })
- }
- })
- this.depart_list =arr
- })
- },
- mounted() {
- this.initData(
- this.$route.query.contact_order_no
- );
- },
- methods: {
- looks(arr) {
- // const array = [{ img_url: img }];
- const array = arr.map((v) => {
- return { img_url: v };
- });
- this.$previewImg({
- list: array,
- baseUrl: this.$store.state.ip,
- baseImgField: "img_url",
- baseTitleField: "",
- });
- },
- goback() {
- this.$router.go(-1);
- },
- initData(contact_order_no) {
- this.axios({
- method: "get",
- url: "/api/change_area_product_detail",
- params: {
- contact_order_no
- },
- }).then((res) => {
- console.log(res);
- this.tableData = res.data.new_list;
- this.ListData =res.data.old_list;
- this.formData =res.data;
- this.tableData.forEach((item) => {
- item.long = item.measure.split("*")[0];
- item.wide = item.measure.split("*")[1];
- item.high = item.measure.split("*")[2];
- });
- this.ListData.forEach(item=>{
- item.long = item.measure.split("*")[0];
- item.wide = item.measure.split("*")[1];
- item.high = item.measure.split("*")[2];
- })
- });
- },
- },
- };
- </script>
- <style scoped lang='scss'>
- .changeDetail {
- overflow: auto;
- .form_content {
- border-bottom: 1px solid #a2a6b1;
- .top_search {
- display: flex;
- flex-wrap: wrap;
- div {
- width: 250px;
- font-size: 14px;
- margin: 10px 0px;
- }
- span{
- margin-left: 20px;
- }
- }
- .form_content_header {
- display: flex;
- flex-wrap: wrap;
- }
- }
- .form_middle {
- margin: 20px 0;
- .form_middle_content {
- display: flex;
- flex-wrap: wrap;
- }
- }
- }
- .product-add {
- display: flex;
- flex-direction: column;
- .ipt {
- position: absolute;
- width: 100%;
- height: 100%;
- opacity: 0;
- cursor: pointer;
- outline: none;
- top: 0;
- left: 0;
- }
- .items {
- width: auto;
- height: 40px;
- margin-bottom: 10px;
- overflow: hidden;
- border-radius: 5px;
- position: relative;
- img {
- max-width: 40px;
- max-height: 40px;
- }
- }
- }
- .List_form_content {
- margin: 30px 0;
- }
- .ivu-form-item{
- width: 250px;
- }
- </style>
|